1. Packages
  2. CloudAMQP
  3. API Docs
  4. getNotification
CloudAMQP v3.17.4 published on Monday, Feb 19, 2024 by Pulumi

cloudamqp.getNotification

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.17.4 published on Monday, Feb 19, 2024 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 recipient_id or name.

    Attributes reference

    All attributes reference are computed

    • id - The identifier for this resource.
    • type - The type of the recipient.
    • value - The notification endpoint, where to send the notification.
    • options- Options argument (e.g. rk used for VictorOps routing key).

    Dependency

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

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var defaultRecipient = CloudAmqp.GetNotification.Invoke(new()
        {
            InstanceId = cloudamqp_instance.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.LookupNotification(ctx, &cloudamqp.LookupNotificationArgs{
    			InstanceId: cloudamqp_instance.Instance.Id,
    			Name:       pulumi.StringRef("default"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    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(cloudamqp_instance.instance().id())
                .name("default")
                .build());
    
        }
    }
    
    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",
    });
    
    variables:
      defaultRecipient:
        fn::invoke:
          Function: cloudamqp:getNotification
          Arguments:
            instanceId: ${cloudamqp_instance.instance.id}
            name: default
    

    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,
                         options: Optional[Mapping[str, str]] = None,
                         recipient_id: Optional[int] = None,
                         opts: Optional[InvokeOptions] = None) -> GetNotificationResult
    def get_notification_output(instance_id: Optional[pulumi.Input[int]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         options: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                         recipient_id: Optional[pulumi.Input[int]] = 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)
    // Output-based functions aren't available in Java yet
    
    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.
    Options Dictionary<string, string>
    RecipientId int
    The recipient identifier.
    InstanceId int
    The CloudAMQP instance identifier.
    Name string
    The name set for the recipient.
    Options map[string]string
    RecipientId int
    The recipient identifier.
    instanceId Integer
    The CloudAMQP instance identifier.
    name String
    The name set for the recipient.
    options Map<String,String>
    recipientId Integer
    The recipient identifier.
    instanceId number
    The CloudAMQP instance identifier.
    name string
    The name set for the recipient.
    options {[key: string]: string}
    recipientId number
    The recipient identifier.
    instance_id int
    The CloudAMQP instance identifier.
    name str
    The name set for the recipient.
    options Mapping[str, str]
    recipient_id int
    The recipient identifier.
    instanceId Number
    The CloudAMQP instance identifier.
    name String
    The name set for the recipient.
    options Map<String>
    recipientId Number
    The recipient identifier.

    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
    Options Dictionary<string, string>
    RecipientId int
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId int
    Type string
    Value string
    Name string
    Options map[string]string
    RecipientId int
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId Integer
    type String
    value String
    name String
    options Map<String,String>
    recipientId Integer
    id string
    The provider-assigned unique ID for this managed resource.
    instanceId number
    type string
    value string
    name string
    options {[key: string]: string}
    recipientId number
    id str
    The provider-assigned unique ID for this managed resource.
    instance_id int
    type str
    value str
    name str
    options Mapping[str, str]
    recipient_id int
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId Number
    type String
    value String
    name String
    options Map<String>
    recipientId Number

    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.17.4 published on Monday, Feb 19, 2024 by Pulumi