1. Packages
  2. Cloudamqp Provider
  3. API Docs
  4. getNotifications
CloudAMQP v3.22.0 published on Saturday, May 3, 2025 by Pulumi

cloudamqp.getNotifications

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.22.0 published on Saturday, May 3, 2025 by Pulumi

    Use this data source to retrieve information about all notification recipients. Each recipient will receive notifications assigned to an alarm that has triggered.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const defaultRecipient = cloudamqp.getNotifications({
        instanceId: instance.id,
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    default_recipient = cloudamqp.get_notifications(instance_id=instance["id"])
    
    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.GetNotifications(ctx, &cloudamqp.GetNotificationsArgs{
    			InstanceId: instance.Id,
    		}, 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.GetNotifications.Invoke(new()
        {
            InstanceId = instance.Id,
        });
    
    });
    
    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.GetNotificationsArgs;
    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.getNotifications(GetNotificationsArgs.builder()
                .instanceId(instance.id())
                .build());
    
        }
    }
    
    variables:
      defaultRecipient:
        fn::invoke:
          function: cloudamqp:getNotifications
          arguments:
            instanceId: ${instance.id}
    

    Dependency

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

    Using getNotifications

    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 getNotifications(args: GetNotificationsArgs, opts?: InvokeOptions): Promise<GetNotificationsResult>
    function getNotificationsOutput(args: GetNotificationsOutputArgs, opts?: InvokeOptions): Output<GetNotificationsResult>
    def get_notifications(instance_id: Optional[int] = None,
                          opts: Optional[InvokeOptions] = None) -> GetNotificationsResult
    def get_notifications_output(instance_id: Optional[pulumi.Input[int]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetNotificationsResult]
    func GetNotifications(ctx *Context, args *GetNotificationsArgs, opts ...InvokeOption) (*GetNotificationsResult, error)
    func GetNotificationsOutput(ctx *Context, args *GetNotificationsOutputArgs, opts ...InvokeOption) GetNotificationsResultOutput

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

    public static class GetNotifications 
    {
        public static Task<GetNotificationsResult> InvokeAsync(GetNotificationsArgs args, InvokeOptions? opts = null)
        public static Output<GetNotificationsResult> Invoke(GetNotificationsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNotificationsResult> getNotifications(GetNotificationsArgs args, InvokeOptions options)
    public static Output<GetNotificationsResult> getNotifications(GetNotificationsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudamqp:index/getNotifications:getNotifications
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId int
    The CloudAMQP instance identifier.
    InstanceId int
    The CloudAMQP instance identifier.
    instanceId Integer
    The CloudAMQP instance identifier.
    instanceId number
    The CloudAMQP instance identifier.
    instance_id int
    The CloudAMQP instance identifier.
    instanceId Number
    The CloudAMQP instance identifier.

    getNotifications Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId int
    Recipients List<Pulumi.CloudAmqp.Outputs.GetNotificationsRecipient>
    List of alarms (see below for nested schema)
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceId int
    Recipients []GetNotificationsRecipient
    List of alarms (see below for nested schema)
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId Integer
    recipients List<GetNotificationsRecipient>
    List of alarms (see below for nested schema)
    id string
    The provider-assigned unique ID for this managed resource.
    instanceId number
    recipients GetNotificationsRecipient[]
    List of alarms (see below for nested schema)
    id str
    The provider-assigned unique ID for this managed resource.
    instance_id int
    recipients Sequence[GetNotificationsRecipient]
    List of alarms (see below for nested schema)
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId Number
    recipients List<Property Map>
    List of alarms (see below for nested schema)

    Supporting Types

    GetNotificationsRecipient

    Name string
    The name of the recipient.
    Options Dictionary<string, string>
    Options argument (e.g. rk used for VictorOps routing key).
    RecipientId int
    The identifier for the recipient.
    Type string
    The type of the recipient.
    Value string
    The notification endpoint, where to send the notification.
    Name string
    The name of the recipient.
    Options map[string]string
    Options argument (e.g. rk used for VictorOps routing key).
    RecipientId int
    The identifier for the recipient.
    Type string
    The type of the recipient.
    Value string
    The notification endpoint, where to send the notification.
    name String
    The name of the recipient.
    options Map<String,String>
    Options argument (e.g. rk used for VictorOps routing key).
    recipientId Integer
    The identifier for the recipient.
    type String
    The type of the recipient.
    value String
    The notification endpoint, where to send the notification.
    name string
    The name of the recipient.
    options {[key: string]: string}
    Options argument (e.g. rk used for VictorOps routing key).
    recipientId number
    The identifier for the recipient.
    type string
    The type of the recipient.
    value string
    The notification endpoint, where to send the notification.
    name str
    The name of the recipient.
    options Mapping[str, str]
    Options argument (e.g. rk used for VictorOps routing key).
    recipient_id int
    The identifier for the recipient.
    type str
    The type of the recipient.
    value str
    The notification endpoint, where to send the notification.
    name String
    The name of the recipient.
    options Map<String>
    Options argument (e.g. rk used for VictorOps routing key).
    recipientId Number
    The identifier for the recipient.
    type String
    The type of the recipient.
    value String
    The notification endpoint, where to send the notification.

    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.22.0 published on Saturday, May 3, 2025 by Pulumi