1. Packages
  2. Packages
  3. Oracle Cloud Infrastructure
  4. API Docs
  5. DemandSignal
  6. getOccMetricAlarms
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 the list of Occ Metric Alarms in Oracle Cloud Infrastructure Demand Signal service.

    Gets a list of OccMetricAlarms.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testOccMetricAlarms = oci.DemandSignal.getOccMetricAlarms({
        compartmentId: compartmentId,
        displayName: occMetricAlarmDisplayName,
        isActive: occMetricAlarmIsActive,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_occ_metric_alarms = oci.DemandSignal.get_occ_metric_alarms(compartment_id=compartment_id,
        display_name=occ_metric_alarm_display_name,
        is_active=occ_metric_alarm_is_active)
    
    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.GetOccMetricAlarms(ctx, &demandsignal.GetOccMetricAlarmsArgs{
    			CompartmentId: compartmentId,
    			DisplayName:   pulumi.StringRef(occMetricAlarmDisplayName),
    			IsActive:      pulumi.BoolRef(occMetricAlarmIsActive),
    		}, 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 testOccMetricAlarms = Oci.DemandSignal.GetOccMetricAlarms.Invoke(new()
        {
            CompartmentId = compartmentId,
            DisplayName = occMetricAlarmDisplayName,
            IsActive = occMetricAlarmIsActive,
        });
    
    });
    
    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.GetOccMetricAlarmsArgs;
    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 testOccMetricAlarms = DemandSignalFunctions.getOccMetricAlarms(GetOccMetricAlarmsArgs.builder()
                .compartmentId(compartmentId)
                .displayName(occMetricAlarmDisplayName)
                .isActive(occMetricAlarmIsActive)
                .build());
    
        }
    }
    
    variables:
      testOccMetricAlarms:
        fn::invoke:
          function: oci:DemandSignal:getOccMetricAlarms
          arguments:
            compartmentId: ${compartmentId}
            displayName: ${occMetricAlarmDisplayName}
            isActive: ${occMetricAlarmIsActive}
    

    Using getOccMetricAlarms

    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 getOccMetricAlarms(args: GetOccMetricAlarmsArgs, opts?: InvokeOptions): Promise<GetOccMetricAlarmsResult>
    function getOccMetricAlarmsOutput(args: GetOccMetricAlarmsOutputArgs, opts?: InvokeOptions): Output<GetOccMetricAlarmsResult>
    def get_occ_metric_alarms(compartment_id: Optional[str] = None,
                              display_name: Optional[str] = None,
                              filters: Optional[Sequence[GetOccMetricAlarmsFilter]] = None,
                              is_active: Optional[bool] = None,
                              opts: Optional[InvokeOptions] = None) -> GetOccMetricAlarmsResult
    def get_occ_metric_alarms_output(compartment_id: Optional[pulumi.Input[str]] = None,
                              display_name: Optional[pulumi.Input[str]] = None,
                              filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetOccMetricAlarmsFilterArgs]]]] = None,
                              is_active: Optional[pulumi.Input[bool]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetOccMetricAlarmsResult]
    func GetOccMetricAlarms(ctx *Context, args *GetOccMetricAlarmsArgs, opts ...InvokeOption) (*GetOccMetricAlarmsResult, error)
    func GetOccMetricAlarmsOutput(ctx *Context, args *GetOccMetricAlarmsOutputArgs, opts ...InvokeOption) GetOccMetricAlarmsResultOutput

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

    public static class GetOccMetricAlarms 
    {
        public static Task<GetOccMetricAlarmsResult> InvokeAsync(GetOccMetricAlarmsArgs args, InvokeOptions? opts = null)
        public static Output<GetOccMetricAlarmsResult> Invoke(GetOccMetricAlarmsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOccMetricAlarmsResult> getOccMetricAlarms(GetOccMetricAlarmsArgs args, InvokeOptions options)
    public static Output<GetOccMetricAlarmsResult> getOccMetricAlarms(GetOccMetricAlarmsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:DemandSignal/getOccMetricAlarms:getOccMetricAlarms
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters List<GetOccMetricAlarmsFilter>
    IsActive bool
    Filter to list only active or inactive alarms.
    CompartmentId string
    The OCID of the compartment in which to list resources.
    DisplayName string
    A filter to return only resources that match the given display name exactly.
    Filters []GetOccMetricAlarmsFilter
    IsActive bool
    Filter to list only active or inactive alarms.
    compartmentId String
    The OCID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<GetOccMetricAlarmsFilter>
    isActive Boolean
    Filter to list only active or inactive alarms.
    compartmentId string
    The OCID of the compartment in which to list resources.
    displayName string
    A filter to return only resources that match the given display name exactly.
    filters GetOccMetricAlarmsFilter[]
    isActive boolean
    Filter to list only active or inactive alarms.
    compartment_id str
    The OCID of the compartment in which to list resources.
    display_name str
    A filter to return only resources that match the given display name exactly.
    filters Sequence[GetOccMetricAlarmsFilter]
    is_active bool
    Filter to list only active or inactive alarms.
    compartmentId String
    The OCID of the compartment in which to list resources.
    displayName String
    A filter to return only resources that match the given display name exactly.
    filters List<Property Map>
    isActive Boolean
    Filter to list only active or inactive alarms.

    getOccMetricAlarms Result

    The following output properties are available:

    CompartmentId string
    Compartment OCID in which the alarm is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    OccMetricAlarmCollections List<GetOccMetricAlarmsOccMetricAlarmCollection>
    The list of occ_metric_alarm_collection.
    DisplayName string
    Human-readable name for the alarm.
    Filters List<GetOccMetricAlarmsFilter>
    IsActive bool
    Alarm active status.
    CompartmentId string
    Compartment OCID in which the alarm is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    OccMetricAlarmCollections []GetOccMetricAlarmsOccMetricAlarmCollection
    The list of occ_metric_alarm_collection.
    DisplayName string
    Human-readable name for the alarm.
    Filters []GetOccMetricAlarmsFilter
    IsActive bool
    Alarm active status.
    compartmentId String
    Compartment OCID in which the alarm is created.
    id String
    The provider-assigned unique ID for this managed resource.
    occMetricAlarmCollections List<GetOccMetricAlarmsOccMetricAlarmCollection>
    The list of occ_metric_alarm_collection.
    displayName String
    Human-readable name for the alarm.
    filters List<GetOccMetricAlarmsFilter>
    isActive Boolean
    Alarm active status.
    compartmentId string
    Compartment OCID in which the alarm is created.
    id string
    The provider-assigned unique ID for this managed resource.
    occMetricAlarmCollections GetOccMetricAlarmsOccMetricAlarmCollection[]
    The list of occ_metric_alarm_collection.
    displayName string
    Human-readable name for the alarm.
    filters GetOccMetricAlarmsFilter[]
    isActive boolean
    Alarm active status.
    compartment_id str
    Compartment OCID in which the alarm is created.
    id str
    The provider-assigned unique ID for this managed resource.
    occ_metric_alarm_collections Sequence[GetOccMetricAlarmsOccMetricAlarmCollection]
    The list of occ_metric_alarm_collection.
    display_name str
    Human-readable name for the alarm.
    filters Sequence[GetOccMetricAlarmsFilter]
    is_active bool
    Alarm active status.
    compartmentId String
    Compartment OCID in which the alarm is created.
    id String
    The provider-assigned unique ID for this managed resource.
    occMetricAlarmCollections List<Property Map>
    The list of occ_metric_alarm_collection.
    displayName String
    Human-readable name for the alarm.
    filters List<Property Map>
    isActive Boolean
    Alarm active status.

    Supporting Types

    GetOccMetricAlarmsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetOccMetricAlarmsOccMetricAlarmCollection

    GetOccMetricAlarmsOccMetricAlarmCollectionItem

    CompartmentId string
    The OCID of the compartment in which to list resources.
    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
    A filter to return only resources that match the given display name exactly.
    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
    Filter to list only active or inactive alarms.
    ResourceConfigurations List<GetOccMetricAlarmsOccMetricAlarmCollectionItemResourceConfiguration>
    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
    The OCID of the compartment in which to list resources.
    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
    A filter to return only resources that match the given display name exactly.
    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
    Filter to list only active or inactive alarms.
    ResourceConfigurations []GetOccMetricAlarmsOccMetricAlarmCollectionItemResourceConfiguration
    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
    The OCID of the compartment in which to list resources.
    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
    A filter to return only resources that match the given display name exactly.
    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
    Filter to list only active or inactive alarms.
    resourceConfigurations List<GetOccMetricAlarmsOccMetricAlarmCollectionItemResourceConfiguration>
    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
    The OCID of the compartment in which to list resources.
    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
    A filter to return only resources that match the given display name exactly.
    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
    Filter to list only active or inactive alarms.
    resourceConfigurations GetOccMetricAlarmsOccMetricAlarmCollectionItemResourceConfiguration[]
    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
    The OCID of the compartment in which to list resources.
    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
    A filter to return only resources that match the given display name exactly.
    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
    Filter to list only active or inactive alarms.
    resource_configurations Sequence[GetOccMetricAlarmsOccMetricAlarmCollectionItemResourceConfiguration]
    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
    The OCID of the compartment in which to list resources.
    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
    A filter to return only resources that match the given display name exactly.
    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
    Filter to list only active or inactive alarms.
    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).

    GetOccMetricAlarmsOccMetricAlarmCollectionItemResourceConfiguration

    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.