1. Packages
  2. Cloudamqp Provider
  3. API Docs
  4. Alarm
CloudAMQP v3.21.0 published on Tuesday, Apr 8, 2025 by Pulumi

cloudamqp.Alarm

Explore with Pulumi AI

Import

cloudamqp_alarm can be imported using the resource identifier together with the CloudAMQP instance

identifier (CSV separated). To retrieve the resource identifier, use [CloudAMQP API list alarms].

From Terraform v1.5.0, the import block can be used to import this resource:

hcl

import {

to = cloudamqp_alarm.alarm

id = format(",%s", cloudamqp_instance.instance.id)

}

Or use Terraform CLI:

$ pulumi import cloudamqp:index/alarm:Alarm alarm <id>,<instance_id>`
Copy

Create Alarm Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);
@overload
def Alarm(resource_name: str,
          args: AlarmArgs,
          opts: Optional[ResourceOptions] = None)

@overload
def Alarm(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          enabled: Optional[bool] = None,
          instance_id: Optional[int] = None,
          recipients: Optional[Sequence[int]] = None,
          type: Optional[str] = None,
          message_type: Optional[str] = None,
          queue_regex: Optional[str] = None,
          reminder_interval: Optional[int] = None,
          time_threshold: Optional[int] = None,
          value_calculation: Optional[str] = None,
          value_threshold: Optional[int] = None,
          vhost_regex: Optional[str] = None)
func NewAlarm(ctx *Context, name string, args AlarmArgs, opts ...ResourceOption) (*Alarm, error)
public Alarm(string name, AlarmArgs args, CustomResourceOptions? opts = null)
public Alarm(String name, AlarmArgs args)
public Alarm(String name, AlarmArgs args, CustomResourceOptions options)
type: cloudamqp:Alarm
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AlarmArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AlarmArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AlarmArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AlarmArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AlarmArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var alarmResource = new CloudAmqp.Alarm("alarmResource", new()
{
    Enabled = false,
    InstanceId = 0,
    Recipients = new[]
    {
        0,
    },
    Type = "string",
    MessageType = "string",
    QueueRegex = "string",
    ReminderInterval = 0,
    TimeThreshold = 0,
    ValueCalculation = "string",
    ValueThreshold = 0,
    VhostRegex = "string",
});
Copy
example, err := cloudamqp.NewAlarm(ctx, "alarmResource", &cloudamqp.AlarmArgs{
	Enabled:    pulumi.Bool(false),
	InstanceId: pulumi.Int(0),
	Recipients: pulumi.IntArray{
		pulumi.Int(0),
	},
	Type:             pulumi.String("string"),
	MessageType:      pulumi.String("string"),
	QueueRegex:       pulumi.String("string"),
	ReminderInterval: pulumi.Int(0),
	TimeThreshold:    pulumi.Int(0),
	ValueCalculation: pulumi.String("string"),
	ValueThreshold:   pulumi.Int(0),
	VhostRegex:       pulumi.String("string"),
})
Copy
var alarmResource = new Alarm("alarmResource", AlarmArgs.builder()
    .enabled(false)
    .instanceId(0)
    .recipients(0)
    .type("string")
    .messageType("string")
    .queueRegex("string")
    .reminderInterval(0)
    .timeThreshold(0)
    .valueCalculation("string")
    .valueThreshold(0)
    .vhostRegex("string")
    .build());
Copy
alarm_resource = cloudamqp.Alarm("alarmResource",
    enabled=False,
    instance_id=0,
    recipients=[0],
    type="string",
    message_type="string",
    queue_regex="string",
    reminder_interval=0,
    time_threshold=0,
    value_calculation="string",
    value_threshold=0,
    vhost_regex="string")
Copy
const alarmResource = new cloudamqp.Alarm("alarmResource", {
    enabled: false,
    instanceId: 0,
    recipients: [0],
    type: "string",
    messageType: "string",
    queueRegex: "string",
    reminderInterval: 0,
    timeThreshold: 0,
    valueCalculation: "string",
    valueThreshold: 0,
    vhostRegex: "string",
});
Copy
type: cloudamqp:Alarm
properties:
    enabled: false
    instanceId: 0
    messageType: string
    queueRegex: string
    recipients:
        - 0
    reminderInterval: 0
    timeThreshold: 0
    type: string
    valueCalculation: string
    valueThreshold: 0
    vhostRegex: string
Copy

Alarm Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Alarm resource accepts the following input properties:

Enabled This property is required. bool
Enable or disable the alarm to trigger.
InstanceId
This property is required.
Changes to this property will trigger replacement.
int
The CloudAMQP instance ID.
Recipients This property is required. List<int>
Identifier for recipient to be notified. Leave empty to notify all recipients.
Type This property is required. string
The alarm type, see valid options below.
MessageType string

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

QueueRegex string
Regex for which queue to check.
ReminderInterval int
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
TimeThreshold int
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
ValueCalculation string

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

ValueThreshold int
The value to trigger the alarm for.
VhostRegex string
Regex for which vhost to check
Enabled This property is required. bool
Enable or disable the alarm to trigger.
InstanceId
This property is required.
Changes to this property will trigger replacement.
int
The CloudAMQP instance ID.
Recipients This property is required. []int
Identifier for recipient to be notified. Leave empty to notify all recipients.
Type This property is required. string
The alarm type, see valid options below.
MessageType string

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

QueueRegex string
Regex for which queue to check.
ReminderInterval int
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
TimeThreshold int
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
ValueCalculation string

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

ValueThreshold int
The value to trigger the alarm for.
VhostRegex string
Regex for which vhost to check
enabled This property is required. Boolean
Enable or disable the alarm to trigger.
instanceId
This property is required.
Changes to this property will trigger replacement.
Integer
The CloudAMQP instance ID.
recipients This property is required. List<Integer>
Identifier for recipient to be notified. Leave empty to notify all recipients.
type This property is required. String
The alarm type, see valid options below.
messageType String

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

queueRegex String
Regex for which queue to check.
reminderInterval Integer
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
timeThreshold Integer
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
valueCalculation String

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

valueThreshold Integer
The value to trigger the alarm for.
vhostRegex String
Regex for which vhost to check
enabled This property is required. boolean
Enable or disable the alarm to trigger.
instanceId
This property is required.
Changes to this property will trigger replacement.
number
The CloudAMQP instance ID.
recipients This property is required. number[]
Identifier for recipient to be notified. Leave empty to notify all recipients.
type This property is required. string
The alarm type, see valid options below.
messageType string

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

queueRegex string
Regex for which queue to check.
reminderInterval number
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
timeThreshold number
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
valueCalculation string

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

valueThreshold number
The value to trigger the alarm for.
vhostRegex string
Regex for which vhost to check
enabled This property is required. bool
Enable or disable the alarm to trigger.
instance_id
This property is required.
Changes to this property will trigger replacement.
int
The CloudAMQP instance ID.
recipients This property is required. Sequence[int]
Identifier for recipient to be notified. Leave empty to notify all recipients.
type This property is required. str
The alarm type, see valid options below.
message_type str

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

queue_regex str
Regex for which queue to check.
reminder_interval int
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
time_threshold int
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
value_calculation str

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

value_threshold int
The value to trigger the alarm for.
vhost_regex str
Regex for which vhost to check
enabled This property is required. Boolean
Enable or disable the alarm to trigger.
instanceId
This property is required.
Changes to this property will trigger replacement.
Number
The CloudAMQP instance ID.
recipients This property is required. List<Number>
Identifier for recipient to be notified. Leave empty to notify all recipients.
type This property is required. String
The alarm type, see valid options below.
messageType String

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

queueRegex String
Regex for which queue to check.
reminderInterval Number
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
timeThreshold Number
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
valueCalculation String

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

valueThreshold Number
The value to trigger the alarm for.
vhostRegex String
Regex for which vhost to check

Outputs

All input properties are implicitly available as output properties. Additionally, the Alarm resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Alarm Resource

Get an existing Alarm resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AlarmState, opts?: CustomResourceOptions): Alarm
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        instance_id: Optional[int] = None,
        message_type: Optional[str] = None,
        queue_regex: Optional[str] = None,
        recipients: Optional[Sequence[int]] = None,
        reminder_interval: Optional[int] = None,
        time_threshold: Optional[int] = None,
        type: Optional[str] = None,
        value_calculation: Optional[str] = None,
        value_threshold: Optional[int] = None,
        vhost_regex: Optional[str] = None) -> Alarm
func GetAlarm(ctx *Context, name string, id IDInput, state *AlarmState, opts ...ResourceOption) (*Alarm, error)
public static Alarm Get(string name, Input<string> id, AlarmState? state, CustomResourceOptions? opts = null)
public static Alarm get(String name, Output<String> id, AlarmState state, CustomResourceOptions options)
resources:  _:    type: cloudamqp:Alarm    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Enabled bool
Enable or disable the alarm to trigger.
InstanceId Changes to this property will trigger replacement. int
The CloudAMQP instance ID.
MessageType string

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

QueueRegex string
Regex for which queue to check.
Recipients List<int>
Identifier for recipient to be notified. Leave empty to notify all recipients.
ReminderInterval int
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
TimeThreshold int
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
Type string
The alarm type, see valid options below.
ValueCalculation string

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

ValueThreshold int
The value to trigger the alarm for.
VhostRegex string
Regex for which vhost to check
Enabled bool
Enable or disable the alarm to trigger.
InstanceId Changes to this property will trigger replacement. int
The CloudAMQP instance ID.
MessageType string

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

QueueRegex string
Regex for which queue to check.
Recipients []int
Identifier for recipient to be notified. Leave empty to notify all recipients.
ReminderInterval int
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
TimeThreshold int
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
Type string
The alarm type, see valid options below.
ValueCalculation string

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

ValueThreshold int
The value to trigger the alarm for.
VhostRegex string
Regex for which vhost to check
enabled Boolean
Enable or disable the alarm to trigger.
instanceId Changes to this property will trigger replacement. Integer
The CloudAMQP instance ID.
messageType String

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

queueRegex String
Regex for which queue to check.
recipients List<Integer>
Identifier for recipient to be notified. Leave empty to notify all recipients.
reminderInterval Integer
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
timeThreshold Integer
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
type String
The alarm type, see valid options below.
valueCalculation String

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

valueThreshold Integer
The value to trigger the alarm for.
vhostRegex String
Regex for which vhost to check
enabled boolean
Enable or disable the alarm to trigger.
instanceId Changes to this property will trigger replacement. number
The CloudAMQP instance ID.
messageType string

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

queueRegex string
Regex for which queue to check.
recipients number[]
Identifier for recipient to be notified. Leave empty to notify all recipients.
reminderInterval number
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
timeThreshold number
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
type string
The alarm type, see valid options below.
valueCalculation string

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

valueThreshold number
The value to trigger the alarm for.
vhostRegex string
Regex for which vhost to check
enabled bool
Enable or disable the alarm to trigger.
instance_id Changes to this property will trigger replacement. int
The CloudAMQP instance ID.
message_type str

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

queue_regex str
Regex for which queue to check.
recipients Sequence[int]
Identifier for recipient to be notified. Leave empty to notify all recipients.
reminder_interval int
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
time_threshold int
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
type str
The alarm type, see valid options below.
value_calculation str

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

value_threshold int
The value to trigger the alarm for.
vhost_regex str
Regex for which vhost to check
enabled Boolean
Enable or disable the alarm to trigger.
instanceId Changes to this property will trigger replacement. Number
The CloudAMQP instance ID.
messageType String

Message type (total, unacked, ready) used by queue alarm type.

Specific argument for disk alarm

queueRegex String
Regex for which queue to check.
recipients List<Number>
Identifier for recipient to be notified. Leave empty to notify all recipients.
reminderInterval Number
The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders. The Default is 0.
timeThreshold Number
The time interval (in seconds) the value_threshold should be active before triggering an alarm.
type String
The alarm type, see valid options below.
valueCalculation String

Disk value threshold calculation, fixed, percentage of disk space remaining.

Based on alarm type, different arguments are flagged as required or optional.

valueThreshold Number
The value to trigger the alarm for.
vhostRegex String
Regex for which vhost to check

Package Details

Repository
CloudAMQP pulumi/pulumi-cloudamqp
License
Apache-2.0
Notes
This Pulumi package is based on the cloudamqp Terraform Provider.