1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Budget
  5. getCostAnomalyMonitor
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 Monitor resource in Oracle Cloud Infrastructure Budget service.

    Gets a CostAnomalyMonitor by the identifier.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testCostAnomalyMonitor = oci.Budget.getCostAnomalyMonitor({
        costAnomalyMonitorId: testCostAnomalyMonitorOciBudgetCostAnomalyMonitor.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_cost_anomaly_monitor = oci.Budget.get_cost_anomaly_monitor(cost_anomaly_monitor_id=test_cost_anomaly_monitor_oci_budget_cost_anomaly_monitor["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.GetCostAnomalyMonitor(ctx, &budget.GetCostAnomalyMonitorArgs{
    			CostAnomalyMonitorId: testCostAnomalyMonitorOciBudgetCostAnomalyMonitor.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 testCostAnomalyMonitor = Oci.Budget.GetCostAnomalyMonitor.Invoke(new()
        {
            CostAnomalyMonitorId = testCostAnomalyMonitorOciBudgetCostAnomalyMonitor.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.GetCostAnomalyMonitorArgs;
    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 testCostAnomalyMonitor = BudgetFunctions.getCostAnomalyMonitor(GetCostAnomalyMonitorArgs.builder()
                .costAnomalyMonitorId(testCostAnomalyMonitorOciBudgetCostAnomalyMonitor.id())
                .build());
    
        }
    }
    
    variables:
      testCostAnomalyMonitor:
        fn::invoke:
          function: oci:Budget:getCostAnomalyMonitor
          arguments:
            costAnomalyMonitorId: ${testCostAnomalyMonitorOciBudgetCostAnomalyMonitor.id}
    

    Using getCostAnomalyMonitor

    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 getCostAnomalyMonitor(args: GetCostAnomalyMonitorArgs, opts?: InvokeOptions): Promise<GetCostAnomalyMonitorResult>
    function getCostAnomalyMonitorOutput(args: GetCostAnomalyMonitorOutputArgs, opts?: InvokeOptions): Output<GetCostAnomalyMonitorResult>
    def get_cost_anomaly_monitor(cost_anomaly_monitor_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetCostAnomalyMonitorResult
    def get_cost_anomaly_monitor_output(cost_anomaly_monitor_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetCostAnomalyMonitorResult]
    func LookupCostAnomalyMonitor(ctx *Context, args *LookupCostAnomalyMonitorArgs, opts ...InvokeOption) (*LookupCostAnomalyMonitorResult, error)
    func LookupCostAnomalyMonitorOutput(ctx *Context, args *LookupCostAnomalyMonitorOutputArgs, opts ...InvokeOption) LookupCostAnomalyMonitorResultOutput

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

    public static class GetCostAnomalyMonitor 
    {
        public static Task<GetCostAnomalyMonitorResult> InvokeAsync(GetCostAnomalyMonitorArgs args, InvokeOptions? opts = null)
        public static Output<GetCostAnomalyMonitorResult> Invoke(GetCostAnomalyMonitorInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCostAnomalyMonitorResult> getCostAnomalyMonitor(GetCostAnomalyMonitorArgs args, InvokeOptions options)
    public static Output<GetCostAnomalyMonitorResult> getCostAnomalyMonitor(GetCostAnomalyMonitorArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:Budget/getCostAnomalyMonitor:getCostAnomalyMonitor
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CostAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    CostAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    costAnomalyMonitorId String
    The unique costAnomalyMonitor OCID.
    costAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    cost_anomaly_monitor_id str
    The unique costAnomalyMonitor OCID.
    costAnomalyMonitorId String
    The unique costAnomalyMonitor OCID.

    getCostAnomalyMonitor Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment.
    CostAlertSubscriptionMaps List<GetCostAnomalyMonitorCostAlertSubscriptionMap>
    The mapping of cost monitor to alert subscription along with thresholds.
    CostAnomalyMonitorId string
    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"}
    Description string
    The description of the budget.
    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 Monitor.
    LifecycleDetails string
    The current state details of the cost monitor.
    Name string
    The name of the cost anomaly monitor. Avoid entering confidential information.
    State string
    The current state of the cost monitor.
    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.
    TimeCreated string
    The time that the cost monitor was created.
    TimeUpdated string
    The time that the cost monitor was last updated.
    Type string
    Type of cost monitor
    CompartmentId string
    The OCID of the compartment.
    CostAlertSubscriptionMaps []GetCostAnomalyMonitorCostAlertSubscriptionMap
    The mapping of cost monitor to alert subscription along with thresholds.
    CostAnomalyMonitorId string
    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"}
    Description string
    The description of the budget.
    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 Monitor.
    LifecycleDetails string
    The current state details of the cost monitor.
    Name string
    The name of the cost anomaly monitor. Avoid entering confidential information.
    State string
    The current state of the cost monitor.
    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.
    TimeCreated string
    The time that the cost monitor was created.
    TimeUpdated string
    The time that the cost monitor was last updated.
    Type string
    Type of cost monitor
    compartmentId String
    The OCID of the compartment.
    costAlertSubscriptionMaps List<GetCostAnomalyMonitorCostAlertSubscriptionMap>
    The mapping of cost monitor to alert subscription along with thresholds.
    costAnomalyMonitorId String
    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"}
    description String
    The description of the budget.
    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 Monitor.
    lifecycleDetails String
    The current state details of the cost monitor.
    name String
    The name of the cost anomaly monitor. Avoid entering confidential information.
    state String
    The current state of the cost monitor.
    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.
    timeCreated String
    The time that the cost monitor was created.
    timeUpdated String
    The time that the cost monitor was last updated.
    type String
    Type of cost monitor
    compartmentId string
    The OCID of the compartment.
    costAlertSubscriptionMaps GetCostAnomalyMonitorCostAlertSubscriptionMap[]
    The mapping of cost monitor to alert subscription along with thresholds.
    costAnomalyMonitorId string
    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"}
    description string
    The description of the budget.
    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 Monitor.
    lifecycleDetails string
    The current state details of the cost monitor.
    name string
    The name of the cost anomaly monitor. Avoid entering confidential information.
    state string
    The current state of the cost monitor.
    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.
    timeCreated string
    The time that the cost monitor was created.
    timeUpdated string
    The time that the cost monitor was last updated.
    type string
    Type of cost monitor
    compartment_id str
    The OCID of the compartment.
    cost_alert_subscription_maps Sequence[GetCostAnomalyMonitorCostAlertSubscriptionMap]
    The mapping of cost monitor to alert subscription along with thresholds.
    cost_anomaly_monitor_id str
    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"}
    description str
    The description of the budget.
    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 Monitor.
    lifecycle_details str
    The current state details of the cost monitor.
    name str
    The name of the cost anomaly monitor. Avoid entering confidential information.
    state str
    The current state of the cost monitor.
    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_created str
    The time that the cost monitor was created.
    time_updated str
    The time that the cost monitor was last updated.
    type str
    Type of cost monitor
    compartmentId String
    The OCID of the compartment.
    costAlertSubscriptionMaps List<Property Map>
    The mapping of cost monitor to alert subscription along with thresholds.
    costAnomalyMonitorId String
    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"}
    description String
    The description of the budget.
    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 Monitor.
    lifecycleDetails String
    The current state details of the cost monitor.
    name String
    The name of the cost anomaly monitor. Avoid entering confidential information.
    state String
    The current state of the cost monitor.
    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.
    timeCreated String
    The time that the cost monitor was created.
    timeUpdated String
    The time that the cost monitor was last updated.
    type String
    Type of cost monitor

    Supporting Types

    GetCostAnomalyMonitorCostAlertSubscriptionMap

    CostAlertSubscriptionId string
    The costAlertSubscription ocid which the cost monitor alert maps to.
    Operator string
    The filter operator. Example: 'AND', 'OR'.
    ThresholdAbsoluteValue int
    The absolute threshold value.
    ThresholdRelativePercent int
    The relative percentage threshold value.
    CostAlertSubscriptionId string
    The costAlertSubscription ocid which the cost monitor alert maps to.
    Operator string
    The filter operator. Example: 'AND', 'OR'.
    ThresholdAbsoluteValue int
    The absolute threshold value.
    ThresholdRelativePercent int
    The relative percentage threshold value.
    costAlertSubscriptionId String
    The costAlertSubscription ocid which the cost monitor alert maps to.
    operator String
    The filter operator. Example: 'AND', 'OR'.
    thresholdAbsoluteValue Integer
    The absolute threshold value.
    thresholdRelativePercent Integer
    The relative percentage threshold value.
    costAlertSubscriptionId string
    The costAlertSubscription ocid which the cost monitor alert maps to.
    operator string
    The filter operator. Example: 'AND', 'OR'.
    thresholdAbsoluteValue number
    The absolute threshold value.
    thresholdRelativePercent number
    The relative percentage threshold value.
    cost_alert_subscription_id str
    The costAlertSubscription ocid which the cost monitor alert maps to.
    operator str
    The filter operator. Example: 'AND', 'OR'.
    threshold_absolute_value int
    The absolute threshold value.
    threshold_relative_percent int
    The relative percentage threshold value.
    costAlertSubscriptionId String
    The costAlertSubscription ocid which the cost monitor alert maps to.
    operator String
    The filter operator. Example: 'AND', 'OR'.
    thresholdAbsoluteValue Number
    The absolute threshold value.
    thresholdRelativePercent Number
    The relative percentage threshold value.

    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