1. Packages
  2. Cloudamqp Provider
  3. API Docs
  4. IntegrationAwsEventbridge
CloudAMQP v3.20.0 published on Thursday, Sep 5, 2024 by Pulumi

cloudamqp.IntegrationAwsEventbridge

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.20.0 published on Thursday, Sep 5, 2024 by Pulumi

    This resource allows you to create and manage, an AWS EventBridge for a CloudAMQP instance. Once created, continue to map the EventBridge in the AWS Eventbridge console.

    Our consumer needs to have exclusive usage to the configured queue and the maximum body size allowed on msgs by AWS is 256kb. The message body has to be valid JSON for AWS Eventbridge to accept it. If messages are too large or are not valid JSON, they will be rejected (tip: setup a dead-letter queue to catch them).

    Not possible to update this resource. Any changes made to the argument will destroy and recreate the resource. Hence why all arguments use ForceNew.

    Only available for dedicated subscription plans.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const instance = new cloudamqp.Instance("instance", {
        name: "Test instance",
        plan: "squirrel-1",
        region: "amazon-web-services::us-west-1",
        rmqVersion: "3.11.5",
        tags: ["aws"],
    });
    const awsEventbridge = new cloudamqp.IntegrationAwsEventbridge("aws_eventbridge", {
        instanceId: instance.id,
        vhost: instance.vhost,
        queue: "<QUEUE-NAME>",
        awsAccountId: "<AWS-ACCOUNT-ID>",
        awsRegion: "us-west-1",
        withHeaders: true,
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    instance = cloudamqp.Instance("instance",
        name="Test instance",
        plan="squirrel-1",
        region="amazon-web-services::us-west-1",
        rmq_version="3.11.5",
        tags=["aws"])
    aws_eventbridge = cloudamqp.IntegrationAwsEventbridge("aws_eventbridge",
        instance_id=instance.id,
        vhost=instance.vhost,
        queue="<QUEUE-NAME>",
        aws_account_id="<AWS-ACCOUNT-ID>",
        aws_region="us-west-1",
        with_headers=True)
    
    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 {
    		instance, err := cloudamqp.NewInstance(ctx, "instance", &cloudamqp.InstanceArgs{
    			Name:       pulumi.String("Test instance"),
    			Plan:       pulumi.String("squirrel-1"),
    			Region:     pulumi.String("amazon-web-services::us-west-1"),
    			RmqVersion: pulumi.String("3.11.5"),
    			Tags: pulumi.StringArray{
    				pulumi.String("aws"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudamqp.NewIntegrationAwsEventbridge(ctx, "aws_eventbridge", &cloudamqp.IntegrationAwsEventbridgeArgs{
    			InstanceId:   instance.ID(),
    			Vhost:        instance.Vhost,
    			Queue:        pulumi.String("<QUEUE-NAME>"),
    			AwsAccountId: pulumi.String("<AWS-ACCOUNT-ID>"),
    			AwsRegion:    pulumi.String("us-west-1"),
    			WithHeaders:  pulumi.Bool(true),
    		})
    		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 instance = new CloudAmqp.Instance("instance", new()
        {
            Name = "Test instance",
            Plan = "squirrel-1",
            Region = "amazon-web-services::us-west-1",
            RmqVersion = "3.11.5",
            Tags = new[]
            {
                "aws",
            },
        });
    
        var awsEventbridge = new CloudAmqp.IntegrationAwsEventbridge("aws_eventbridge", new()
        {
            InstanceId = instance.Id,
            Vhost = instance.Vhost,
            Queue = "<QUEUE-NAME>",
            AwsAccountId = "<AWS-ACCOUNT-ID>",
            AwsRegion = "us-west-1",
            WithHeaders = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.Instance;
    import com.pulumi.cloudamqp.InstanceArgs;
    import com.pulumi.cloudamqp.IntegrationAwsEventbridge;
    import com.pulumi.cloudamqp.IntegrationAwsEventbridgeArgs;
    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 instance = new Instance("instance", InstanceArgs.builder()
                .name("Test instance")
                .plan("squirrel-1")
                .region("amazon-web-services::us-west-1")
                .rmqVersion("3.11.5")
                .tags("aws")
                .build());
    
            var awsEventbridge = new IntegrationAwsEventbridge("awsEventbridge", IntegrationAwsEventbridgeArgs.builder()
                .instanceId(instance.id())
                .vhost(instance.vhost())
                .queue("<QUEUE-NAME>")
                .awsAccountId("<AWS-ACCOUNT-ID>")
                .awsRegion("us-west-1")
                .withHeaders(true)
                .build());
    
        }
    }
    
    resources:
      instance:
        type: cloudamqp:Instance
        properties:
          name: Test instance
          plan: squirrel-1
          region: amazon-web-services::us-west-1
          rmqVersion: 3.11.5
          tags:
            - aws
      awsEventbridge:
        type: cloudamqp:IntegrationAwsEventbridge
        name: aws_eventbridge
        properties:
          instanceId: ${instance.id}
          vhost: ${instance.vhost}
          queue: <QUEUE-NAME>
          awsAccountId: <AWS-ACCOUNT-ID>
          awsRegion: us-west-1
          withHeaders: true
    

    Argument references

    The following arguments are supported:

    • aws_account_id - (ForceNew/Required) The 12 digit AWS Account ID where you want the events to be sent to.
    • aws_region- (ForceNew/Required) The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, …, etc.)
    • vhost- (ForceNew/Required) The VHost the queue resides in.
    • queue - (ForceNew/Required) A (durable) queue on your RabbitMQ instance.
    • with_headers - (ForceNew/Required) Include message headers in the event data. ({ "headers": { }, "body": { "your": "message" } })

    Dependency

    This resource depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.

    Create IntegrationAwsEventbridge Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IntegrationAwsEventbridge(name: string, args: IntegrationAwsEventbridgeArgs, opts?: CustomResourceOptions);
    @overload
    def IntegrationAwsEventbridge(resource_name: str,
                                  args: IntegrationAwsEventbridgeArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def IntegrationAwsEventbridge(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  aws_account_id: Optional[str] = None,
                                  aws_region: Optional[str] = None,
                                  instance_id: Optional[int] = None,
                                  queue: Optional[str] = None,
                                  vhost: Optional[str] = None,
                                  with_headers: Optional[bool] = None)
    func NewIntegrationAwsEventbridge(ctx *Context, name string, args IntegrationAwsEventbridgeArgs, opts ...ResourceOption) (*IntegrationAwsEventbridge, error)
    public IntegrationAwsEventbridge(string name, IntegrationAwsEventbridgeArgs args, CustomResourceOptions? opts = null)
    public IntegrationAwsEventbridge(String name, IntegrationAwsEventbridgeArgs args)
    public IntegrationAwsEventbridge(String name, IntegrationAwsEventbridgeArgs args, CustomResourceOptions options)
    
    type: cloudamqp:IntegrationAwsEventbridge
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IntegrationAwsEventbridgeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IntegrationAwsEventbridgeArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IntegrationAwsEventbridgeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IntegrationAwsEventbridgeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IntegrationAwsEventbridgeArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var integrationAwsEventbridgeResource = new CloudAmqp.IntegrationAwsEventbridge("integrationAwsEventbridgeResource", new()
    {
        AwsAccountId = "string",
        AwsRegion = "string",
        InstanceId = 0,
        Queue = "string",
        Vhost = "string",
        WithHeaders = false,
    });
    
    example, err := cloudamqp.NewIntegrationAwsEventbridge(ctx, "integrationAwsEventbridgeResource", &cloudamqp.IntegrationAwsEventbridgeArgs{
    	AwsAccountId: pulumi.String("string"),
    	AwsRegion:    pulumi.String("string"),
    	InstanceId:   pulumi.Int(0),
    	Queue:        pulumi.String("string"),
    	Vhost:        pulumi.String("string"),
    	WithHeaders:  pulumi.Bool(false),
    })
    
    var integrationAwsEventbridgeResource = new IntegrationAwsEventbridge("integrationAwsEventbridgeResource", IntegrationAwsEventbridgeArgs.builder()
        .awsAccountId("string")
        .awsRegion("string")
        .instanceId(0)
        .queue("string")
        .vhost("string")
        .withHeaders(false)
        .build());
    
    integration_aws_eventbridge_resource = cloudamqp.IntegrationAwsEventbridge("integrationAwsEventbridgeResource",
        aws_account_id="string",
        aws_region="string",
        instance_id=0,
        queue="string",
        vhost="string",
        with_headers=False)
    
    const integrationAwsEventbridgeResource = new cloudamqp.IntegrationAwsEventbridge("integrationAwsEventbridgeResource", {
        awsAccountId: "string",
        awsRegion: "string",
        instanceId: 0,
        queue: "string",
        vhost: "string",
        withHeaders: false,
    });
    
    type: cloudamqp:IntegrationAwsEventbridge
    properties:
        awsAccountId: string
        awsRegion: string
        instanceId: 0
        queue: string
        vhost: string
        withHeaders: false
    

    IntegrationAwsEventbridge Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The IntegrationAwsEventbridge resource accepts the following input properties:

    AwsAccountId string
    The 12 digit AWS Account ID where you want the events to be sent to.
    AwsRegion string
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    InstanceId int
    Instance identifier
    Queue string
    A (durable) queue on your RabbitMQ instance.
    Vhost string
    The VHost the queue resides in.
    WithHeaders bool
    Include message headers in the event data.
    AwsAccountId string
    The 12 digit AWS Account ID where you want the events to be sent to.
    AwsRegion string
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    InstanceId int
    Instance identifier
    Queue string
    A (durable) queue on your RabbitMQ instance.
    Vhost string
    The VHost the queue resides in.
    WithHeaders bool
    Include message headers in the event data.
    awsAccountId String
    The 12 digit AWS Account ID where you want the events to be sent to.
    awsRegion String
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    instanceId Integer
    Instance identifier
    queue String
    A (durable) queue on your RabbitMQ instance.
    vhost String
    The VHost the queue resides in.
    withHeaders Boolean
    Include message headers in the event data.
    awsAccountId string
    The 12 digit AWS Account ID where you want the events to be sent to.
    awsRegion string
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    instanceId number
    Instance identifier
    queue string
    A (durable) queue on your RabbitMQ instance.
    vhost string
    The VHost the queue resides in.
    withHeaders boolean
    Include message headers in the event data.
    aws_account_id str
    The 12 digit AWS Account ID where you want the events to be sent to.
    aws_region str
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    instance_id int
    Instance identifier
    queue str
    A (durable) queue on your RabbitMQ instance.
    vhost str
    The VHost the queue resides in.
    with_headers bool
    Include message headers in the event data.
    awsAccountId String
    The 12 digit AWS Account ID where you want the events to be sent to.
    awsRegion String
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    instanceId Number
    Instance identifier
    queue String
    A (durable) queue on your RabbitMQ instance.
    vhost String
    The VHost the queue resides in.
    withHeaders Boolean
    Include message headers in the event data.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IntegrationAwsEventbridge resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Always set to null, unless there is an error starting the EventBridge.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Always set to null, unless there is an error starting the EventBridge.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Always set to null, unless there is an error starting the EventBridge.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Always set to null, unless there is an error starting the EventBridge.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Always set to null, unless there is an error starting the EventBridge.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Always set to null, unless there is an error starting the EventBridge.

    Look up Existing IntegrationAwsEventbridge Resource

    Get an existing IntegrationAwsEventbridge resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IntegrationAwsEventbridgeState, opts?: CustomResourceOptions): IntegrationAwsEventbridge
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aws_account_id: Optional[str] = None,
            aws_region: Optional[str] = None,
            instance_id: Optional[int] = None,
            queue: Optional[str] = None,
            status: Optional[str] = None,
            vhost: Optional[str] = None,
            with_headers: Optional[bool] = None) -> IntegrationAwsEventbridge
    func GetIntegrationAwsEventbridge(ctx *Context, name string, id IDInput, state *IntegrationAwsEventbridgeState, opts ...ResourceOption) (*IntegrationAwsEventbridge, error)
    public static IntegrationAwsEventbridge Get(string name, Input<string> id, IntegrationAwsEventbridgeState? state, CustomResourceOptions? opts = null)
    public static IntegrationAwsEventbridge get(String name, Output<String> id, IntegrationAwsEventbridgeState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AwsAccountId string
    The 12 digit AWS Account ID where you want the events to be sent to.
    AwsRegion string
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    InstanceId int
    Instance identifier
    Queue string
    A (durable) queue on your RabbitMQ instance.
    Status string
    Always set to null, unless there is an error starting the EventBridge.
    Vhost string
    The VHost the queue resides in.
    WithHeaders bool
    Include message headers in the event data.
    AwsAccountId string
    The 12 digit AWS Account ID where you want the events to be sent to.
    AwsRegion string
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    InstanceId int
    Instance identifier
    Queue string
    A (durable) queue on your RabbitMQ instance.
    Status string
    Always set to null, unless there is an error starting the EventBridge.
    Vhost string
    The VHost the queue resides in.
    WithHeaders bool
    Include message headers in the event data.
    awsAccountId String
    The 12 digit AWS Account ID where you want the events to be sent to.
    awsRegion String
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    instanceId Integer
    Instance identifier
    queue String
    A (durable) queue on your RabbitMQ instance.
    status String
    Always set to null, unless there is an error starting the EventBridge.
    vhost String
    The VHost the queue resides in.
    withHeaders Boolean
    Include message headers in the event data.
    awsAccountId string
    The 12 digit AWS Account ID where you want the events to be sent to.
    awsRegion string
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    instanceId number
    Instance identifier
    queue string
    A (durable) queue on your RabbitMQ instance.
    status string
    Always set to null, unless there is an error starting the EventBridge.
    vhost string
    The VHost the queue resides in.
    withHeaders boolean
    Include message headers in the event data.
    aws_account_id str
    The 12 digit AWS Account ID where you want the events to be sent to.
    aws_region str
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    instance_id int
    Instance identifier
    queue str
    A (durable) queue on your RabbitMQ instance.
    status str
    Always set to null, unless there is an error starting the EventBridge.
    vhost str
    The VHost the queue resides in.
    with_headers bool
    Include message headers in the event data.
    awsAccountId String
    The 12 digit AWS Account ID where you want the events to be sent to.
    awsRegion String
    The AWS region where you the events to be sent to. (e.g. us-west-1, us-west-2, ..., etc.)
    instanceId Number
    Instance identifier
    queue String
    A (durable) queue on your RabbitMQ instance.
    status String
    Always set to null, unless there is an error starting the EventBridge.
    vhost String
    The VHost the queue resides in.
    withHeaders Boolean
    Include message headers in the event data.

    Import

    cloudamqp_integration_aws_eventbridge can be imported using CloudAMQP internal identifier of the AWS EventBridge together (CSV separated) with the instance identifier. To retrieve the AWS EventBridge identifier, use CloudAMQP API

    $ pulumi import cloudamqp:index/integrationAwsEventbridge:IntegrationAwsEventbridge aws_eventbridge <id>,<instance_id>`
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.20.0 published on Thursday, Sep 5, 2024 by Pulumi