CloudAMQP

Pulumi Official
Package maintained by Pulumi
v3.9.0 published on Wednesday, Jul 20, 2022 by Pulumi

getAlarm

Use this data source to retrieve information about default or created alarms. Either use alarm_id or type to retrieve the alarm.

Attributes reference

All attributes reference are computed

  • id - The identifier for this resource.
  • enabled - Enable/disable status of the alarm.
  • value_threshold - The value threshold that triggers the alarm.
  • reminder_interval - The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
  • time_threshold - The time interval (in seconds) the value_threshold should be active before trigger an alarm.
  • queue_regex - Regular expression for which queue to check.
  • vhost_regex - Regular expression for which vhost to check
  • recipients - Identifier for recipient to be notified.
  • message_type - Message type (total, unacked, ready) used by queue alarm type.

Specific attribute for disk alarm

  • value_calculation - Disk value threshold calculation, (fixed, percentage) of disk space remaining.

Dependency

This data source depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.

Alarm types

cpu, memory, disk, queue, connection, flow, consumer, netsplit, server_unreachable, notice

Example Usage

using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultCpuAlarm = Output.Create(CloudAmqp.GetAlarm.InvokeAsync(new CloudAmqp.GetAlarmArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            Type = "cpu",
        }));
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudamqp.LookupAlarm(ctx, &GetAlarmArgs{
			InstanceId: cloudamqp_instance.Instance.Id,
			Type:       pulumi.StringRef("cpu"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_cloudamqp as cloudamqp

default_cpu_alarm = cloudamqp.get_alarm(instance_id=cloudamqp_instance["instance"]["id"],
    type="cpu")
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const defaultCpuAlarm = cloudamqp.getAlarm({
    instanceId: cloudamqp_instance.instance.id,
    type: "cpu",
});

Coming soon!

Using getAlarm

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 getAlarm(args: GetAlarmArgs, opts?: InvokeOptions): Promise<GetAlarmResult>
function getAlarmOutput(args: GetAlarmOutputArgs, opts?: InvokeOptions): Output<GetAlarmResult>
def get_alarm(alarm_id: Optional[int] = None,
              instance_id: Optional[int] = None,
              type: Optional[str] = None,
              value_calculation: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetAlarmResult
def get_alarm_output(alarm_id: Optional[pulumi.Input[int]] = None,
              instance_id: Optional[pulumi.Input[int]] = None,
              type: Optional[pulumi.Input[str]] = None,
              value_calculation: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetAlarmResult]
func LookupAlarm(ctx *Context, args *LookupAlarmArgs, opts ...InvokeOption) (*LookupAlarmResult, error)
func LookupAlarmOutput(ctx *Context, args *LookupAlarmOutputArgs, opts ...InvokeOption) LookupAlarmResultOutput

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

public static class GetAlarm 
{
    public static Task<GetAlarmResult> InvokeAsync(GetAlarmArgs args, InvokeOptions? opts = null)
    public static Output<GetAlarmResult> Invoke(GetAlarmInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlarmResult> getAlarm(GetAlarmArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: cloudamqp:index/getAlarm:getAlarm
  Arguments:
    # Arguments dictionary

The following arguments are supported:

InstanceId int

The CloudAMQP instance identifier.

AlarmId int

The alarm identifier. Either use this or type to give cloudamqp.Alarm necessary information to retrieve the alarm.

Type string

The alarm type. Either use this or alarm_id to give cloudamqp.Alarm necessary information when retrieve the alarm. Supported alarm types

ValueCalculation string
InstanceId int

The CloudAMQP instance identifier.

AlarmId int

The alarm identifier. Either use this or type to give cloudamqp.Alarm necessary information to retrieve the alarm.

Type string

The alarm type. Either use this or alarm_id to give cloudamqp.Alarm necessary information when retrieve the alarm. Supported alarm types

ValueCalculation string
instanceId Integer

The CloudAMQP instance identifier.

alarmId Integer

The alarm identifier. Either use this or type to give cloudamqp.Alarm necessary information to retrieve the alarm.

type String

The alarm type. Either use this or alarm_id to give cloudamqp.Alarm necessary information when retrieve the alarm. Supported alarm types

valueCalculation String
instanceId number

The CloudAMQP instance identifier.

alarmId number

The alarm identifier. Either use this or type to give cloudamqp.Alarm necessary information to retrieve the alarm.

type string

The alarm type. Either use this or alarm_id to give cloudamqp.Alarm necessary information when retrieve the alarm. Supported alarm types

valueCalculation string
instance_id int

The CloudAMQP instance identifier.

alarm_id int

The alarm identifier. Either use this or type to give cloudamqp.Alarm necessary information to retrieve the alarm.

type str

The alarm type. Either use this or alarm_id to give cloudamqp.Alarm necessary information when retrieve the alarm. Supported alarm types

value_calculation str
instanceId Number

The CloudAMQP instance identifier.

alarmId Number

The alarm identifier. Either use this or type to give cloudamqp.Alarm necessary information to retrieve the alarm.

type String

The alarm type. Either use this or alarm_id to give cloudamqp.Alarm necessary information when retrieve the alarm. Supported alarm types

valueCalculation String

getAlarm Result

The following output properties are available:

Enabled bool
Id string

The provider-assigned unique ID for this managed resource.

InstanceId int
MessageType string
QueueRegex string
Recipients List<int>
ReminderInterval int
TimeThreshold int
ValueThreshold int
VhostRegex string
AlarmId int
Type string
ValueCalculation string
Enabled bool
Id string

The provider-assigned unique ID for this managed resource.

InstanceId int
MessageType string
QueueRegex string
Recipients []int
ReminderInterval int
TimeThreshold int
ValueThreshold int
VhostRegex string
AlarmId int
Type string
ValueCalculation string
enabled Boolean
id String

The provider-assigned unique ID for this managed resource.

instanceId Integer
messageType String
queueRegex String
recipients List<Integer>
reminderInterval Integer
timeThreshold Integer
valueThreshold Integer
vhostRegex String
alarmId Integer
type String
valueCalculation String
enabled boolean
id string

The provider-assigned unique ID for this managed resource.

instanceId number
messageType string
queueRegex string
recipients number[]
reminderInterval number
timeThreshold number
valueThreshold number
vhostRegex string
alarmId number
type string
valueCalculation string
enabled bool
id str

The provider-assigned unique ID for this managed resource.

instance_id int
message_type str
queue_regex str
recipients Sequence[int]
reminder_interval int
time_threshold int
value_threshold int
vhost_regex str
alarm_id int
type str
value_calculation str
enabled Boolean
id String

The provider-assigned unique ID for this managed resource.

instanceId Number
messageType String
queueRegex String
recipients List<Number>
reminderInterval Number
timeThreshold Number
valueThreshold Number
vhostRegex String
alarmId Number
type String
valueCalculation String

Package Details

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

This Pulumi package is based on the cloudamqp Terraform Provider.