Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getAlarmStatuses

This data source provides the list of Alarm Statuses in Oracle Cloud Infrastructure Monitoring service.

List the status of each alarm in the specified compartment. For important limits information, see Limits on Monitoring.

This call is subject to a Monitoring limit that applies to the total number of requests across all alarm operations. Monitoring might throttle this call to reject an otherwise valid request when the total rate of alarm operations exceeds 10 requests, or transactions, per second (TPS) for a given tenancy.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testAlarmStatuses = Output.Create(Oci.Monitoring.GetAlarmStatuses.InvokeAsync(new Oci.Monitoring.GetAlarmStatusesArgs
        {
            CompartmentId = @var.Compartment_id,
            CompartmentIdInSubtree = @var.Alarm_status_compartment_id_in_subtree,
            DisplayName = @var.Alarm_status_display_name,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Monitoring"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Monitoring.GetAlarmStatuses(ctx, &monitoring.GetAlarmStatusesArgs{
			CompartmentId:          _var.Compartment_id,
			CompartmentIdInSubtree: pulumi.BoolRef(_var.Alarm_status_compartment_id_in_subtree),
			DisplayName:            pulumi.StringRef(_var.Alarm_status_display_name),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_alarm_statuses = oci.Monitoring.get_alarm_statuses(compartment_id=var["compartment_id"],
    compartment_id_in_subtree=var["alarm_status_compartment_id_in_subtree"],
    display_name=var["alarm_status_display_name"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAlarmStatuses = oci.Monitoring.getAlarmStatuses({
    compartmentId: _var.compartment_id,
    compartmentIdInSubtree: _var.alarm_status_compartment_id_in_subtree,
    displayName: _var.alarm_status_display_name,
});

Coming soon!

Using getAlarmStatuses

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 getAlarmStatuses(args: GetAlarmStatusesArgs, opts?: InvokeOptions): Promise<GetAlarmStatusesResult>
function getAlarmStatusesOutput(args: GetAlarmStatusesOutputArgs, opts?: InvokeOptions): Output<GetAlarmStatusesResult>
def get_alarm_statuses(compartment_id: Optional[str] = None,
                       compartment_id_in_subtree: Optional[bool] = None,
                       display_name: Optional[str] = None,
                       filters: Optional[Sequence[_monitoring.GetAlarmStatusesFilter]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAlarmStatusesResult
def get_alarm_statuses_output(compartment_id: Optional[pulumi.Input[str]] = None,
                       compartment_id_in_subtree: Optional[pulumi.Input[bool]] = None,
                       display_name: Optional[pulumi.Input[str]] = None,
                       filters: Optional[pulumi.Input[Sequence[pulumi.Input[_monitoring.GetAlarmStatusesFilterArgs]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAlarmStatusesResult]
func GetAlarmStatuses(ctx *Context, args *GetAlarmStatusesArgs, opts ...InvokeOption) (*GetAlarmStatusesResult, error)
func GetAlarmStatusesOutput(ctx *Context, args *GetAlarmStatusesOutputArgs, opts ...InvokeOption) GetAlarmStatusesResultOutput

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

public static class GetAlarmStatuses 
{
    public static Task<GetAlarmStatusesResult> InvokeAsync(GetAlarmStatusesArgs args, InvokeOptions? opts = null)
    public static Output<GetAlarmStatusesResult> Invoke(GetAlarmStatusesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlarmStatusesResult> getAlarmStatuses(GetAlarmStatusesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:Monitoring/getAlarmStatuses:getAlarmStatuses
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

CompartmentIdInSubtree bool

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.

DisplayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

Filters List<GetAlarmStatusesFilter>
CompartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

CompartmentIdInSubtree bool

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.

DisplayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

Filters []GetAlarmStatusesFilter
compartmentId String

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

compartmentIdInSubtree Boolean

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.

displayName String

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

filters List<GetAlarmStatusesFilter>
compartmentId string

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

compartmentIdInSubtree boolean

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.

displayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

filters GetAlarmStatusesFilter[]
compartment_id str

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

compartment_id_in_subtree bool

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.

display_name str

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

filters GetAlarmStatusesFilter]
compartmentId String

The OCID of the compartment containing the resources monitored by the metric that you are searching for. Use tenancyId to search in the root compartment. Example: ocid1.compartment.oc1..exampleuniqueID

compartmentIdInSubtree Boolean

When true, returns resources from all compartments and subcompartments. The parameter can only be set to true when compartmentId is the tenancy OCID (the tenancy is the root compartment). A true value requires the user to have tenancy-level permissions. If this requirement is not met, then the call is rejected. When false, returns resources from only the compartment specified in compartmentId. Default is false.

displayName String

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

filters List<Property Map>

getAlarmStatuses Result

The following output properties are available:

AlarmStatuses List<GetAlarmStatusesAlarmStatus>

The list of alarm_statuses.

CompartmentId string
Id string

The provider-assigned unique ID for this managed resource.

CompartmentIdInSubtree bool
DisplayName string

The configured name of the alarm. Example: High CPU Utilization

Filters List<GetAlarmStatusesFilter>
AlarmStatuses []GetAlarmStatusesAlarmStatus

The list of alarm_statuses.

CompartmentId string
Id string

The provider-assigned unique ID for this managed resource.

CompartmentIdInSubtree bool
DisplayName string

The configured name of the alarm. Example: High CPU Utilization

Filters []GetAlarmStatusesFilter
alarmStatuses List<GetAlarmStatusesAlarmStatus>

The list of alarm_statuses.

compartmentId String
id String

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree Boolean
displayName String

The configured name of the alarm. Example: High CPU Utilization

filters List<GetAlarmStatusesFilter>
alarmStatuses GetAlarmStatusesAlarmStatus[]

The list of alarm_statuses.

compartmentId string
id string

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree boolean
displayName string

The configured name of the alarm. Example: High CPU Utilization

filters GetAlarmStatusesFilter[]
alarm_statuses GetAlarmStatusesAlarmStatus]

The list of alarm_statuses.

compartment_id str
id str

The provider-assigned unique ID for this managed resource.

compartment_id_in_subtree bool
display_name str

The configured name of the alarm. Example: High CPU Utilization

filters GetAlarmStatusesFilter]
alarmStatuses List<Property Map>

The list of alarm_statuses.

compartmentId String
id String

The provider-assigned unique ID for this managed resource.

compartmentIdInSubtree Boolean
displayName String

The configured name of the alarm. Example: High CPU Utilization

filters List<Property Map>

Supporting Types

GetAlarmStatusesAlarmStatus

DisplayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

Id string

The OCID of the alarm.

Severity string

The configured severity of the alarm. Example: CRITICAL

Status string

The status of this alarm. Example: FIRING

Suppressions List<GetAlarmStatusesAlarmStatusSuppression>

The configuration details for suppressing an alarm.

TimestampTriggered string

Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example: 2019-02-01T01:02:29.600Z

DisplayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

Id string

The OCID of the alarm.

Severity string

The configured severity of the alarm. Example: CRITICAL

Status string

The status of this alarm. Example: FIRING

Suppressions []GetAlarmStatusesAlarmStatusSuppression

The configuration details for suppressing an alarm.

TimestampTriggered string

Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example: 2019-02-01T01:02:29.600Z

displayName String

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

id String

The OCID of the alarm.

severity String

The configured severity of the alarm. Example: CRITICAL

status String

The status of this alarm. Example: FIRING

suppressions List<GetAlarmStatusesAlarmStatusSuppression>

The configuration details for suppressing an alarm.

timestampTriggered String

Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example: 2019-02-01T01:02:29.600Z

displayName string

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

id string

The OCID of the alarm.

severity string

The configured severity of the alarm. Example: CRITICAL

status string

The status of this alarm. Example: FIRING

suppressions GetAlarmStatusesAlarmStatusSuppression[]

The configuration details for suppressing an alarm.

timestampTriggered string

Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example: 2019-02-01T01:02:29.600Z

display_name str

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

id str

The OCID of the alarm.

severity str

The configured severity of the alarm. Example: CRITICAL

status str

The status of this alarm. Example: FIRING

suppressions GetAlarmStatusesAlarmStatusSuppression]

The configuration details for suppressing an alarm.

timestamp_triggered str

Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example: 2019-02-01T01:02:29.600Z

displayName String

A filter to return only resources that match the given display name exactly. Use this filter to list an alarm by name. Alternatively, when you know the alarm OCID, use the GetAlarm operation.

id String

The OCID of the alarm.

severity String

The configured severity of the alarm. Example: CRITICAL

status String

The status of this alarm. Example: FIRING

suppressions List<Property Map>

The configuration details for suppressing an alarm.

timestampTriggered String

Timestamp for the transition of the alarm state. For example, the time when the alarm transitioned from OK to Firing. Note: A three-minute lag for this value accounts for any late-arriving metrics. Example: 2019-02-01T01:02:29.600Z

GetAlarmStatusesAlarmStatusSuppression

Description string

Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

TimeSuppressFrom string

The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

TimeSuppressUntil string

The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T02:02:29.600Z

Description string

Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

TimeSuppressFrom string

The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

TimeSuppressUntil string

The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T02:02:29.600Z

description String

Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

timeSuppressFrom String

The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

timeSuppressUntil String

The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T02:02:29.600Z

description string

Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

timeSuppressFrom string

The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

timeSuppressUntil string

The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T02:02:29.600Z

description str

Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

time_suppress_from str

The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

time_suppress_until str

The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T02:02:29.600Z

description String

Human-readable reason for suppressing alarm notifications. It does not have to be unique, and it's changeable. Avoid entering confidential information.

timeSuppressFrom String

The start date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T01:02:29.600Z

timeSuppressUntil String

The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example: 2019-02-01T02:02:29.600Z

GetAlarmStatusesFilter

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

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.