1. Packages
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. DemandSignal
  6. OccMetricAlarm
Viewing docs for Oracle Cloud Infrastructure v4.9.0
published on Thursday, Apr 30, 2026 by Pulumi
oci logo
Viewing docs for Oracle Cloud Infrastructure v4.9.0
published on Thursday, Apr 30, 2026 by Pulumi

    This resource provides the Occ Metric Alarm resource in Oracle Cloud Infrastructure Demand Signal service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/occds/latest/OccMetricAlarm

    Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/demand_signal

    Creates a new OccMetricAlarm resource in the specified compartment with the provided configuration details.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testOccMetricAlarm = new oci.demandsignal.OccMetricAlarm("test_occ_metric_alarm", {
        compartmentId: compartmentId,
        displayName: occMetricAlarmDisplayName,
        frequency: occMetricAlarmFrequency,
        isActive: occMetricAlarmIsActive,
        resourceConfiguration: {
            resource: occMetricAlarmResourceConfigurationResource,
            usageType: occMetricAlarmResourceConfigurationUsageType,
            computeHwGeneration: occMetricAlarmResourceConfigurationComputeHwGeneration,
            hwGeneration: occMetricAlarmResourceConfigurationHwGeneration,
            linkRole: occMetricAlarmResourceConfigurationLinkRole,
            nodeType: occMetricAlarmResourceConfigurationNodeType,
            occMetricAlarmProvider: occMetricAlarmResourceConfigurationOccMetricAlarmProvider,
            shape: occMetricAlarmResourceConfigurationShape,
            storageType: occMetricAlarmResourceConfigurationStorageType,
        },
        threshold: occMetricAlarmThreshold,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        description: occMetricAlarmDescription,
        freeformTags: {
            Department: "Finance",
        },
        state: occMetricAlarmState,
        subscribers: occMetricAlarmSubscribers,
        thresholdType: occMetricAlarmThresholdType,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_occ_metric_alarm = oci.demandsignal.OccMetricAlarm("test_occ_metric_alarm",
        compartment_id=compartment_id,
        display_name=occ_metric_alarm_display_name,
        frequency=occ_metric_alarm_frequency,
        is_active=occ_metric_alarm_is_active,
        resource_configuration={
            "resource": occ_metric_alarm_resource_configuration_resource,
            "usage_type": occ_metric_alarm_resource_configuration_usage_type,
            "compute_hw_generation": occ_metric_alarm_resource_configuration_compute_hw_generation,
            "hw_generation": occ_metric_alarm_resource_configuration_hw_generation,
            "link_role": occ_metric_alarm_resource_configuration_link_role,
            "node_type": occ_metric_alarm_resource_configuration_node_type,
            "occ_metric_alarm_provider": occ_metric_alarm_resource_configuration_occ_metric_alarm_provider,
            "shape": occ_metric_alarm_resource_configuration_shape,
            "storage_type": occ_metric_alarm_resource_configuration_storage_type,
        },
        threshold=occ_metric_alarm_threshold,
        defined_tags={
            "Operations.CostCenter": "42",
        },
        description=occ_metric_alarm_description,
        freeform_tags={
            "Department": "Finance",
        },
        state=occ_metric_alarm_state,
        subscribers=occ_metric_alarm_subscribers,
        threshold_type=occ_metric_alarm_threshold_type)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/demandsignal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := demandsignal.NewOccMetricAlarm(ctx, "test_occ_metric_alarm", &demandsignal.OccMetricAlarmArgs{
    			CompartmentId: pulumi.Any(compartmentId),
    			DisplayName:   pulumi.Any(occMetricAlarmDisplayName),
    			Frequency:     pulumi.Any(occMetricAlarmFrequency),
    			IsActive:      pulumi.Any(occMetricAlarmIsActive),
    			ResourceConfiguration: &demandsignal.OccMetricAlarmResourceConfigurationArgs{
    				Resource:               pulumi.Any(occMetricAlarmResourceConfigurationResource),
    				UsageType:              pulumi.Any(occMetricAlarmResourceConfigurationUsageType),
    				ComputeHwGeneration:    pulumi.Any(occMetricAlarmResourceConfigurationComputeHwGeneration),
    				HwGeneration:           pulumi.Any(occMetricAlarmResourceConfigurationHwGeneration),
    				LinkRole:               pulumi.Any(occMetricAlarmResourceConfigurationLinkRole),
    				NodeType:               pulumi.Any(occMetricAlarmResourceConfigurationNodeType),
    				OccMetricAlarmProvider: pulumi.Any(occMetricAlarmResourceConfigurationOccMetricAlarmProvider),
    				Shape:                  pulumi.Any(occMetricAlarmResourceConfigurationShape),
    				StorageType:            pulumi.Any(occMetricAlarmResourceConfigurationStorageType),
    			},
    			Threshold: pulumi.Any(occMetricAlarmThreshold),
    			DefinedTags: pulumi.StringMap{
    				"Operations.CostCenter": pulumi.String("42"),
    			},
    			Description: pulumi.Any(occMetricAlarmDescription),
    			FreeformTags: pulumi.StringMap{
    				"Department": pulumi.String("Finance"),
    			},
    			State:         pulumi.Any(occMetricAlarmState),
    			Subscribers:   pulumi.Any(occMetricAlarmSubscribers),
    			ThresholdType: pulumi.Any(occMetricAlarmThresholdType),
    		})
    		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 testOccMetricAlarm = new Oci.DemandSignal.OccMetricAlarm("test_occ_metric_alarm", new()
        {
            CompartmentId = compartmentId,
            DisplayName = occMetricAlarmDisplayName,
            Frequency = occMetricAlarmFrequency,
            IsActive = occMetricAlarmIsActive,
            ResourceConfiguration = new Oci.DemandSignal.Inputs.OccMetricAlarmResourceConfigurationArgs
            {
                Resource = occMetricAlarmResourceConfigurationResource,
                UsageType = occMetricAlarmResourceConfigurationUsageType,
                ComputeHwGeneration = occMetricAlarmResourceConfigurationComputeHwGeneration,
                HwGeneration = occMetricAlarmResourceConfigurationHwGeneration,
                LinkRole = occMetricAlarmResourceConfigurationLinkRole,
                NodeType = occMetricAlarmResourceConfigurationNodeType,
                OccMetricAlarmProvider = occMetricAlarmResourceConfigurationOccMetricAlarmProvider,
                Shape = occMetricAlarmResourceConfigurationShape,
                StorageType = occMetricAlarmResourceConfigurationStorageType,
            },
            Threshold = occMetricAlarmThreshold,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            Description = occMetricAlarmDescription,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            State = occMetricAlarmState,
            Subscribers = occMetricAlarmSubscribers,
            ThresholdType = occMetricAlarmThresholdType,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DemandSignal.OccMetricAlarm;
    import com.pulumi.oci.DemandSignal.OccMetricAlarmArgs;
    import com.pulumi.oci.DemandSignal.inputs.OccMetricAlarmResourceConfigurationArgs;
    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) {
            var testOccMetricAlarm = new OccMetricAlarm("testOccMetricAlarm", OccMetricAlarmArgs.builder()
                .compartmentId(compartmentId)
                .displayName(occMetricAlarmDisplayName)
                .frequency(occMetricAlarmFrequency)
                .isActive(occMetricAlarmIsActive)
                .resourceConfiguration(OccMetricAlarmResourceConfigurationArgs.builder()
                    .resource(occMetricAlarmResourceConfigurationResource)
                    .usageType(occMetricAlarmResourceConfigurationUsageType)
                    .computeHwGeneration(occMetricAlarmResourceConfigurationComputeHwGeneration)
                    .hwGeneration(occMetricAlarmResourceConfigurationHwGeneration)
                    .linkRole(occMetricAlarmResourceConfigurationLinkRole)
                    .nodeType(occMetricAlarmResourceConfigurationNodeType)
                    .occMetricAlarmProvider(occMetricAlarmResourceConfigurationOccMetricAlarmProvider)
                    .shape(occMetricAlarmResourceConfigurationShape)
                    .storageType(occMetricAlarmResourceConfigurationStorageType)
                    .build())
                .threshold(occMetricAlarmThreshold)
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .description(occMetricAlarmDescription)
                .freeformTags(Map.of("Department", "Finance"))
                .state(occMetricAlarmState)
                .subscribers(occMetricAlarmSubscribers)
                .thresholdType(occMetricAlarmThresholdType)
                .build());
    
        }
    }
    
    resources:
      testOccMetricAlarm:
        type: oci:DemandSignal:OccMetricAlarm
        name: test_occ_metric_alarm
        properties:
          compartmentId: ${compartmentId}
          displayName: ${occMetricAlarmDisplayName}
          frequency: ${occMetricAlarmFrequency}
          isActive: ${occMetricAlarmIsActive}
          resourceConfiguration:
            resource: ${occMetricAlarmResourceConfigurationResource}
            usageType: ${occMetricAlarmResourceConfigurationUsageType}
            computeHwGeneration: ${occMetricAlarmResourceConfigurationComputeHwGeneration}
            hwGeneration: ${occMetricAlarmResourceConfigurationHwGeneration}
            linkRole: ${occMetricAlarmResourceConfigurationLinkRole}
            nodeType: ${occMetricAlarmResourceConfigurationNodeType}
            occMetricAlarmProvider: ${occMetricAlarmResourceConfigurationOccMetricAlarmProvider}
            shape: ${occMetricAlarmResourceConfigurationShape}
            storageType: ${occMetricAlarmResourceConfigurationStorageType}
          threshold: ${occMetricAlarmThreshold}
          definedTags:
            Operations.CostCenter: '42'
          description: ${occMetricAlarmDescription}
          freeformTags:
            Department: Finance
          state: ${occMetricAlarmState}
          subscribers: ${occMetricAlarmSubscribers}
          thresholdType: ${occMetricAlarmThresholdType}
    

    Create OccMetricAlarm Resource

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

    Constructor syntax

    new OccMetricAlarm(name: string, args: OccMetricAlarmArgs, opts?: CustomResourceOptions);
    @overload
    def OccMetricAlarm(resource_name: str,
                       args: OccMetricAlarmArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def OccMetricAlarm(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       compartment_id: Optional[str] = None,
                       display_name: Optional[str] = None,
                       frequency: Optional[str] = None,
                       is_active: Optional[bool] = None,
                       resource_configuration: Optional[OccMetricAlarmResourceConfigurationArgs] = None,
                       threshold: Optional[int] = None,
                       defined_tags: Optional[Mapping[str, str]] = None,
                       description: Optional[str] = None,
                       freeform_tags: Optional[Mapping[str, str]] = None,
                       state: Optional[str] = None,
                       subscribers: Optional[Sequence[str]] = None,
                       threshold_type: Optional[str] = None)
    func NewOccMetricAlarm(ctx *Context, name string, args OccMetricAlarmArgs, opts ...ResourceOption) (*OccMetricAlarm, error)
    public OccMetricAlarm(string name, OccMetricAlarmArgs args, CustomResourceOptions? opts = null)
    public OccMetricAlarm(String name, OccMetricAlarmArgs args)
    public OccMetricAlarm(String name, OccMetricAlarmArgs args, CustomResourceOptions options)
    
    type: oci:DemandSignal:OccMetricAlarm
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args OccMetricAlarmArgs
    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 OccMetricAlarmArgs
    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 OccMetricAlarmArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OccMetricAlarmArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OccMetricAlarmArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    CompartmentId string
    Compartment OCID in which the alarm is created.
    DisplayName string
    (Updatable) Human-readable name for the alarm.
    Frequency string
    (Updatable) Frequency at which notifications should be sent.
    IsActive bool
    (Updatable) Alarm active status.
    ResourceConfiguration OccMetricAlarmResourceConfiguration
    Configuration for a given 'resource'
    Threshold int
    (Updatable) Threshold at which alarm must be triggered.
    DefinedTags 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) Optional description for the alarm.
    FreeformTags 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"}
    State string
    (Updatable) The current lifecycle state of the resource.
    Subscribers List<string>
    (Updatable) List of topic OCIDs for notifications.
    ThresholdType string

    (Updatable) Units in which threshold is being stored.

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

    CompartmentId string
    Compartment OCID in which the alarm is created.
    DisplayName string
    (Updatable) Human-readable name for the alarm.
    Frequency string
    (Updatable) Frequency at which notifications should be sent.
    IsActive bool
    (Updatable) Alarm active status.
    ResourceConfiguration OccMetricAlarmResourceConfigurationArgs
    Configuration for a given 'resource'
    Threshold int
    (Updatable) Threshold at which alarm must be triggered.
    DefinedTags 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) Optional description for the alarm.
    FreeformTags 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"}
    State string
    (Updatable) The current lifecycle state of the resource.
    Subscribers []string
    (Updatable) List of topic OCIDs for notifications.
    ThresholdType string

    (Updatable) Units in which threshold is being stored.

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

    compartmentId String
    Compartment OCID in which the alarm is created.
    displayName String
    (Updatable) Human-readable name for the alarm.
    frequency String
    (Updatable) Frequency at which notifications should be sent.
    isActive Boolean
    (Updatable) Alarm active status.
    resourceConfiguration OccMetricAlarmResourceConfiguration
    Configuration for a given 'resource'
    threshold Integer
    (Updatable) Threshold at which alarm must be triggered.
    definedTags 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) Optional description for the alarm.
    freeformTags 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"}
    state String
    (Updatable) The current lifecycle state of the resource.
    subscribers List<String>
    (Updatable) List of topic OCIDs for notifications.
    thresholdType String

    (Updatable) Units in which threshold is being stored.

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

    compartmentId string
    Compartment OCID in which the alarm is created.
    displayName string
    (Updatable) Human-readable name for the alarm.
    frequency string
    (Updatable) Frequency at which notifications should be sent.
    isActive boolean
    (Updatable) Alarm active status.
    resourceConfiguration OccMetricAlarmResourceConfiguration
    Configuration for a given 'resource'
    threshold number
    (Updatable) Threshold at which alarm must be triggered.
    definedTags {[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) Optional description for the alarm.
    freeformTags {[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"}
    state string
    (Updatable) The current lifecycle state of the resource.
    subscribers string[]
    (Updatable) List of topic OCIDs for notifications.
    thresholdType string

    (Updatable) Units in which threshold is being stored.

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

    compartment_id str
    Compartment OCID in which the alarm is created.
    display_name str
    (Updatable) Human-readable name for the alarm.
    frequency str
    (Updatable) Frequency at which notifications should be sent.
    is_active bool
    (Updatable) Alarm active status.
    resource_configuration OccMetricAlarmResourceConfigurationArgs
    Configuration for a given 'resource'
    threshold int
    (Updatable) Threshold at which alarm must be triggered.
    defined_tags 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) Optional description for the alarm.
    freeform_tags 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"}
    state str
    (Updatable) The current lifecycle state of the resource.
    subscribers Sequence[str]
    (Updatable) List of topic OCIDs for notifications.
    threshold_type str

    (Updatable) Units in which threshold is being stored.

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

    compartmentId String
    Compartment OCID in which the alarm is created.
    displayName String
    (Updatable) Human-readable name for the alarm.
    frequency String
    (Updatable) Frequency at which notifications should be sent.
    isActive Boolean
    (Updatable) Alarm active status.
    resourceConfiguration Property Map
    Configuration for a given 'resource'
    threshold Number
    (Updatable) Threshold at which alarm must be triggered.
    definedTags 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) Optional description for the alarm.
    freeformTags 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"}
    state String
    (Updatable) The current lifecycle state of the resource.
    subscribers List<String>
    (Updatable) List of topic OCIDs for notifications.
    thresholdType String

    (Updatable) Units in which threshold is being stored.

    ** 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 OccMetricAlarm resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    Creation timestamp (RFC 3339).
    TimeUpdated string
    Last update timestamp (RFC 3339).
    Id string
    The provider-assigned unique ID for this managed resource.
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    Creation timestamp (RFC 3339).
    TimeUpdated string
    Last update timestamp (RFC 3339).
    id String
    The provider-assigned unique ID for this managed resource.
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    Creation timestamp (RFC 3339).
    timeUpdated String
    Last update timestamp (RFC 3339).
    id string
    The provider-assigned unique ID for this managed resource.
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    Creation timestamp (RFC 3339).
    timeUpdated string
    Last update timestamp (RFC 3339).
    id str
    The provider-assigned unique ID for this managed resource.
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    Creation timestamp (RFC 3339).
    time_updated str
    Last update timestamp (RFC 3339).
    id String
    The provider-assigned unique ID for this managed resource.
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    Creation timestamp (RFC 3339).
    timeUpdated String
    Last update timestamp (RFC 3339).

    Look up Existing OccMetricAlarm Resource

    Get an existing OccMetricAlarm 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?: OccMetricAlarmState, opts?: CustomResourceOptions): OccMetricAlarm
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            frequency: Optional[str] = None,
            is_active: Optional[bool] = None,
            resource_configuration: Optional[OccMetricAlarmResourceConfigurationArgs] = None,
            state: Optional[str] = None,
            subscribers: Optional[Sequence[str]] = None,
            system_tags: Optional[Mapping[str, str]] = None,
            threshold: Optional[int] = None,
            threshold_type: Optional[str] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None) -> OccMetricAlarm
    func GetOccMetricAlarm(ctx *Context, name string, id IDInput, state *OccMetricAlarmState, opts ...ResourceOption) (*OccMetricAlarm, error)
    public static OccMetricAlarm Get(string name, Input<string> id, OccMetricAlarmState? state, CustomResourceOptions? opts = null)
    public static OccMetricAlarm get(String name, Output<String> id, OccMetricAlarmState state, CustomResourceOptions options)
    resources:  _:    type: oci:DemandSignal:OccMetricAlarm    get:      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:
    CompartmentId string
    Compartment OCID in which the alarm is created.
    DefinedTags 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) Optional description for the alarm.
    DisplayName string
    (Updatable) Human-readable name for the alarm.
    FreeformTags 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"}
    Frequency string
    (Updatable) Frequency at which notifications should be sent.
    IsActive bool
    (Updatable) Alarm active status.
    ResourceConfiguration OccMetricAlarmResourceConfiguration
    Configuration for a given 'resource'
    State string
    (Updatable) The current lifecycle state of the resource.
    Subscribers List<string>
    (Updatable) List of topic OCIDs for notifications.
    SystemTags Dictionary<string, string>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    Threshold int
    (Updatable) Threshold at which alarm must be triggered.
    ThresholdType string

    (Updatable) Units in which threshold is being stored.

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

    TimeCreated string
    Creation timestamp (RFC 3339).
    TimeUpdated string
    Last update timestamp (RFC 3339).
    CompartmentId string
    Compartment OCID in which the alarm is created.
    DefinedTags 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) Optional description for the alarm.
    DisplayName string
    (Updatable) Human-readable name for the alarm.
    FreeformTags 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"}
    Frequency string
    (Updatable) Frequency at which notifications should be sent.
    IsActive bool
    (Updatable) Alarm active status.
    ResourceConfiguration OccMetricAlarmResourceConfigurationArgs
    Configuration for a given 'resource'
    State string
    (Updatable) The current lifecycle state of the resource.
    Subscribers []string
    (Updatable) List of topic OCIDs for notifications.
    SystemTags map[string]string
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    Threshold int
    (Updatable) Threshold at which alarm must be triggered.
    ThresholdType string

    (Updatable) Units in which threshold is being stored.

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

    TimeCreated string
    Creation timestamp (RFC 3339).
    TimeUpdated string
    Last update timestamp (RFC 3339).
    compartmentId String
    Compartment OCID in which the alarm is created.
    definedTags 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) Optional description for the alarm.
    displayName String
    (Updatable) Human-readable name for the alarm.
    freeformTags 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"}
    frequency String
    (Updatable) Frequency at which notifications should be sent.
    isActive Boolean
    (Updatable) Alarm active status.
    resourceConfiguration OccMetricAlarmResourceConfiguration
    Configuration for a given 'resource'
    state String
    (Updatable) The current lifecycle state of the resource.
    subscribers List<String>
    (Updatable) List of topic OCIDs for notifications.
    systemTags Map<String,String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    threshold Integer
    (Updatable) Threshold at which alarm must be triggered.
    thresholdType String

    (Updatable) Units in which threshold is being stored.

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

    timeCreated String
    Creation timestamp (RFC 3339).
    timeUpdated String
    Last update timestamp (RFC 3339).
    compartmentId string
    Compartment OCID in which the alarm is created.
    definedTags {[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) Optional description for the alarm.
    displayName string
    (Updatable) Human-readable name for the alarm.
    freeformTags {[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"}
    frequency string
    (Updatable) Frequency at which notifications should be sent.
    isActive boolean
    (Updatable) Alarm active status.
    resourceConfiguration OccMetricAlarmResourceConfiguration
    Configuration for a given 'resource'
    state string
    (Updatable) The current lifecycle state of the resource.
    subscribers string[]
    (Updatable) List of topic OCIDs for notifications.
    systemTags {[key: string]: string}
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    threshold number
    (Updatable) Threshold at which alarm must be triggered.
    thresholdType string

    (Updatable) Units in which threshold is being stored.

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

    timeCreated string
    Creation timestamp (RFC 3339).
    timeUpdated string
    Last update timestamp (RFC 3339).
    compartment_id str
    Compartment OCID in which the alarm is created.
    defined_tags 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) Optional description for the alarm.
    display_name str
    (Updatable) Human-readable name for the alarm.
    freeform_tags 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"}
    frequency str
    (Updatable) Frequency at which notifications should be sent.
    is_active bool
    (Updatable) Alarm active status.
    resource_configuration OccMetricAlarmResourceConfigurationArgs
    Configuration for a given 'resource'
    state str
    (Updatable) The current lifecycle state of the resource.
    subscribers Sequence[str]
    (Updatable) List of topic OCIDs for notifications.
    system_tags Mapping[str, str]
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    threshold int
    (Updatable) Threshold at which alarm must be triggered.
    threshold_type str

    (Updatable) Units in which threshold is being stored.

    ** 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
    Creation timestamp (RFC 3339).
    time_updated str
    Last update timestamp (RFC 3339).
    compartmentId String
    Compartment OCID in which the alarm is created.
    definedTags 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) Optional description for the alarm.
    displayName String
    (Updatable) Human-readable name for the alarm.
    freeformTags 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"}
    frequency String
    (Updatable) Frequency at which notifications should be sent.
    isActive Boolean
    (Updatable) Alarm active status.
    resourceConfiguration Property Map
    Configuration for a given 'resource'
    state String
    (Updatable) The current lifecycle state of the resource.
    subscribers List<String>
    (Updatable) List of topic OCIDs for notifications.
    systemTags Map<String>
    System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
    threshold Number
    (Updatable) Threshold at which alarm must be triggered.
    thresholdType String

    (Updatable) Units in which threshold is being stored.

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

    timeCreated String
    Creation timestamp (RFC 3339).
    timeUpdated String
    Last update timestamp (RFC 3339).

    Supporting Types

    OccMetricAlarmResourceConfiguration, OccMetricAlarmResourceConfigurationArgs

    Resource string
    Resources like COMPUTE, STORAGE, EXADATA etc.
    UsageType string
    The type of usage for the resource.
    ComputeHwGeneration string
    The hardware generation of the compute resource.
    HwGeneration string
    The hardware generation of the Exadata system.
    LinkRole string
    The role of the link in the network.
    NodeType string
    The type of node in the Exadata system.
    OccMetricAlarmProvider string
    The provider of the network service.
    Shape string
    The shape of the compute instance.
    StorageType string
    The type of storage resource.
    Resource string
    Resources like COMPUTE, STORAGE, EXADATA etc.
    UsageType string
    The type of usage for the resource.
    ComputeHwGeneration string
    The hardware generation of the compute resource.
    HwGeneration string
    The hardware generation of the Exadata system.
    LinkRole string
    The role of the link in the network.
    NodeType string
    The type of node in the Exadata system.
    OccMetricAlarmProvider string
    The provider of the network service.
    Shape string
    The shape of the compute instance.
    StorageType string
    The type of storage resource.
    resource String
    Resources like COMPUTE, STORAGE, EXADATA etc.
    usageType String
    The type of usage for the resource.
    computeHwGeneration String
    The hardware generation of the compute resource.
    hwGeneration String
    The hardware generation of the Exadata system.
    linkRole String
    The role of the link in the network.
    nodeType String
    The type of node in the Exadata system.
    occMetricAlarmProvider String
    The provider of the network service.
    shape String
    The shape of the compute instance.
    storageType String
    The type of storage resource.
    resource string
    Resources like COMPUTE, STORAGE, EXADATA etc.
    usageType string
    The type of usage for the resource.
    computeHwGeneration string
    The hardware generation of the compute resource.
    hwGeneration string
    The hardware generation of the Exadata system.
    linkRole string
    The role of the link in the network.
    nodeType string
    The type of node in the Exadata system.
    occMetricAlarmProvider string
    The provider of the network service.
    shape string
    The shape of the compute instance.
    storageType string
    The type of storage resource.
    resource str
    Resources like COMPUTE, STORAGE, EXADATA etc.
    usage_type str
    The type of usage for the resource.
    compute_hw_generation str
    The hardware generation of the compute resource.
    hw_generation str
    The hardware generation of the Exadata system.
    link_role str
    The role of the link in the network.
    node_type str
    The type of node in the Exadata system.
    occ_metric_alarm_provider str
    The provider of the network service.
    shape str
    The shape of the compute instance.
    storage_type str
    The type of storage resource.
    resource String
    Resources like COMPUTE, STORAGE, EXADATA etc.
    usageType String
    The type of usage for the resource.
    computeHwGeneration String
    The hardware generation of the compute resource.
    hwGeneration String
    The hardware generation of the Exadata system.
    linkRole String
    The role of the link in the network.
    nodeType String
    The type of node in the Exadata system.
    occMetricAlarmProvider String
    The provider of the network service.
    shape String
    The shape of the compute instance.
    storageType String
    The type of storage resource.

    Import

    OccMetricAlarms can be imported using the id, e.g.

    $ pulumi import oci:DemandSignal/occMetricAlarm:OccMetricAlarm test_occ_metric_alarm "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 oci Terraform Provider.
    oci logo
    Viewing docs for Oracle Cloud Infrastructure v4.9.0
    published on Thursday, Apr 30, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.