1. Packages
  2. Packages
  3. CloudAMQP Provider
  4. API Docs
  5. getNotification
Viewing docs for CloudAMQP v3.29.2
published on Friday, May 1, 2026 by Pulumi
cloudamqp logo
Viewing docs for CloudAMQP v3.29.2
published on Friday, May 1, 2026 by Pulumi

    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 recipientId or name.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const defaultRecipient = cloudamqp.getNotification({
        instanceId: instance.id,
        name: "default",
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    default_recipient = cloudamqp.get_notification(instance_id=instance["id"],
        name="default")
    
    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.GetNotification(ctx, &cloudamqp.LookupNotificationArgs{
    			InstanceId: instance.Id,
    			Name:       pulumi.StringRef("default"),
    		}, 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 defaultRecipient = CloudAmqp.Index.GetNotification.Invoke(new()
        {
            InstanceId = instance.Id,
            Name = "default",
        });
    
    });
    
    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.GetNotificationArgs;
    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 defaultRecipient = CloudamqpFunctions.getNotification(GetNotificationArgs.builder()
                .instanceId(instance.id())
                .name("default")
                .build());
    
        }
    }
    
    variables:
      defaultRecipient:
        fn::invoke:
          function: cloudamqp:getNotification
          arguments:
            instanceId: ${instance.id}
            name: default
    

    Dependency

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

    Using getNotification

    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 getNotification(args: GetNotificationArgs, opts?: InvokeOptions): Promise<GetNotificationResult>
    function getNotificationOutput(args: GetNotificationOutputArgs, opts?: InvokeOptions): Output<GetNotificationResult>
    def get_notification(instance_id: Optional[int] = None,
                         name: Optional[str] = None,
                         recipient_id: Optional[int] = None,
                         responders: Optional[Sequence[GetNotificationResponder]] = None,
                         opts: Optional[InvokeOptions] = None) -> GetNotificationResult
    def get_notification_output(instance_id: pulumi.Input[Optional[int]] = None,
                         name: pulumi.Input[Optional[str]] = None,
                         recipient_id: pulumi.Input[Optional[int]] = None,
                         responders: pulumi.Input[Optional[Sequence[pulumi.Input[GetNotificationResponderArgs]]]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetNotificationResult]
    func LookupNotification(ctx *Context, args *LookupNotificationArgs, opts ...InvokeOption) (*LookupNotificationResult, error)
    func LookupNotificationOutput(ctx *Context, args *LookupNotificationOutputArgs, opts ...InvokeOption) LookupNotificationResultOutput

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

    public static class GetNotification 
    {
        public static Task<GetNotificationResult> InvokeAsync(GetNotificationArgs args, InvokeOptions? opts = null)
        public static Output<GetNotificationResult> Invoke(GetNotificationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNotificationResult> getNotification(GetNotificationArgs args, InvokeOptions options)
    public static Output<GetNotificationResult> getNotification(GetNotificationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudamqp:index/getNotification:getNotification
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId int
    The CloudAMQP instance identifier.
    Name string
    The name set for the recipient.
    RecipientId int
    The recipient identifier.
    Responders List<Pulumi.CloudAmqp.Inputs.GetNotificationResponder>
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    InstanceId int
    The CloudAMQP instance identifier.
    Name string
    The name set for the recipient.
    RecipientId int
    The recipient identifier.
    Responders []GetNotificationResponder
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    instanceId Integer
    The CloudAMQP instance identifier.
    name String
    The name set for the recipient.
    recipientId Integer
    The recipient identifier.
    responders List<GetNotificationResponder>
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    instanceId number
    The CloudAMQP instance identifier.
    name string
    The name set for the recipient.
    recipientId number
    The recipient identifier.
    responders GetNotificationResponder[]
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    instance_id int
    The CloudAMQP instance identifier.
    name str
    The name set for the recipient.
    recipient_id int
    The recipient identifier.
    responders Sequence[GetNotificationResponder]
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    instanceId Number
    The CloudAMQP instance identifier.
    name String
    The name set for the recipient.
    recipientId Number
    The recipient identifier.
    responders List<Property Map>
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.

    getNotification Result

    The following output properties are available:

    Id string
    (Optional) Identifier in UUID format
    InstanceId int
    Name string
    (Optional) Name of the responder
    Options Dictionary<string, string>
    Options argument (e.g. rk used for VictorOps routing key).
    RecipientId int
    Type string
    (Required) Type of responder. [team, user, escalation, schedule]
    Value string
    The notification endpoint, where to send the notification.
    Responders List<Pulumi.CloudAmqp.Outputs.GetNotificationResponder>
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    Id string
    (Optional) Identifier in UUID format
    InstanceId int
    Name string
    (Optional) Name of the responder
    Options map[string]string
    Options argument (e.g. rk used for VictorOps routing key).
    RecipientId int
    Type string
    (Required) Type of responder. [team, user, escalation, schedule]
    Value string
    The notification endpoint, where to send the notification.
    Responders []GetNotificationResponder
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    id String
    (Optional) Identifier in UUID format
    instanceId Integer
    name String
    (Optional) Name of the responder
    options Map<String,String>
    Options argument (e.g. rk used for VictorOps routing key).
    recipientId Integer
    type String
    (Required) Type of responder. [team, user, escalation, schedule]
    value String
    The notification endpoint, where to send the notification.
    responders List<GetNotificationResponder>
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    id string
    (Optional) Identifier in UUID format
    instanceId number
    name string
    (Optional) Name of the responder
    options {[key: string]: string}
    Options argument (e.g. rk used for VictorOps routing key).
    recipientId number
    type string
    (Required) Type of responder. [team, user, escalation, schedule]
    value string
    The notification endpoint, where to send the notification.
    responders GetNotificationResponder[]
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    id str
    (Optional) Identifier in UUID format
    instance_id int
    name str
    (Optional) Name of the responder
    options Mapping[str, str]
    Options argument (e.g. rk used for VictorOps routing key).
    recipient_id int
    type str
    (Required) Type of responder. [team, user, escalation, schedule]
    value str
    The notification endpoint, where to send the notification.
    responders Sequence[GetNotificationResponder]
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.
    id String
    (Optional) Identifier in UUID format
    instanceId Number
    name String
    (Optional) Name of the responder
    options Map<String>
    Options argument (e.g. rk used for VictorOps routing key).
    recipientId Number
    type String
    (Required) Type of responder. [team, user, escalation, schedule]
    value String
    The notification endpoint, where to send the notification.
    responders List<Property Map>
    An array of reponders (only for OpsGenie). Each responders block consists of the field documented below.

    Supporting Types

    GetNotificationResponder

    Id string
    (Optional) Identifier in UUID format
    Name string
    The name set for the recipient.
    Type string
    (Required) Type of responder. [team, user, escalation, schedule]
    Username string
    (Optional) Username of the responder
    Id string
    (Optional) Identifier in UUID format
    Name string
    The name set for the recipient.
    Type string
    (Required) Type of responder. [team, user, escalation, schedule]
    Username string
    (Optional) Username of the responder
    id String
    (Optional) Identifier in UUID format
    name String
    The name set for the recipient.
    type String
    (Required) Type of responder. [team, user, escalation, schedule]
    username String
    (Optional) Username of the responder
    id string
    (Optional) Identifier in UUID format
    name string
    The name set for the recipient.
    type string
    (Required) Type of responder. [team, user, escalation, schedule]
    username string
    (Optional) Username of the responder
    id str
    (Optional) Identifier in UUID format
    name str
    The name set for the recipient.
    type str
    (Required) Type of responder. [team, user, escalation, schedule]
    username str
    (Optional) Username of the responder
    id String
    (Optional) Identifier in UUID format
    name String
    The name set for the recipient.
    type String
    (Required) Type of responder. [team, user, escalation, schedule]
    username String
    (Optional) Username of the responder

    Package Details

    Repository
    CloudAMQP pulumi/pulumi-cloudamqp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudamqp Terraform Provider.
    cloudamqp logo
    Viewing docs for CloudAMQP v3.29.2
    published on Friday, May 1, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.