Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getNotification

Use this data source to retrieve information about default or created recipients. The recipient will receive notifications assigned to an alarm that has triggered. To retrieve the recipient either use recipient_id or name.

Argument reference

  • instance_id - (Required) The CloudAMQP instance identifier.
  • recipient_id - (Optional) The recipient identifier.
  • name - (Optional) The name set for the recipient.

Attribute reference

  • type - (Computed) The type of the recipient.
  • value - (Computed) The notification endpoint, where to send the notification.

Dependency

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

Example Usage

using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultRecipient = Output.Create(CloudAmqp.GetNotification.InvokeAsync(new CloudAmqp.GetNotificationArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            Name = "default",
        }));
    }

}
package main

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

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "default"
        _, err := cloudamqp.LookupNotification(ctx, &cloudamqp.LookupNotificationArgs{
            InstanceId: cloudamqp_instance.Instance.Id,
            Name:       &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudamqp as cloudamqp

default_recipient = cloudamqp.get_notification(instance_id=cloudamqp_instance["instance"]["id"],
    name="default")
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const defaultRecipient = cloudamqp.getNotification({
    instanceId: cloudamqp_instance.instance.id,
    name: "default",
});

Using getNotification

function getNotification(args: GetNotificationArgs, opts?: InvokeOptions): Promise<GetNotificationResult>
def get_notification(instance_id: Optional[int] = None, name: Optional[str] = None, recipient_id: Optional[int] = None, opts: Optional[InvokeOptions] = None) -> GetNotificationResult
func LookupNotification(ctx *Context, args *LookupNotificationArgs, opts ...InvokeOption) (*LookupNotificationResult, error)

Note: This function is named LookupNotification in the Go SDK.

public static class GetNotification {
    public static Task<GetNotificationResult> InvokeAsync(GetNotificationArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

instanceId number
name string
recipientId number

getNotification Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

InstanceId int
Type string
Value string
Name string
RecipientId int
Id string

The provider-assigned unique ID for this managed resource.

InstanceId int
Type string
Value string
Name string
RecipientId int
id string

The provider-assigned unique ID for this managed resource.

instanceId number
type string
value string
name string
recipientId number
id str

The provider-assigned unique ID for this managed resource.

instance_id int
type str
value str
name str
recipient_id int

Package Details

Repository
https://github.com/pulumi/pulumi-cloudamqp
License
Apache-2.0
Notes
This Pulumi package is based on the cloudamqp Terraform Provider.