1. Packages
  2. CloudAMQP
  3. API Docs
  4. Webhook
CloudAMQP v3.17.5 published on Friday, Apr 5, 2024 by Pulumi

cloudamqp.Webhook

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.17.5 published on Friday, Apr 5, 2024 by Pulumi

    This resource allows you to enable or disable webhooks for a specific vhost and queue.

    Only available for dedicated subscription plans.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const webhookQueue = new cloudamqp.Webhook("webhookQueue", {
        instanceId: cloudamqp_instance.instance.id,
        vhost: "myvhost",
        queue: "webhook-queue",
        webhookUri: "https://example.com/webhook?key=secret",
        retryInterval: 5,
        concurrency: 5,
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    webhook_queue = cloudamqp.Webhook("webhookQueue",
        instance_id=cloudamqp_instance["instance"]["id"],
        vhost="myvhost",
        queue="webhook-queue",
        webhook_uri="https://example.com/webhook?key=secret",
        retry_interval=5,
        concurrency=5)
    
    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.NewWebhook(ctx, "webhookQueue", &cloudamqp.WebhookArgs{
    			InstanceId:    pulumi.Any(cloudamqp_instance.Instance.Id),
    			Vhost:         pulumi.String("myvhost"),
    			Queue:         pulumi.String("webhook-queue"),
    			WebhookUri:    pulumi.String("https://example.com/webhook?key=secret"),
    			RetryInterval: pulumi.Int(5),
    			Concurrency:   pulumi.Int(5),
    		})
    		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 webhookQueue = new CloudAmqp.Webhook("webhookQueue", new()
        {
            InstanceId = cloudamqp_instance.Instance.Id,
            Vhost = "myvhost",
            Queue = "webhook-queue",
            WebhookUri = "https://example.com/webhook?key=secret",
            RetryInterval = 5,
            Concurrency = 5,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.Webhook;
    import com.pulumi.cloudamqp.WebhookArgs;
    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 webhookQueue = new Webhook("webhookQueue", WebhookArgs.builder()        
                .instanceId(cloudamqp_instance.instance().id())
                .vhost("myvhost")
                .queue("webhook-queue")
                .webhookUri("https://example.com/webhook?key=secret")
                .retryInterval(5)
                .concurrency(5)
                .build());
    
        }
    }
    
    resources:
      webhookQueue:
        type: cloudamqp:Webhook
        properties:
          instanceId: ${cloudamqp_instance.instance.id}
          vhost: myvhost
          queue: webhook-queue
          webhookUri: https://example.com/webhook?key=secret
          retryInterval: 5
          concurrency: 5
    

    Dependency

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

    Create Webhook Resource

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

    Constructor syntax

    new Webhook(name: string, args: WebhookArgs, opts?: CustomResourceOptions);
    @overload
    def Webhook(resource_name: str,
                args: WebhookArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Webhook(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                concurrency: Optional[int] = None,
                instance_id: Optional[int] = None,
                queue: Optional[str] = None,
                retry_interval: Optional[int] = None,
                vhost: Optional[str] = None,
                webhook_uri: Optional[str] = None)
    func NewWebhook(ctx *Context, name string, args WebhookArgs, opts ...ResourceOption) (*Webhook, error)
    public Webhook(string name, WebhookArgs args, CustomResourceOptions? opts = null)
    public Webhook(String name, WebhookArgs args)
    public Webhook(String name, WebhookArgs args, CustomResourceOptions options)
    
    type: cloudamqp:Webhook
    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 WebhookArgs
    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 WebhookArgs
    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 WebhookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WebhookArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var webhookResource = new CloudAmqp.Webhook("webhookResource", new()
    {
        Concurrency = 0,
        InstanceId = 0,
        Queue = "string",
        RetryInterval = 0,
        Vhost = "string",
        WebhookUri = "string",
    });
    
    example, err := cloudamqp.NewWebhook(ctx, "webhookResource", &cloudamqp.WebhookArgs{
    	Concurrency:   pulumi.Int(0),
    	InstanceId:    pulumi.Int(0),
    	Queue:         pulumi.String("string"),
    	RetryInterval: pulumi.Int(0),
    	Vhost:         pulumi.String("string"),
    	WebhookUri:    pulumi.String("string"),
    })
    
    var webhookResource = new Webhook("webhookResource", WebhookArgs.builder()        
        .concurrency(0)
        .instanceId(0)
        .queue("string")
        .retryInterval(0)
        .vhost("string")
        .webhookUri("string")
        .build());
    
    webhook_resource = cloudamqp.Webhook("webhookResource",
        concurrency=0,
        instance_id=0,
        queue="string",
        retry_interval=0,
        vhost="string",
        webhook_uri="string")
    
    const webhookResource = new cloudamqp.Webhook("webhookResource", {
        concurrency: 0,
        instanceId: 0,
        queue: "string",
        retryInterval: 0,
        vhost: "string",
        webhookUri: "string",
    });
    
    type: cloudamqp:Webhook
    properties:
        concurrency: 0
        instanceId: 0
        queue: string
        retryInterval: 0
        vhost: string
        webhookUri: string
    

    Webhook 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 Webhook resource accepts the following input properties:

    Concurrency int
    Max simultaneous requests to the endpoint.
    InstanceId int
    The CloudAMQP instance ID.
    Queue string
    A (durable) queue on your RabbitMQ instance.
    RetryInterval int
    How often we retry if your endpoint fails (in seconds).
    Vhost string
    The vhost the queue resides in.
    WebhookUri string
    A POST request will be made for each message in the queue to this endpoint.
    Concurrency int
    Max simultaneous requests to the endpoint.
    InstanceId int
    The CloudAMQP instance ID.
    Queue string
    A (durable) queue on your RabbitMQ instance.
    RetryInterval int
    How often we retry if your endpoint fails (in seconds).
    Vhost string
    The vhost the queue resides in.
    WebhookUri string
    A POST request will be made for each message in the queue to this endpoint.
    concurrency Integer
    Max simultaneous requests to the endpoint.
    instanceId Integer
    The CloudAMQP instance ID.
    queue String
    A (durable) queue on your RabbitMQ instance.
    retryInterval Integer
    How often we retry if your endpoint fails (in seconds).
    vhost String
    The vhost the queue resides in.
    webhookUri String
    A POST request will be made for each message in the queue to this endpoint.
    concurrency number
    Max simultaneous requests to the endpoint.
    instanceId number
    The CloudAMQP instance ID.
    queue string
    A (durable) queue on your RabbitMQ instance.
    retryInterval number
    How often we retry if your endpoint fails (in seconds).
    vhost string
    The vhost the queue resides in.
    webhookUri string
    A POST request will be made for each message in the queue to this endpoint.
    concurrency int
    Max simultaneous requests to the endpoint.
    instance_id int
    The CloudAMQP instance ID.
    queue str
    A (durable) queue on your RabbitMQ instance.
    retry_interval int
    How often we retry if your endpoint fails (in seconds).
    vhost str
    The vhost the queue resides in.
    webhook_uri str
    A POST request will be made for each message in the queue to this endpoint.
    concurrency Number
    Max simultaneous requests to the endpoint.
    instanceId Number
    The CloudAMQP instance ID.
    queue String
    A (durable) queue on your RabbitMQ instance.
    retryInterval Number
    How often we retry if your endpoint fails (in seconds).
    vhost String
    The vhost the queue resides in.
    webhookUri String
    A POST request will be made for each message in the queue to this endpoint.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Webhook Resource

    Get an existing Webhook 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?: WebhookState, opts?: CustomResourceOptions): Webhook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            concurrency: Optional[int] = None,
            instance_id: Optional[int] = None,
            queue: Optional[str] = None,
            retry_interval: Optional[int] = None,
            vhost: Optional[str] = None,
            webhook_uri: Optional[str] = None) -> Webhook
    func GetWebhook(ctx *Context, name string, id IDInput, state *WebhookState, opts ...ResourceOption) (*Webhook, error)
    public static Webhook Get(string name, Input<string> id, WebhookState? state, CustomResourceOptions? opts = null)
    public static Webhook get(String name, Output<String> id, WebhookState 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:
    Concurrency int
    Max simultaneous requests to the endpoint.
    InstanceId int
    The CloudAMQP instance ID.
    Queue string
    A (durable) queue on your RabbitMQ instance.
    RetryInterval int
    How often we retry if your endpoint fails (in seconds).
    Vhost string
    The vhost the queue resides in.
    WebhookUri string
    A POST request will be made for each message in the queue to this endpoint.
    Concurrency int
    Max simultaneous requests to the endpoint.
    InstanceId int
    The CloudAMQP instance ID.
    Queue string
    A (durable) queue on your RabbitMQ instance.
    RetryInterval int
    How often we retry if your endpoint fails (in seconds).
    Vhost string
    The vhost the queue resides in.
    WebhookUri string
    A POST request will be made for each message in the queue to this endpoint.
    concurrency Integer
    Max simultaneous requests to the endpoint.
    instanceId Integer
    The CloudAMQP instance ID.
    queue String
    A (durable) queue on your RabbitMQ instance.
    retryInterval Integer
    How often we retry if your endpoint fails (in seconds).
    vhost String
    The vhost the queue resides in.
    webhookUri String
    A POST request will be made for each message in the queue to this endpoint.
    concurrency number
    Max simultaneous requests to the endpoint.
    instanceId number
    The CloudAMQP instance ID.
    queue string
    A (durable) queue on your RabbitMQ instance.
    retryInterval number
    How often we retry if your endpoint fails (in seconds).
    vhost string
    The vhost the queue resides in.
    webhookUri string
    A POST request will be made for each message in the queue to this endpoint.
    concurrency int
    Max simultaneous requests to the endpoint.
    instance_id int
    The CloudAMQP instance ID.
    queue str
    A (durable) queue on your RabbitMQ instance.
    retry_interval int
    How often we retry if your endpoint fails (in seconds).
    vhost str
    The vhost the queue resides in.
    webhook_uri str
    A POST request will be made for each message in the queue to this endpoint.
    concurrency Number
    Max simultaneous requests to the endpoint.
    instanceId Number
    The CloudAMQP instance ID.
    queue String
    A (durable) queue on your RabbitMQ instance.
    retryInterval Number
    How often we retry if your endpoint fails (in seconds).
    vhost String
    The vhost the queue resides in.
    webhookUri String
    A POST request will be made for each message in the queue to this endpoint.

    Import

    cloudamqp_webhook can be imported using the resource identifier together with CloudAMQP instance identifier. The identifiers are CSV separated, see example below.

    $ pulumi import cloudamqp:index/webhook:Webhook webhook_queue <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.17.5 published on Friday, Apr 5, 2024 by Pulumi