published on Wednesday, Jun 17, 2026 by Pulumi
published on Wednesday, Jun 17, 2026 by Pulumi
This resource provides the Cost Anomaly Monitor resource in Oracle Cloud Infrastructure Costad service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/
Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/costad
Creates a new costAnomaly Monitor.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCostAnomalyMonitor = new oci.oci.CostadCostAnomalyMonitor("test_cost_anomaly_monitor", {
compartmentId: compartmentId,
name: costAnomalyMonitorName,
targetResourceFilter: costAnomalyMonitorTargetResourceFilter,
costAlertSubscriptionMap: {
costAlertSubscriptionId: testCostAlertSubscription.id,
operator: costAnomalyMonitorCostAlertSubscriptionMapOperator,
thresholdAbsoluteValue: Number(costAnomalyMonitorCostAlertSubscriptionMapThresholdAbsoluteValue),
thresholdRelativePercent: Number(costAnomalyMonitorCostAlertSubscriptionMapThresholdRelativePercent),
},
definedTags: {
"Operations.CostCenter": "42",
},
description: costAnomalyMonitorDescription,
freeformTags: {
Department: "Finance",
},
});
import pulumi
import pulumi_oci as oci
test_cost_anomaly_monitor = oci.oci.CostadCostAnomalyMonitor("test_cost_anomaly_monitor",
compartment_id=compartment_id,
name=cost_anomaly_monitor_name,
target_resource_filter=cost_anomaly_monitor_target_resource_filter,
cost_alert_subscription_map={
"cost_alert_subscription_id": test_cost_alert_subscription["id"],
"operator": cost_anomaly_monitor_cost_alert_subscription_map_operator,
"threshold_absolute_value": int(cost_anomaly_monitor_cost_alert_subscription_map_threshold_absolute_value),
"threshold_relative_percent": int(cost_anomaly_monitor_cost_alert_subscription_map_threshold_relative_percent),
},
defined_tags={
"Operations.CostCenter": "42",
},
description=cost_anomaly_monitor_description,
freeform_tags={
"Department": "Finance",
})
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/oci"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := oci.NewCostadCostAnomalyMonitor(ctx, "test_cost_anomaly_monitor", &oci.CostadCostAnomalyMonitorArgs{
CompartmentId: pulumi.Any(compartmentId),
Name: pulumi.Any(costAnomalyMonitorName),
TargetResourceFilter: pulumi.Any(costAnomalyMonitorTargetResourceFilter),
CostAlertSubscriptionMap: &oci.CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs{
CostAlertSubscriptionId: pulumi.Any(testCostAlertSubscription.Id),
Operator: pulumi.Any(costAnomalyMonitorCostAlertSubscriptionMapOperator),
ThresholdAbsoluteValue: pulumi.Any(costAnomalyMonitorCostAlertSubscriptionMapThresholdAbsoluteValue),
ThresholdRelativePercent: pulumi.Any(costAnomalyMonitorCostAlertSubscriptionMapThresholdRelativePercent),
},
DefinedTags: pulumi.StringMap{
"Operations.CostCenter": pulumi.String("42"),
},
Description: pulumi.Any(costAnomalyMonitorDescription),
FreeformTags: pulumi.StringMap{
"Department": pulumi.String("Finance"),
},
})
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 = new Oci.Oci.CostadCostAnomalyMonitor("test_cost_anomaly_monitor", new()
{
CompartmentId = compartmentId,
Name = costAnomalyMonitorName,
TargetResourceFilter = costAnomalyMonitorTargetResourceFilter,
CostAlertSubscriptionMap = new Oci.Oci.Inputs.CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs
{
CostAlertSubscriptionId = testCostAlertSubscription.Id,
Operator = costAnomalyMonitorCostAlertSubscriptionMapOperator,
ThresholdAbsoluteValue = costAnomalyMonitorCostAlertSubscriptionMapThresholdAbsoluteValue,
ThresholdRelativePercent = costAnomalyMonitorCostAlertSubscriptionMapThresholdRelativePercent,
},
DefinedTags =
{
{ "Operations.CostCenter", "42" },
},
Description = costAnomalyMonitorDescription,
FreeformTags =
{
{ "Department", "Finance" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.oci.CostadCostAnomalyMonitor;
import com.pulumi.oci.oci.CostadCostAnomalyMonitorArgs;
import com.pulumi.oci.oci.inputs.CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
var testCostAnomalyMonitor = new CostadCostAnomalyMonitor("testCostAnomalyMonitor", CostadCostAnomalyMonitorArgs.builder()
.compartmentId(compartmentId)
.name(costAnomalyMonitorName)
.targetResourceFilter(costAnomalyMonitorTargetResourceFilter)
.costAlertSubscriptionMap(CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs.builder()
.costAlertSubscriptionId(testCostAlertSubscription.id())
.operator(costAnomalyMonitorCostAlertSubscriptionMapOperator)
.thresholdAbsoluteValue(costAnomalyMonitorCostAlertSubscriptionMapThresholdAbsoluteValue)
.thresholdRelativePercent(costAnomalyMonitorCostAlertSubscriptionMapThresholdRelativePercent)
.build())
.definedTags(Map.of("Operations.CostCenter", "42"))
.description(costAnomalyMonitorDescription)
.freeformTags(Map.of("Department", "Finance"))
.build());
}
}
resources:
testCostAnomalyMonitor:
type: oci:oci:CostadCostAnomalyMonitor
name: test_cost_anomaly_monitor
properties:
compartmentId: ${compartmentId}
name: ${costAnomalyMonitorName}
targetResourceFilter: ${costAnomalyMonitorTargetResourceFilter}
costAlertSubscriptionMap:
costAlertSubscriptionId: ${testCostAlertSubscription.id}
operator: ${costAnomalyMonitorCostAlertSubscriptionMapOperator}
thresholdAbsoluteValue: ${costAnomalyMonitorCostAlertSubscriptionMapThresholdAbsoluteValue}
thresholdRelativePercent: ${costAnomalyMonitorCostAlertSubscriptionMapThresholdRelativePercent}
definedTags:
Operations.CostCenter: '42'
description: ${costAnomalyMonitorDescription}
freeformTags:
Department: Finance
pulumi {
required_providers {
oci = {
source = "pulumi/oci"
}
}
}
resource "oci_oci_costadcostanomalymonitor" "test_cost_anomaly_monitor" {
compartment_id = compartmentId
name = costAnomalyMonitorName
target_resource_filter = costAnomalyMonitorTargetResourceFilter
cost_alert_subscription_map = {
cost_alert_subscription_id = testCostAlertSubscription.id
operator = costAnomalyMonitorCostAlertSubscriptionMapOperator
threshold_absolute_value = costAnomalyMonitorCostAlertSubscriptionMapThresholdAbsoluteValue
threshold_relative_percent = costAnomalyMonitorCostAlertSubscriptionMapThresholdRelativePercent
}
#Optional
defined_tags = {
"Operations.CostCenter" = "42"
}
description = costAnomalyMonitorDescription
freeform_tags = {
"Department" = "Finance"
}
}
Create CostadCostAnomalyMonitor Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CostadCostAnomalyMonitor(name: string, args: CostadCostAnomalyMonitorArgs, opts?: CustomResourceOptions);@overload
def CostadCostAnomalyMonitor(resource_name: str,
args: CostadCostAnomalyMonitorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CostadCostAnomalyMonitor(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
target_resource_filter: Optional[str] = None,
cost_alert_subscription_map: Optional[CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
name: Optional[str] = None)func NewCostadCostAnomalyMonitor(ctx *Context, name string, args CostadCostAnomalyMonitorArgs, opts ...ResourceOption) (*CostadCostAnomalyMonitor, error)public CostadCostAnomalyMonitor(string name, CostadCostAnomalyMonitorArgs args, CustomResourceOptions? opts = null)
public CostadCostAnomalyMonitor(String name, CostadCostAnomalyMonitorArgs args)
public CostadCostAnomalyMonitor(String name, CostadCostAnomalyMonitorArgs args, CustomResourceOptions options)
type: oci:oci:CostadCostAnomalyMonitor
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "oci_oci_costadcostanomalymonitor" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args CostadCostAnomalyMonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CostadCostAnomalyMonitorArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CostadCostAnomalyMonitorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CostadCostAnomalyMonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CostadCostAnomalyMonitorArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var costadCostAnomalyMonitorResource = new Oci.Oci.CostadCostAnomalyMonitor("costadCostAnomalyMonitorResource", new()
{
CompartmentId = "string",
TargetResourceFilter = "string",
CostAlertSubscriptionMap = new Oci.Oci.Inputs.CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs
{
CostAlertSubscriptionId = "string",
Operator = "string",
ThresholdAbsoluteValue = 0,
ThresholdRelativePercent = 0,
},
DefinedTags =
{
{ "string", "string" },
},
Description = "string",
FreeformTags =
{
{ "string", "string" },
},
Name = "string",
});
example, err := oci.NewCostadCostAnomalyMonitor(ctx, "costadCostAnomalyMonitorResource", &oci.CostadCostAnomalyMonitorArgs{
CompartmentId: pulumi.String("string"),
TargetResourceFilter: pulumi.String("string"),
CostAlertSubscriptionMap: &oci.CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs{
CostAlertSubscriptionId: pulumi.String("string"),
Operator: pulumi.String("string"),
ThresholdAbsoluteValue: pulumi.Int(0),
ThresholdRelativePercent: pulumi.Int(0),
},
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
resource "oci_oci_costadcostanomalymonitor" "costadCostAnomalyMonitorResource" {
compartment_id = "string"
target_resource_filter = "string"
cost_alert_subscription_map = {
cost_alert_subscription_id = "string"
operator = "string"
threshold_absolute_value = 0
threshold_relative_percent = 0
}
defined_tags = {
"string" = "string"
}
description = "string"
freeform_tags = {
"string" = "string"
}
name = "string"
}
var costadCostAnomalyMonitorResource = new CostadCostAnomalyMonitor("costadCostAnomalyMonitorResource", CostadCostAnomalyMonitorArgs.builder()
.compartmentId("string")
.targetResourceFilter("string")
.costAlertSubscriptionMap(CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs.builder()
.costAlertSubscriptionId("string")
.operator("string")
.thresholdAbsoluteValue(0)
.thresholdRelativePercent(0)
.build())
.definedTags(Map.of("string", "string"))
.description("string")
.freeformTags(Map.of("string", "string"))
.name("string")
.build());
costad_cost_anomaly_monitor_resource = oci.oci.CostadCostAnomalyMonitor("costadCostAnomalyMonitorResource",
compartment_id="string",
target_resource_filter="string",
cost_alert_subscription_map={
"cost_alert_subscription_id": "string",
"operator": "string",
"threshold_absolute_value": 0,
"threshold_relative_percent": 0,
},
defined_tags={
"string": "string",
},
description="string",
freeform_tags={
"string": "string",
},
name="string")
const costadCostAnomalyMonitorResource = new oci.oci.CostadCostAnomalyMonitor("costadCostAnomalyMonitorResource", {
compartmentId: "string",
targetResourceFilter: "string",
costAlertSubscriptionMap: {
costAlertSubscriptionId: "string",
operator: "string",
thresholdAbsoluteValue: 0,
thresholdRelativePercent: 0,
},
definedTags: {
string: "string",
},
description: "string",
freeformTags: {
string: "string",
},
name: "string",
});
type: oci:oci:CostadCostAnomalyMonitor
properties:
compartmentId: string
costAlertSubscriptionMap:
costAlertSubscriptionId: string
operator: string
thresholdAbsoluteValue: 0
thresholdRelativePercent: 0
definedTags:
string: string
description: string
freeformTags:
string: string
name: string
targetResourceFilter: string
CostadCostAnomalyMonitor Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CostadCostAnomalyMonitor resource accepts the following input properties:
- Compartment
Id string - The OCID of the compartment.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Cost
Alert CostadSubscription Map Cost Anomaly Monitor Cost Alert Subscription Map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- Dictionary<string, string>
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- Dictionary<string, string>
- (Updatable) 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"} - Name string
- The name of the cost anomaly monitor. Avoid entering confidential information.
- Compartment
Id string - The OCID of the compartment.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Cost
Alert CostadSubscription Map Cost Anomaly Monitor Cost Alert Subscription Map Args - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- map[string]string
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- map[string]string
- (Updatable) 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"} - Name string
- The name of the cost anomaly monitor. Avoid entering confidential information.
- compartment_
id string - The OCID of the compartment.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- cost_
alert_ objectsubscription_ map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- map(string)
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- map(string)
- (Updatable) 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"} - name string
- The name of the cost anomaly monitor. Avoid entering confidential information.
- compartment
Id String - The OCID of the compartment.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- cost
Alert CostadSubscription Map Cost Anomaly Monitor Cost Alert Subscription Map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- Map<String,String>
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- Map<String,String>
- (Updatable) 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"} - name String
- The name of the cost anomaly monitor. Avoid entering confidential information.
- compartment
Id string - The OCID of the compartment.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- cost
Alert CostadSubscription Map Cost Anomaly Monitor Cost Alert Subscription Map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- {[key: string]: string}
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- {[key: string]: string}
- (Updatable) 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"} - name string
- The name of the cost anomaly monitor. Avoid entering confidential information.
- compartment_
id str - The OCID of the compartment.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- cost_
alert_ Costadsubscription_ map Cost Anomaly Monitor Cost Alert Subscription Map Args - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- Mapping[str, str]
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- Mapping[str, str]
- (Updatable) 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"} - name str
- The name of the cost anomaly monitor. Avoid entering confidential information.
- compartment
Id String - The OCID of the compartment.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- cost
Alert Property MapSubscription Map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- Map<String>
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- Map<String>
- (Updatable) 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"} - name String
- The name of the cost anomaly monitor. Avoid entering confidential information.
Outputs
All input properties are implicitly available as output properties. Additionally, the CostadCostAnomalyMonitor resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details string - The current state details of the cost monitor.
- 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"} - 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
- Id string
- The provider-assigned unique ID for this managed resource.
- Lifecycle
Details string - The current state details of the cost monitor.
- 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"} - 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
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle_
details string - The current state details of the cost monitor.
- 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"} - 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
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details String - The current state details of the cost monitor.
- 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"} - 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
- id string
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details string - The current state details of the cost monitor.
- 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"} - 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
- id str
- The provider-assigned unique ID for this managed resource.
- lifecycle_
details str - The current state details of the cost monitor.
- 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"} - 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
- id String
- The provider-assigned unique ID for this managed resource.
- lifecycle
Details String - The current state details of the cost monitor.
- 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"} - 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
Look up Existing CostadCostAnomalyMonitor Resource
Get an existing CostadCostAnomalyMonitor resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CostadCostAnomalyMonitorState, opts?: CustomResourceOptions): CostadCostAnomalyMonitor@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
cost_alert_subscription_map: Optional[CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
lifecycle_details: Optional[str] = None,
name: Optional[str] = None,
state: Optional[str] = None,
system_tags: Optional[Mapping[str, str]] = None,
target_resource_filter: Optional[str] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None,
type: Optional[str] = None) -> CostadCostAnomalyMonitorfunc GetCostadCostAnomalyMonitor(ctx *Context, name string, id IDInput, state *CostadCostAnomalyMonitorState, opts ...ResourceOption) (*CostadCostAnomalyMonitor, error)public static CostadCostAnomalyMonitor Get(string name, Input<string> id, CostadCostAnomalyMonitorState? state, CustomResourceOptions? opts = null)public static CostadCostAnomalyMonitor get(String name, Output<String> id, CostadCostAnomalyMonitorState state, CustomResourceOptions options)resources: _: type: oci:oci:CostadCostAnomalyMonitor get: id: ${id}import {
to = oci_oci_costadcostanomalymonitor.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Compartment
Id string - The OCID of the compartment.
- Cost
Alert CostadSubscription Map Cost Anomaly Monitor Cost Alert Subscription Map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- Dictionary<string, string>
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- Dictionary<string, string>
- (Updatable) 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"} - Lifecycle
Details 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.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- 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 OCID of the compartment.
- Cost
Alert CostadSubscription Map Cost Anomaly Monitor Cost Alert Subscription Map Args - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- map[string]string
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- map[string]string
- (Updatable) 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"} - Lifecycle
Details 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.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- 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 OCID of the compartment.
- cost_
alert_ objectsubscription_ map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- map(string)
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- map(string)
- (Updatable) 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"} - lifecycle_
details 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.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- 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 OCID of the compartment.
- cost
Alert CostadSubscription Map Cost Anomaly Monitor Cost Alert Subscription Map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- Map<String,String>
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- Map<String,String>
- (Updatable) 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"} - lifecycle
Details 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.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- 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 OCID of the compartment.
- cost
Alert CostadSubscription Map Cost Anomaly Monitor Cost Alert Subscription Map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- {[key: string]: string}
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- {[key: string]: string}
- (Updatable) 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"} - lifecycle
Details 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.
- {[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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- 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 OCID of the compartment.
- cost_
alert_ Costadsubscription_ map Cost Anomaly Monitor Cost Alert Subscription Map Args - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- Mapping[str, str]
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- Mapping[str, str]
- (Updatable) 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"} - 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.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- 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 OCID of the compartment.
- cost
Alert Property MapSubscription Map - (Updatable) The mapping of cost monitor to alert subscription along with thresholds.
- Map<String>
- (Updatable) 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
- (Updatable) The description of the cost anomaly monitor.
- Map<String>
- (Updatable) 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"} - lifecycle
Details 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.
- 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- 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
Supporting Types
CostadCostAnomalyMonitorCostAlertSubscriptionMap, CostadCostAnomalyMonitorCostAlertSubscriptionMapArgs
- Cost
Alert stringSubscription Id - (Updatable) The costAlertSubscription ocid which the cost monitor alert maps to.
- Operator string
- (Updatable) The filter operator. Example: 'AND', 'OR'.
- Threshold
Absolute intValue - (Updatable) The absolute threshold value.
- Threshold
Relative intPercent - (Updatable) The relative percentage threshold value.
- Cost
Alert stringSubscription Id - (Updatable) The costAlertSubscription ocid which the cost monitor alert maps to.
- Operator string
- (Updatable) The filter operator. Example: 'AND', 'OR'.
- Threshold
Absolute intValue - (Updatable) The absolute threshold value.
- Threshold
Relative intPercent - (Updatable) The relative percentage threshold value.
- cost_
alert_ stringsubscription_ id - (Updatable) The costAlertSubscription ocid which the cost monitor alert maps to.
- operator string
- (Updatable) The filter operator. Example: 'AND', 'OR'.
- threshold_
absolute_ numbervalue - (Updatable) The absolute threshold value.
- threshold_
relative_ numberpercent - (Updatable) The relative percentage threshold value.
- cost
Alert StringSubscription Id - (Updatable) The costAlertSubscription ocid which the cost monitor alert maps to.
- operator String
- (Updatable) The filter operator. Example: 'AND', 'OR'.
- threshold
Absolute IntegerValue - (Updatable) The absolute threshold value.
- threshold
Relative IntegerPercent - (Updatable) The relative percentage threshold value.
- cost
Alert stringSubscription Id - (Updatable) The costAlertSubscription ocid which the cost monitor alert maps to.
- operator string
- (Updatable) The filter operator. Example: 'AND', 'OR'.
- threshold
Absolute numberValue - (Updatable) The absolute threshold value.
- threshold
Relative numberPercent - (Updatable) The relative percentage threshold value.
- cost_
alert_ strsubscription_ id - (Updatable) The costAlertSubscription ocid which the cost monitor alert maps to.
- operator str
- (Updatable) The filter operator. Example: 'AND', 'OR'.
- threshold_
absolute_ intvalue - (Updatable) The absolute threshold value.
- threshold_
relative_ intpercent - (Updatable) The relative percentage threshold value.
- cost
Alert StringSubscription Id - (Updatable) The costAlertSubscription ocid which the cost monitor alert maps to.
- operator String
- (Updatable) The filter operator. Example: 'AND', 'OR'.
- threshold
Absolute NumberValue - (Updatable) The absolute threshold value.
- threshold
Relative NumberPercent - (Updatable) The relative percentage threshold value.
Import
CostAnomalyMonitors can be imported using the id, e.g.
$ pulumi import oci:oci/costadCostAnomalyMonitor:CostadCostAnomalyMonitor test_cost_anomaly_monitor "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
published on Wednesday, Jun 17, 2026 by Pulumi