1. Packages
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. DemandSignal
  6. getOccMetricAlarm
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 data source provides details about a specific Occ Metric Alarm resource in Oracle Cloud Infrastructure Demand Signal service.

    Retrieves the specified OccMetricAlarm resource based on its identifier.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testOccMetricAlarm = oci.DemandSignal.getOccMetricAlarm({
        occMetricAlarmId: testOccMetricAlarmOciDemandSignalOccMetricAlarm.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_occ_metric_alarm = oci.DemandSignal.get_occ_metric_alarm(occ_metric_alarm_id=test_occ_metric_alarm_oci_demand_signal_occ_metric_alarm["id"])
    
    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.GetOccMetricAlarm(ctx, &demandsignal.GetOccMetricAlarmArgs{
    			OccMetricAlarmId: testOccMetricAlarmOciDemandSignalOccMetricAlarm.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testOccMetricAlarm = Oci.DemandSignal.GetOccMetricAlarm.Invoke(new()
        {
            OccMetricAlarmId = testOccMetricAlarmOciDemandSignalOccMetricAlarm.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DemandSignal.DemandSignalFunctions;
    import com.pulumi.oci.DemandSignal.inputs.GetOccMetricAlarmArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testOccMetricAlarm = DemandSignalFunctions.getOccMetricAlarm(GetOccMetricAlarmArgs.builder()
                .occMetricAlarmId(testOccMetricAlarmOciDemandSignalOccMetricAlarm.id())
                .build());
    
        }
    }
    
    variables:
      testOccMetricAlarm:
        fn::invoke:
          function: oci:DemandSignal:getOccMetricAlarm
          arguments:
            occMetricAlarmId: ${testOccMetricAlarmOciDemandSignalOccMetricAlarm.id}
    

    Using getOccMetricAlarm

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getOccMetricAlarm(args: GetOccMetricAlarmArgs, opts?: InvokeOptions): Promise<GetOccMetricAlarmResult>
    function getOccMetricAlarmOutput(args: GetOccMetricAlarmOutputArgs, opts?: InvokeOptions): Output<GetOccMetricAlarmResult>
    def get_occ_metric_alarm(occ_metric_alarm_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetOccMetricAlarmResult
    def get_occ_metric_alarm_output(occ_metric_alarm_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetOccMetricAlarmResult]
    func LookupOccMetricAlarm(ctx *Context, args *LookupOccMetricAlarmArgs, opts ...InvokeOption) (*LookupOccMetricAlarmResult, error)
    func LookupOccMetricAlarmOutput(ctx *Context, args *LookupOccMetricAlarmOutputArgs, opts ...InvokeOption) LookupOccMetricAlarmResultOutput

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

    public static class GetOccMetricAlarm 
    {
        public static Task<GetOccMetricAlarmResult> InvokeAsync(GetOccMetricAlarmArgs args, InvokeOptions? opts = null)
        public static Output<GetOccMetricAlarmResult> Invoke(GetOccMetricAlarmInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOccMetricAlarmResult> getOccMetricAlarm(GetOccMetricAlarmArgs args, InvokeOptions options)
    public static Output<GetOccMetricAlarmResult> getOccMetricAlarm(GetOccMetricAlarmArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:DemandSignal/getOccMetricAlarm:getOccMetricAlarm
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OccMetricAlarmId string
    The OCID of the OccMetricAlarm.
    OccMetricAlarmId string
    The OCID of the OccMetricAlarm.
    occMetricAlarmId String
    The OCID of the OccMetricAlarm.
    occMetricAlarmId string
    The OCID of the OccMetricAlarm.
    occ_metric_alarm_id str
    The OCID of the OccMetricAlarm.
    occMetricAlarmId String
    The OCID of the OccMetricAlarm.

    getOccMetricAlarm Result

    The following output properties are available:

    CompartmentId string
    Compartment OCID in which the alarm is created.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    Optional description for the alarm.
    DisplayName string
    Human-readable name for the alarm.
    FreeformTags Dictionary<string, string>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Frequency string
    Frequency at which notifications should be sent.
    Id string
    Unique OCID for this alarm configuration.
    IsActive bool
    Alarm active status.
    OccMetricAlarmId string
    ResourceConfigurations List<GetOccMetricAlarmResourceConfiguration>
    Configuration for a given 'resource'
    State string
    The current lifecycle state of the resource.
    Subscribers List<string>
    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
    Threshold at which alarm must be triggered.
    ThresholdType string
    Units in which threshold is being stored.
    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
    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
    Optional description for the alarm.
    DisplayName string
    Human-readable name for the alarm.
    FreeformTags map[string]string
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Frequency string
    Frequency at which notifications should be sent.
    Id string
    Unique OCID for this alarm configuration.
    IsActive bool
    Alarm active status.
    OccMetricAlarmId string
    ResourceConfigurations []GetOccMetricAlarmResourceConfiguration
    Configuration for a given 'resource'
    State string
    The current lifecycle state of the resource.
    Subscribers []string
    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
    Threshold at which alarm must be triggered.
    ThresholdType string
    Units in which threshold is being stored.
    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>
    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
    Optional description for the alarm.
    displayName String
    Human-readable name for the alarm.
    freeformTags Map<String,String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    frequency String
    Frequency at which notifications should be sent.
    id String
    Unique OCID for this alarm configuration.
    isActive Boolean
    Alarm active status.
    occMetricAlarmId String
    resourceConfigurations List<GetOccMetricAlarmResourceConfiguration>
    Configuration for a given 'resource'
    state String
    The current lifecycle state of the resource.
    subscribers List<String>
    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
    Threshold at which alarm must be triggered.
    thresholdType String
    Units in which threshold is being stored.
    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}
    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
    Optional description for the alarm.
    displayName string
    Human-readable name for the alarm.
    freeformTags {[key: string]: string}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    frequency string
    Frequency at which notifications should be sent.
    id string
    Unique OCID for this alarm configuration.
    isActive boolean
    Alarm active status.
    occMetricAlarmId string
    resourceConfigurations GetOccMetricAlarmResourceConfiguration[]
    Configuration for a given 'resource'
    state string
    The current lifecycle state of the resource.
    subscribers string[]
    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
    Threshold at which alarm must be triggered.
    thresholdType string
    Units in which threshold is being stored.
    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]
    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
    Optional description for the alarm.
    display_name str
    Human-readable name for the alarm.
    freeform_tags Mapping[str, str]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    frequency str
    Frequency at which notifications should be sent.
    id str
    Unique OCID for this alarm configuration.
    is_active bool
    Alarm active status.
    occ_metric_alarm_id str
    resource_configurations Sequence[GetOccMetricAlarmResourceConfiguration]
    Configuration for a given 'resource'
    state str
    The current lifecycle state of the resource.
    subscribers Sequence[str]
    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
    Threshold at which alarm must be triggered.
    threshold_type str
    Units in which threshold is being stored.
    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>
    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
    Optional description for the alarm.
    displayName String
    Human-readable name for the alarm.
    freeformTags Map<String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    frequency String
    Frequency at which notifications should be sent.
    id String
    Unique OCID for this alarm configuration.
    isActive Boolean
    Alarm active status.
    occMetricAlarmId String
    resourceConfigurations List<Property Map>
    Configuration for a given 'resource'
    state String
    The current lifecycle state of the resource.
    subscribers List<String>
    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
    Threshold at which alarm must be triggered.
    thresholdType String
    Units in which threshold is being stored.
    timeCreated String
    Creation timestamp (RFC 3339).
    timeUpdated String
    Last update timestamp (RFC 3339).

    Supporting Types

    GetOccMetricAlarmResourceConfiguration

    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.
    Resource string
    Resources like COMPUTE, STORAGE, EXADATA etc.
    Shape string
    The shape of the compute instance.
    StorageType string
    The type of storage resource.
    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.
    Resource string
    Resources like COMPUTE, STORAGE, EXADATA etc.
    Shape string
    The shape of the compute instance.
    StorageType string
    The type of storage resource.
    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.
    resource String
    Resources like COMPUTE, STORAGE, EXADATA etc.
    shape String
    The shape of the compute instance.
    storageType String
    The type of storage resource.
    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.
    resource string
    Resources like COMPUTE, STORAGE, EXADATA etc.
    shape string
    The shape of the compute instance.
    storageType string
    The type of storage resource.
    usageType string
    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.
    resource str
    Resources like COMPUTE, STORAGE, EXADATA etc.
    shape str
    The shape of the compute instance.
    storage_type str
    The type of storage resource.
    usage_type str
    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.
    resource String
    Resources like COMPUTE, STORAGE, EXADATA etc.
    shape String
    The shape of the compute instance.
    storageType String
    The type of storage resource.
    usageType String
    The type of usage for the resource.

    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.