1. Packages
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. oci
  6. CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement
Viewing docs for Oracle Cloud Infrastructure v4.16.0
published on Wednesday, Jun 17, 2026 by Pulumi
oci logo
Viewing docs for Oracle Cloud Infrastructure v4.16.0
published on Wednesday, Jun 17, 2026 by Pulumi

    This resource provides the Cost Anomaly Monitor Costanomalymonitorenabletoggles Management resource in Oracle Cloud Infrastructure Costad service.

    Enables the cost anomaly monitor. This (re)starts the cost anomaly detection for targeted resource(s). 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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testCostAnomalyMonitorCostanomalymonitorenabletogglesManagement = new oci.oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement("test_cost_anomaly_monitor_costanomalymonitorenabletoggles_management", {
        costAnomalyMonitorId: testCostAnomalyMonitor.id,
        enableCostanomalymonitorenabletoggle: enableCostanomalymonitorenabletoggle === "true",
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_cost_anomaly_monitor_costanomalymonitorenabletoggles_management = oci.oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement("test_cost_anomaly_monitor_costanomalymonitorenabletoggles_management",
        cost_anomaly_monitor_id=test_cost_anomaly_monitor["id"],
        enable_costanomalymonitorenabletoggle=enable_costanomalymonitorenabletoggle == "true")
    
    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.NewCostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(ctx, "test_cost_anomaly_monitor_costanomalymonitorenabletoggles_management", &oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs{
    			CostAnomalyMonitorId:                 pulumi.Any(testCostAnomalyMonitor.Id),
    			EnableCostanomalymonitorenabletoggle: pulumi.Any(enableCostanomalymonitorenabletoggle),
    		})
    		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 testCostAnomalyMonitorCostanomalymonitorenabletogglesManagement = new Oci.Oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement("test_cost_anomaly_monitor_costanomalymonitorenabletoggles_management", new()
        {
            CostAnomalyMonitorId = testCostAnomalyMonitor.Id,
            EnableCostanomalymonitorenabletoggle = enableCostanomalymonitorenabletoggle,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement;
    import com.pulumi.oci.oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs;
    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 testCostAnomalyMonitorCostanomalymonitorenabletogglesManagement = new CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement("testCostAnomalyMonitorCostanomalymonitorenabletogglesManagement", CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs.builder()
                .costAnomalyMonitorId(testCostAnomalyMonitor.id())
                .enableCostanomalymonitorenabletoggle(enableCostanomalymonitorenabletoggle)
                .build());
    
        }
    }
    
    resources:
      testCostAnomalyMonitorCostanomalymonitorenabletogglesManagement:
        type: oci:oci:CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement
        name: test_cost_anomaly_monitor_costanomalymonitorenabletoggles_management
        properties:
          costAnomalyMonitorId: ${testCostAnomalyMonitor.id}
          enableCostanomalymonitorenabletoggle: ${enableCostanomalymonitorenabletoggle}
    
    pulumi {
      required_providers {
        oci = {
          source = "pulumi/oci"
        }
      }
    }
    
    resource "oci_oci_costadcostanomalymonitorcostanomalymonitorenabletogglesmanagement" "test_cost_anomaly_monitor_costanomalymonitorenabletoggles_management" {
      cost_anomaly_monitor_id               = testCostAnomalyMonitor.id
      enable_costanomalymonitorenabletoggle = enableCostanomalymonitorenabletoggle
    }
    

    Create CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(name: string, args: CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs, opts?: CustomResourceOptions);
    @overload
    def CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(resource_name: str,
                                                                          args: CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs,
                                                                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(resource_name: str,
                                                                          opts: Optional[ResourceOptions] = None,
                                                                          cost_anomaly_monitor_id: Optional[str] = None,
                                                                          enable_costanomalymonitorenabletoggle: Optional[bool] = None)
    func NewCostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(ctx *Context, name string, args CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs, opts ...ResourceOption) (*CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement, error)
    public CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(string name, CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs args, CustomResourceOptions? opts = null)
    public CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(String name, CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs args)
    public CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(String name, CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs args, CustomResourceOptions options)
    
    type: oci:oci:CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "oci_oci_costadcostanomalymonitorcostanomalymonitorenabletogglesmanagement" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs
    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 CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs
    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 CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs
    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 costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource = new Oci.Oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement("costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource", new()
    {
        CostAnomalyMonitorId = "string",
        EnableCostanomalymonitorenabletoggle = false,
    });
    
    example, err := oci.NewCostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(ctx, "costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource", &oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs{
    	CostAnomalyMonitorId:                 pulumi.String("string"),
    	EnableCostanomalymonitorenabletoggle: pulumi.Bool(false),
    })
    
    resource "oci_oci_costadcostanomalymonitorcostanomalymonitorenabletogglesmanagement" "costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource" {
      cost_anomaly_monitor_id               = "string"
      enable_costanomalymonitorenabletoggle = false
    }
    
    var costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource = new CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement("costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource", CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementArgs.builder()
        .costAnomalyMonitorId("string")
        .enableCostanomalymonitorenabletoggle(false)
        .build());
    
    costad_cost_anomaly_monitor_costanomalymonitorenabletoggles_management_resource = oci.oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement("costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource",
        cost_anomaly_monitor_id="string",
        enable_costanomalymonitorenabletoggle=False)
    
    const costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource = new oci.oci.CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement("costadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementResource", {
        costAnomalyMonitorId: "string",
        enableCostanomalymonitorenabletoggle: false,
    });
    
    type: oci:oci:CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement
    properties:
        costAnomalyMonitorId: string
        enableCostanomalymonitorenabletoggle: false
    

    CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement 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 CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement resource accepts the following input properties:

    CostAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    EnableCostanomalymonitorenabletoggle bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    CostAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    EnableCostanomalymonitorenabletoggle bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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_anomaly_monitor_id string
    The unique costAnomalyMonitor OCID.
    enable_costanomalymonitorenabletoggle bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    costAnomalyMonitorId String
    The unique costAnomalyMonitor OCID.
    enableCostanomalymonitorenabletoggle Boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    costAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    enableCostanomalymonitorenabletoggle boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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_anomaly_monitor_id str
    The unique costAnomalyMonitor OCID.
    enable_costanomalymonitorenabletoggle bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    costAnomalyMonitorId String
    The unique costAnomalyMonitor OCID.
    enableCostanomalymonitorenabletoggle Boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement Resource

    Get an existing CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement 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?: CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementState, opts?: CustomResourceOptions): CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cost_anomaly_monitor_id: Optional[str] = None,
            enable_costanomalymonitorenabletoggle: Optional[bool] = None) -> CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement
    func GetCostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement(ctx *Context, name string, id IDInput, state *CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementState, opts ...ResourceOption) (*CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement, error)
    public static CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement Get(string name, Input<string> id, CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementState? state, CustomResourceOptions? opts = null)
    public static CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement get(String name, Output<String> id, CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagementState state, CustomResourceOptions options)
    resources:  _:    type: oci:oci:CostadCostAnomalyMonitorCostanomalymonitorenabletogglesManagement    get:      id: ${id}
    import {
      to = oci_oci_costadcostanomalymonitorcostanomalymonitorenabletogglesmanagement.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.
    The following state arguments are supported:
    CostAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    EnableCostanomalymonitorenabletoggle bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    CostAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    EnableCostanomalymonitorenabletoggle bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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_anomaly_monitor_id string
    The unique costAnomalyMonitor OCID.
    enable_costanomalymonitorenabletoggle bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    costAnomalyMonitorId String
    The unique costAnomalyMonitor OCID.
    enableCostanomalymonitorenabletoggle Boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    costAnomalyMonitorId string
    The unique costAnomalyMonitor OCID.
    enableCostanomalymonitorenabletoggle boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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_anomaly_monitor_id str
    The unique costAnomalyMonitor OCID.
    enable_costanomalymonitorenabletoggle bool

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    costAnomalyMonitorId String
    The unique costAnomalyMonitor OCID.
    enableCostanomalymonitorenabletoggle Boolean

    (Updatable) A required field when set to true calls enable action and when set to false calls disable action.

    ** 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

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Viewing docs for Oracle Cloud Infrastructure v4.16.0
    published on Wednesday, Jun 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial