Package com.pulumi.cloudamqp
Class Notification
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.cloudamqp.Notification
-
public class Notification extends com.pulumi.resources.CustomResourceThis resource allows you to create and manage recipients to receive alarm notifications. There will always be a default recipient created upon instance creation. This recipient will use team email and receive notifications from default alarms. Available for all subscription plans. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.cloudamqp.Notification; import com.pulumi.cloudamqp.NotificationArgs; 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) { var emailRecipient = new Notification("emailRecipient", NotificationArgs.builder() .instanceId(cloudamqp_instance.instance().id()) .type("email") .value("alarm@example.com") .build()); var victoropsRecipient = new Notification("victoropsRecipient", NotificationArgs.builder() .instanceId(cloudamqp_instance.instance().id()) .type("victorops") .value("<UUID>") .options(Map.of("rk", "ROUTINGKEY")) .build()); var pagerdutyRecipient = new Notification("pagerdutyRecipient", NotificationArgs.builder() .instanceId(cloudamqp_instance.instance().id()) .type("pagerduty") .value("<integration-key>") .options(Map.of("dedupkey", "DEDUPKEY")) .build()); } } ``` ## Notification Type reference Valid options for notification type. * email * webhook * pagerduty * victorops * opsgenie * opsgenie-eu * slack * teams ## Options parameter | Type | Options | Description | Note | |-----------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------| | Victorops | rk | Routing key to route alarm notification | - | | PagerDuty | dedupkey | Default the dedup key for PagerDuty is generated depending on what alarm has triggered, but here you can set what `dedup` key to use so even if the same alarm is triggered for different resources you only get one notification. Leave blank to use the generated dedup key. | If multiple alarms are triggered using this recipient, since they all share `dedup` key only the first alarm will be shown in PagerDuty | ## Dependency This resource depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`. ## Import `cloudamqp_notification` can be imported using CloudAMQP internal identifier of a recipient together (CSV separated) with the instance identifier. To retrieve the identifier of a recipient, use [CloudAMQP API](https://docs.cloudamqp.com/cloudamqp_api.html#list-notification-recipients) ```sh $ pulumi import cloudamqp:index/notification:Notification recipient <id>,<instance_id>` ```
-
-
Constructor Summary
Constructors Constructor Description Notification(java.lang.String name)Notification(java.lang.String name, NotificationArgs args)Notification(java.lang.String name, NotificationArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Notificationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, NotificationState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.Integer>instanceId()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>options()com.pulumi.core.Output<java.lang.String>type()com.pulumi.core.Output<java.lang.String>value()
-
-
-
Constructor Detail
-
Notification
public Notification(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Notification
public Notification(java.lang.String name, NotificationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Notification
public Notification(java.lang.String name, NotificationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
instanceId
public com.pulumi.core.Output<java.lang.Integer> instanceId()
- Returns:
- The CloudAMQP instance ID.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Display name of the recipient.
-
options
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> options()
- Returns:
- Options argument (e.g. `rk` used for VictorOps routing key).
-
type
public com.pulumi.core.Output<java.lang.String> type()
- Returns:
- Type of the notification. See valid options below.
-
value
public com.pulumi.core.Output<java.lang.String> value()
- Returns:
- Integration/API key or endpoint to send the notification.
-
get
public static Notification get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable NotificationState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-