oci.Monitoring.getAlarmStatuses
Explore with Pulumi AI
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 System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testAlarmStatuses = Oci.Monitoring.GetAlarmStatuses.Invoke(new()
{
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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Monitoring.MonitoringFunctions;
import com.pulumi.oci.Monitoring.inputs.GetAlarmStatusesArgs;
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 testAlarmStatuses = MonitoringFunctions.getAlarmStatuses(GetAlarmStatusesArgs.builder()
.compartmentId(var_.compartment_id())
.compartmentIdInSubtree(var_.alarm_status_compartment_id_in_subtree())
.displayName(var_.alarm_status_display_name())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_alarm_statuses = oci.Monitoring.get_alarm_statuses(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
compartment_id_in_subtree=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
display_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
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,
});
variables:
testAlarmStatuses:
fn::invoke:
Function: oci:Monitoring:getAlarmStatuses
Arguments:
compartmentId: ${var.compartment_id}
compartmentIdInSubtree: ${var.alarm_status_compartment_id_in_subtree}
displayName: ${var.alarm_status_display_name}
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:
- Compartment
Id 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
- Compartment
Id boolIn Subtree 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 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<Get
Alarm Statuses Filter>
- Compartment
Id 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
- Compartment
Id boolIn Subtree 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 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
[]Get
Alarm Statuses Filter
- compartment
Id 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
- compartment
Id BooleanIn Subtree 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 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<Get
Alarm Statuses Filter>
- compartment
Id 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
- compartment
Id booleanIn Subtree 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 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
Get
Alarm Statuses Filter[]
- 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_ boolin_ subtree 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
Get
Alarm Statuses Filter]
- compartment
Id 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
- compartment
Id BooleanIn Subtree 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 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:
- Alarm
Statuses List<GetAlarm Statuses Alarm Status> The list of alarm_statuses.
- Compartment
Id string - Id string
The provider-assigned unique ID for this managed resource.
- Compartment
Id boolIn Subtree - Display
Name string The configured name of the alarm. Example:
High CPU Utilization
- Filters
List<Get
Alarm Statuses Filter>
- Alarm
Statuses []GetAlarm Statuses Alarm Status The list of alarm_statuses.
- Compartment
Id string - Id string
The provider-assigned unique ID for this managed resource.
- Compartment
Id boolIn Subtree - Display
Name string The configured name of the alarm. Example:
High CPU Utilization
- Filters
[]Get
Alarm Statuses Filter
- alarm
Statuses List<GetAlarm Statuses Alarm Status> The list of alarm_statuses.
- compartment
Id String - id String
The provider-assigned unique ID for this managed resource.
- compartment
Id BooleanIn Subtree - display
Name String The configured name of the alarm. Example:
High CPU Utilization
- filters
List<Get
Alarm Statuses Filter>
- alarm
Statuses GetAlarm Statuses Alarm Status[] The list of alarm_statuses.
- compartment
Id string - id string
The provider-assigned unique ID for this managed resource.
- compartment
Id booleanIn Subtree - display
Name string The configured name of the alarm. Example:
High CPU Utilization
- filters
Get
Alarm Statuses Filter[]
- alarm_
statuses GetAlarm Statuses Alarm Status] The list of alarm_statuses.
- compartment_
id str - id str
The provider-assigned unique ID for this managed resource.
- compartment_
id_ boolin_ subtree - display_
name str The configured name of the alarm. Example:
High CPU Utilization
- filters
Get
Alarm Statuses Filter]
- alarm
Statuses List<Property Map> The list of alarm_statuses.
- compartment
Id String - id String
The provider-assigned unique ID for this managed resource.
- compartment
Id BooleanIn Subtree - display
Name String The configured name of the alarm. Example:
High CPU Utilization
- filters List<Property Map>
Supporting Types
GetAlarmStatusesAlarmStatus
- Display
Name 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<Get
Alarm Statuses Alarm Status Suppression> The configuration details for suppressing an alarm.
- Timestamp
Triggered 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 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
[]Get
Alarm Statuses Alarm Status Suppression The configuration details for suppressing an alarm.
- Timestamp
Triggered 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 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<Get
Alarm Statuses Alarm Status Suppression> The configuration details for suppressing an alarm.
- timestamp
Triggered 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 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
Get
Alarm Statuses Alarm Status Suppression[] The configuration details for suppressing an alarm.
- timestamp
Triggered 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
Get
Alarm Statuses Alarm Status Suppression] 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
- display
Name 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.
- timestamp
Triggered 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.
- Time
Suppress stringFrom 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 stringUntil 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.
- Time
Suppress stringFrom 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 stringUntil 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.
- time
Suppress StringFrom 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 StringUntil 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.
- time
Suppress stringFrom 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 stringUntil 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_ strfrom 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_ struntil 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.
- time
Suppress StringFrom 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 StringUntil The end date and time for the suppression to take place, inclusive. Format defined by RFC3339. Example:
2019-02-01T02:02:29.600Z
GetAlarmStatusesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.