Oracle Cloud Infrastructure v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi
Oracle Cloud Infrastructure v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi
This data source provides the list of Cost Anomaly Monitors in Oracle Cloud Infrastructure Budget service.
Gets a list of Cost Anomaly Monitors in a compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCostAnomalyMonitors = oci.Budget.getCostAnomalyMonitors({
compartmentId: compartmentId,
name: costAnomalyMonitorName,
regions: costAnomalyMonitorRegion,
state: costAnomalyMonitorState,
targetTenantIds: testTargetTenant.id,
});
import pulumi
import pulumi_oci as oci
test_cost_anomaly_monitors = oci.Budget.get_cost_anomaly_monitors(compartment_id=compartment_id,
name=cost_anomaly_monitor_name,
regions=cost_anomaly_monitor_region,
state=cost_anomaly_monitor_state,
target_tenant_ids=test_target_tenant["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.GetCostAnomalyMonitors(ctx, &budget.GetCostAnomalyMonitorsArgs{
CompartmentId: compartmentId,
Name: pulumi.StringRef(costAnomalyMonitorName),
Regions: costAnomalyMonitorRegion,
State: pulumi.StringRef(costAnomalyMonitorState),
TargetTenantIds: testTargetTenant.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 testCostAnomalyMonitors = Oci.Budget.GetCostAnomalyMonitors.Invoke(new()
{
CompartmentId = compartmentId,
Name = costAnomalyMonitorName,
Regions = costAnomalyMonitorRegion,
State = costAnomalyMonitorState,
TargetTenantIds = testTargetTenant.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.GetCostAnomalyMonitorsArgs;
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 testCostAnomalyMonitors = BudgetFunctions.getCostAnomalyMonitors(GetCostAnomalyMonitorsArgs.builder()
.compartmentId(compartmentId)
.name(costAnomalyMonitorName)
.regions(costAnomalyMonitorRegion)
.state(costAnomalyMonitorState)
.targetTenantIds(testTargetTenant.id())
.build());
}
}
variables:
testCostAnomalyMonitors:
fn::invoke:
function: oci:Budget:getCostAnomalyMonitors
arguments:
compartmentId: ${compartmentId}
name: ${costAnomalyMonitorName}
regions: ${costAnomalyMonitorRegion}
state: ${costAnomalyMonitorState}
targetTenantIds: ${testTargetTenant.id}
Using getCostAnomalyMonitors
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 getCostAnomalyMonitors(args: GetCostAnomalyMonitorsArgs, opts?: InvokeOptions): Promise<GetCostAnomalyMonitorsResult>
function getCostAnomalyMonitorsOutput(args: GetCostAnomalyMonitorsOutputArgs, opts?: InvokeOptions): Output<GetCostAnomalyMonitorsResult>def get_cost_anomaly_monitors(compartment_id: Optional[str] = None,
filters: Optional[Sequence[GetCostAnomalyMonitorsFilter]] = None,
name: Optional[str] = None,
regions: Optional[Sequence[str]] = None,
state: Optional[str] = None,
target_tenant_ids: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetCostAnomalyMonitorsResult
def get_cost_anomaly_monitors_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetCostAnomalyMonitorsFilterArgs]]]] = None,
name: Optional[pulumi.Input[str]] = None,
regions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
state: Optional[pulumi.Input[str]] = None,
target_tenant_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCostAnomalyMonitorsResult]func GetCostAnomalyMonitors(ctx *Context, args *GetCostAnomalyMonitorsArgs, opts ...InvokeOption) (*GetCostAnomalyMonitorsResult, error)
func GetCostAnomalyMonitorsOutput(ctx *Context, args *GetCostAnomalyMonitorsOutputArgs, opts ...InvokeOption) GetCostAnomalyMonitorsResultOutput> Note: This function is named GetCostAnomalyMonitors in the Go SDK.
public static class GetCostAnomalyMonitors
{
public static Task<GetCostAnomalyMonitorsResult> InvokeAsync(GetCostAnomalyMonitorsArgs args, InvokeOptions? opts = null)
public static Output<GetCostAnomalyMonitorsResult> Invoke(GetCostAnomalyMonitorsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCostAnomalyMonitorsResult> getCostAnomalyMonitors(GetCostAnomalyMonitorsArgs args, InvokeOptions options)
public static Output<GetCostAnomalyMonitorsResult> getCostAnomalyMonitors(GetCostAnomalyMonitorsArgs args, InvokeOptions options)
fn::invoke:
function: oci:Budget/getCostAnomalyMonitors:getCostAnomalyMonitors
arguments:
# arguments dictionaryThe following arguments are supported:
- Compartment
Id string - The ID of the compartment in which to list resources.
- Filters
List<Get
Cost Anomaly Monitors Filter> - Name string
- Unique, non-changeable resource name.
- Regions List<string>
- Cost Anomaly Monitor target resource filter region.
- State string
- The current state of the cost monitor.
- Target
Tenant List<string>Ids - The target tenantId ocid filter param.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Filters
[]Get
Cost Anomaly Monitors Filter - Name string
- Unique, non-changeable resource name.
- Regions []string
- Cost Anomaly Monitor target resource filter region.
- State string
- The current state of the cost monitor.
- Target
Tenant []stringIds - The target tenantId ocid filter param.
- compartment
Id String - The ID of the compartment in which to list resources.
- filters
List<Get
Cost Anomaly Monitors Filter> - name String
- Unique, non-changeable resource name.
- regions List<String>
- Cost Anomaly Monitor target resource filter region.
- state String
- The current state of the cost monitor.
- target
Tenant List<String>Ids - The target tenantId ocid filter param.
- compartment
Id string - The ID of the compartment in which to list resources.
- filters
Get
Cost Anomaly Monitors Filter[] - name string
- Unique, non-changeable resource name.
- regions string[]
- Cost Anomaly Monitor target resource filter region.
- state string
- The current state of the cost monitor.
- target
Tenant string[]Ids - The target tenantId ocid filter param.
- compartment_
id str - The ID of the compartment in which to list resources.
- filters
Sequence[Get
Cost Anomaly Monitors Filter] - name str
- Unique, non-changeable resource name.
- regions Sequence[str]
- Cost Anomaly Monitor target resource filter region.
- state str
- The current state of the cost monitor.
- target_
tenant_ Sequence[str]ids - The target tenantId ocid filter param.
- compartment
Id String - The ID of the compartment in which to list resources.
- filters List<Property Map>
- name String
- Unique, non-changeable resource name.
- regions List<String>
- Cost Anomaly Monitor target resource filter region.
- state String
- The current state of the cost monitor.
- target
Tenant List<String>Ids - The target tenantId ocid filter param.
getCostAnomalyMonitors Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment.
- Cost
Anomaly List<GetMonitor Collections Cost Anomaly Monitors Cost Anomaly Monitor Collection> - The list of cost_anomaly_monitor_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<Get
Cost Anomaly Monitors Filter> - Name string
- The name of the cost anomaly monitor. Avoid entering confidential information.
- Regions List<string>
- State string
- The current state of the cost monitor.
- Target
Tenant List<string>Ids
- Compartment
Id string - The OCID of the compartment.
- Cost
Anomaly []GetMonitor Collections Cost Anomaly Monitors Cost Anomaly Monitor Collection - The list of cost_anomaly_monitor_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Cost Anomaly Monitors Filter - Name string
- The name of the cost anomaly monitor. Avoid entering confidential information.
- Regions []string
- State string
- The current state of the cost monitor.
- Target
Tenant []stringIds
- compartment
Id String - The OCID of the compartment.
- cost
Anomaly List<GetMonitor Collections Cost Anomaly Monitors Cost Anomaly Monitor Collection> - The list of cost_anomaly_monitor_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<Get
Cost Anomaly Monitors Filter> - name String
- The name of the cost anomaly monitor. Avoid entering confidential information.
- regions List<String>
- state String
- The current state of the cost monitor.
- target
Tenant List<String>Ids
- compartment
Id string - The OCID of the compartment.
- cost
Anomaly GetMonitor Collections Cost Anomaly Monitors Cost Anomaly Monitor Collection[] - The list of cost_anomaly_monitor_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
Get
Cost Anomaly Monitors Filter[] - name string
- The name of the cost anomaly monitor. Avoid entering confidential information.
- regions string[]
- state string
- The current state of the cost monitor.
- target
Tenant string[]Ids
- compartment_
id str - The OCID of the compartment.
- cost_
anomaly_ Sequence[Getmonitor_ collections Cost Anomaly Monitors Cost Anomaly Monitor Collection] - The list of cost_anomaly_monitor_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[Get
Cost Anomaly Monitors Filter] - name str
- The name of the cost anomaly monitor. Avoid entering confidential information.
- regions Sequence[str]
- state str
- The current state of the cost monitor.
- target_
tenant_ Sequence[str]ids
- compartment
Id String - The OCID of the compartment.
- cost
Anomaly List<Property Map>Monitor Collections - The list of cost_anomaly_monitor_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
- name String
- The name of the cost anomaly monitor. Avoid entering confidential information.
- regions List<String>
- state String
- The current state of the cost monitor.
- target
Tenant List<String>Ids
Supporting Types
GetCostAnomalyMonitorsCostAnomalyMonitorCollection
GetCostAnomalyMonitorsCostAnomalyMonitorCollectionItem
- Compartment
Id string - The ID of the compartment in which to list resources.
- Cost
Alert List<GetSubscription Maps Cost Anomaly Monitors Cost Anomaly Monitor Collection Item Cost Alert Subscription Map> - The mapping of cost monitor to alert subscription along with thresholds.
- 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.
- 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.
- Lifecycle
Details string - The current state details of the cost monitor.
- Name string
- Unique, non-changeable resource name.
- State string
- The current state of the cost monitor.
- 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"} - Target
Resource stringFilter - 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 string - The time that the cost monitor was created.
- Time
Updated string - The time that the cost monitor was last updated.
- Type string
- Type of cost monitor
- Compartment
Id string - The ID of the compartment in which to list resources.
- Cost
Alert []GetSubscription Maps Cost Anomaly Monitors Cost Anomaly Monitor Collection Item Cost Alert Subscription Map - The mapping of cost monitor to alert subscription along with thresholds.
- 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.
- 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.
- Lifecycle
Details string - The current state details of the cost monitor.
- Name string
- Unique, non-changeable resource name.
- State string
- The current state of the cost monitor.
- 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"} - Target
Resource stringFilter - 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 string - The time that the cost monitor was created.
- Time
Updated string - The time that the cost monitor was last updated.
- Type string
- Type of cost monitor
- compartment
Id String - The ID of the compartment in which to list resources.
- cost
Alert List<GetSubscription Maps Cost Anomaly Monitors Cost Anomaly Monitor Collection Item Cost Alert Subscription Map> - The mapping of cost monitor to alert subscription along with thresholds.
- 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.
- 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.
- lifecycle
Details String - The current state details of the cost monitor.
- name String
- Unique, non-changeable resource name.
- state String
- The current state of the cost monitor.
- 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"} - target
Resource StringFilter - 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 String - The time that the cost monitor was created.
- time
Updated String - The time that the cost monitor was last updated.
- type String
- Type of cost monitor
- compartment
Id string - The ID of the compartment in which to list resources.
- cost
Alert GetSubscription Maps Cost Anomaly Monitors Cost Anomaly Monitor Collection Item Cost Alert Subscription Map[] - The mapping of cost monitor to alert subscription along with thresholds.
- {[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.
- {[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.
- lifecycle
Details string - The current state details of the cost monitor.
- name string
- Unique, non-changeable resource name.
- state string
- The current state of the cost monitor.
- {[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"} - target
Resource stringFilter - 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 string - The time that the cost monitor was created.
- time
Updated string - The time that the cost monitor was last updated.
- type string
- Type of cost monitor
- compartment_
id str - The ID of the compartment in which to list resources.
- cost_
alert_ Sequence[Getsubscription_ maps Cost Anomaly Monitors Cost Anomaly Monitor Collection Item Cost Alert Subscription Map] - The mapping of cost monitor to alert subscription along with thresholds.
- 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.
- 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
- Unique, non-changeable resource name.
- state str
- The current state of the cost monitor.
- 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_ strfilter - 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
- compartment
Id String - The ID of the compartment in which to list resources.
- cost
Alert List<Property Map>Subscription Maps - The mapping of cost monitor to alert subscription along with thresholds.
- 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.
- 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.
- lifecycle
Details String - The current state details of the cost monitor.
- name String
- Unique, non-changeable resource name.
- state String
- The current state of the cost monitor.
- 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"} - target
Resource StringFilter - 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 String - The time that the cost monitor was created.
- time
Updated String - The time that the cost monitor was last updated.
- type String
- Type of cost monitor
GetCostAnomalyMonitorsCostAnomalyMonitorCollectionItemCostAlertSubscriptionMap
- Cost
Alert stringSubscription Id - The costAlertSubscription ocid which the cost monitor alert maps to.
- Operator string
- The filter operator. Example: 'AND', 'OR'.
- Threshold
Absolute intValue - The absolute threshold value.
- Threshold
Relative intPercent - The relative percentage threshold value.
- Cost
Alert stringSubscription Id - The costAlertSubscription ocid which the cost monitor alert maps to.
- Operator string
- The filter operator. Example: 'AND', 'OR'.
- Threshold
Absolute intValue - The absolute threshold value.
- Threshold
Relative intPercent - The relative percentage threshold value.
- cost
Alert StringSubscription Id - The costAlertSubscription ocid which the cost monitor alert maps to.
- operator String
- The filter operator. Example: 'AND', 'OR'.
- threshold
Absolute IntegerValue - The absolute threshold value.
- threshold
Relative IntegerPercent - The relative percentage threshold value.
- cost
Alert stringSubscription Id - The costAlertSubscription ocid which the cost monitor alert maps to.
- operator string
- The filter operator. Example: 'AND', 'OR'.
- threshold
Absolute numberValue - The absolute threshold value.
- threshold
Relative numberPercent - The relative percentage threshold value.
- cost_
alert_ strsubscription_ id - The costAlertSubscription ocid which the cost monitor alert maps to.
- operator str
- The filter operator. Example: 'AND', 'OR'.
- threshold_
absolute_ intvalue - The absolute threshold value.
- threshold_
relative_ intpercent - The relative percentage threshold value.
- cost
Alert StringSubscription Id - The costAlertSubscription ocid which the cost monitor alert maps to.
- operator String
- The filter operator. Example: 'AND', 'OR'.
- threshold
Absolute NumberValue - The absolute threshold value.
- threshold
Relative NumberPercent - The relative percentage threshold value.
GetCostAnomalyMonitorsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
Oracle Cloud Infrastructure v3.16.0 published on Wednesday, Jan 28, 2026 by Pulumi
