1. Packages
  2. Cloudamqp Provider
  3. API Docs
  4. getAlarms
CloudAMQP v3.22.0 published on Saturday, May 3, 2025 by Pulumi

cloudamqp.getAlarms

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.22.0 published on Saturday, May 3, 2025 by Pulumi

    Use this data source to retrieve a list of default or created alarms.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const queueAlarms = cloudamqp.getAlarms({
        instanceId: instance.id,
        type: "queue",
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    queue_alarms = cloudamqp.get_alarms(instance_id=instance["id"],
        type="queue")
    
    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.GetAlarms(ctx, &cloudamqp.GetAlarmsArgs{
    			InstanceId: instance.Id,
    			Type:       pulumi.StringRef("queue"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var queueAlarms = CloudAmqp.GetAlarms.Invoke(new()
        {
            InstanceId = instance.Id,
            Type = "queue",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetAlarmsArgs;
    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 queueAlarms = CloudamqpFunctions.getAlarms(GetAlarmsArgs.builder()
                .instanceId(instance.id())
                .type("queue")
                .build());
    
        }
    }
    
    variables:
      queueAlarms:
        fn::invoke:
          function: cloudamqp:getAlarms
          arguments:
            instanceId: ${instance.id}
            type: queue
    

    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

    Using getAlarms

    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 getAlarms(args: GetAlarmsArgs, opts?: InvokeOptions): Promise<GetAlarmsResult>
    function getAlarmsOutput(args: GetAlarmsOutputArgs, opts?: InvokeOptions): Output<GetAlarmsResult>
    def get_alarms(instance_id: Optional[int] = None,
                   type: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAlarmsResult
    def get_alarms_output(instance_id: Optional[pulumi.Input[int]] = None,
                   type: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetAlarmsResult]
    func GetAlarms(ctx *Context, args *GetAlarmsArgs, opts ...InvokeOption) (*GetAlarmsResult, error)
    func GetAlarmsOutput(ctx *Context, args *GetAlarmsOutputArgs, opts ...InvokeOption) GetAlarmsResultOutput

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

    public static class GetAlarms 
    {
        public static Task<GetAlarmsResult> InvokeAsync(GetAlarmsArgs args, InvokeOptions? opts = null)
        public static Output<GetAlarmsResult> Invoke(GetAlarmsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAlarmsResult> getAlarms(GetAlarmsArgs args, InvokeOptions options)
    public static Output<GetAlarmsResult> getAlarms(GetAlarmsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudamqp:index/getAlarms:getAlarms
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId int
    The CloudAMQP instance identifier.
    Type string
    The alarm type to filter for. Supported alarm types.
    InstanceId int
    The CloudAMQP instance identifier.
    Type string
    The alarm type to filter for. Supported alarm types.
    instanceId Integer
    The CloudAMQP instance identifier.
    type String
    The alarm type to filter for. Supported alarm types.
    instanceId number
    The CloudAMQP instance identifier.
    type string
    The alarm type to filter for. Supported alarm types.
    instance_id int
    The CloudAMQP instance identifier.
    type str
    The alarm type to filter for. Supported alarm types.
    instanceId Number
    The CloudAMQP instance identifier.
    type String
    The alarm type to filter for. Supported alarm types.

    getAlarms Result

    The following output properties are available:

    Alarms List<Pulumi.CloudAmqp.Outputs.GetAlarmsAlarm>
    List of alarms (see below for nested schema)
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId int
    Type string
    The type of the alarm.
    Alarms []GetAlarmsAlarm
    List of alarms (see below for nested schema)
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId int
    Type string
    The type of the alarm.
    alarms List<GetAlarmsAlarm>
    List of alarms (see below for nested schema)
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId Integer
    type String
    The type of the alarm.
    alarms GetAlarmsAlarm[]
    List of alarms (see below for nested schema)
    id string
    The provider-assigned unique ID for this managed resource.
    instanceId number
    type string
    The type of the alarm.
    alarms Sequence[GetAlarmsAlarm]
    List of alarms (see below for nested schema)
    id str
    The provider-assigned unique ID for this managed resource.
    instance_id int
    type str
    The type of the alarm.
    alarms List<Property Map>
    List of alarms (see below for nested schema)
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId Number
    type String
    The type of the alarm.

    Supporting Types

    GetAlarmsAlarm

    Enabled bool
    Enable/disable status of the alarm.
    MessageType string
    Message type (total, unacked, ready) used by queue alarm type.
    QueueRegex string
    Regular expression for which queue to check.
    Recipients List<int>
    Identifier for recipient to be notified.
    ReminderInterval int
    The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
    TimeThreshold int
    The time interval (in seconds) the value_threshold should be active before trigger an alarm.
    ValueThreshold int
    The value threshold that triggers the alarm.
    VhostRegex string
    Regular expression for which vhost to check
    AlarmId int
    The alarm identifier.
    Type string
    The alarm type to filter for. Supported alarm types.
    ValueCalculation string
    Disk value threshold calculation, (fixed, percentage) of disk space remaining.
    Enabled bool
    Enable/disable status of the alarm.
    MessageType string
    Message type (total, unacked, ready) used by queue alarm type.
    QueueRegex string
    Regular expression for which queue to check.
    Recipients []int
    Identifier for recipient to be notified.
    ReminderInterval int
    The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
    TimeThreshold int
    The time interval (in seconds) the value_threshold should be active before trigger an alarm.
    ValueThreshold int
    The value threshold that triggers the alarm.
    VhostRegex string
    Regular expression for which vhost to check
    AlarmId int
    The alarm identifier.
    Type string
    The alarm type to filter for. Supported alarm types.
    ValueCalculation string
    Disk value threshold calculation, (fixed, percentage) of disk space remaining.
    enabled Boolean
    Enable/disable status of the alarm.
    messageType String
    Message type (total, unacked, ready) used by queue alarm type.
    queueRegex String
    Regular expression for which queue to check.
    recipients List<Integer>
    Identifier for recipient to be notified.
    reminderInterval Integer
    The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
    timeThreshold Integer
    The time interval (in seconds) the value_threshold should be active before trigger an alarm.
    valueThreshold Integer
    The value threshold that triggers the alarm.
    vhostRegex String
    Regular expression for which vhost to check
    alarmId Integer
    The alarm identifier.
    type String
    The alarm type to filter for. Supported alarm types.
    valueCalculation String
    Disk value threshold calculation, (fixed, percentage) of disk space remaining.
    enabled boolean
    Enable/disable status of the alarm.
    messageType string
    Message type (total, unacked, ready) used by queue alarm type.
    queueRegex string
    Regular expression for which queue to check.
    recipients number[]
    Identifier for recipient to be notified.
    reminderInterval number
    The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
    timeThreshold number
    The time interval (in seconds) the value_threshold should be active before trigger an alarm.
    valueThreshold number
    The value threshold that triggers the alarm.
    vhostRegex string
    Regular expression for which vhost to check
    alarmId number
    The alarm identifier.
    type string
    The alarm type to filter for. Supported alarm types.
    valueCalculation string
    Disk value threshold calculation, (fixed, percentage) of disk space remaining.
    enabled bool
    Enable/disable status of the alarm.
    message_type str
    Message type (total, unacked, ready) used by queue alarm type.
    queue_regex str
    Regular expression for which queue to check.
    recipients Sequence[int]
    Identifier for recipient to be notified.
    reminder_interval int
    The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
    time_threshold int
    The time interval (in seconds) the value_threshold should be active before trigger an alarm.
    value_threshold int
    The value threshold that triggers the alarm.
    vhost_regex str
    Regular expression for which vhost to check
    alarm_id int
    The alarm identifier.
    type str
    The alarm type to filter for. Supported alarm types.
    value_calculation str
    Disk value threshold calculation, (fixed, percentage) of disk space remaining.
    enabled Boolean
    Enable/disable status of the alarm.
    messageType String
    Message type (total, unacked, ready) used by queue alarm type.
    queueRegex String
    Regular expression for which queue to check.
    recipients List<Number>
    Identifier for recipient to be notified.
    reminderInterval Number
    The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
    timeThreshold Number
    The time interval (in seconds) the value_threshold should be active before trigger an alarm.
    valueThreshold Number
    The value threshold that triggers the alarm.
    vhostRegex String
    Regular expression for which vhost to check
    alarmId Number
    The alarm identifier.
    type String
    The alarm type to filter for. Supported alarm types.
    valueCalculation String
    Disk value threshold calculation, (fixed, percentage) of disk space remaining.

    Package Details

    Repository
    CloudAMQP pulumi/pulumi-cloudamqp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudamqp Terraform Provider.
    cloudamqp logo
    CloudAMQP v3.22.0 published on Saturday, May 3, 2025 by Pulumi