1. Packages
  2. Mailgun
  3. API Docs
  4. Webhook
Mailgun v3.5.3 published on Wednesday, May 1, 2024 by Pulumi

mailgun.Webhook

Explore with Pulumi AI

mailgun logo
Mailgun v3.5.3 published on Wednesday, May 1, 2024 by Pulumi

    Provides a Mailgun App resource. This can be used to create and manage applications on Mailgun.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as mailgun from "@pulumi/mailgun";
    
    // Create a new Mailgun webhook
    const _default = new mailgun.Webhook("default", {
        domain: "test.example.com",
        region: "us",
        kind: "delivered",
        urls: ["https://example.com"],
    });
    
    import pulumi
    import pulumi_mailgun as mailgun
    
    # Create a new Mailgun webhook
    default = mailgun.Webhook("default",
        domain="test.example.com",
        region="us",
        kind="delivered",
        urls=["https://example.com"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mailgun/sdk/v3/go/mailgun"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a new Mailgun webhook
    		_, err := mailgun.NewWebhook(ctx, "default", &mailgun.WebhookArgs{
    			Domain: pulumi.String("test.example.com"),
    			Region: pulumi.String("us"),
    			Kind:   pulumi.String("delivered"),
    			Urls: pulumi.StringArray{
    				pulumi.String("https://example.com"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mailgun = Pulumi.Mailgun;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a new Mailgun webhook
        var @default = new Mailgun.Webhook("default", new()
        {
            Domain = "test.example.com",
            Region = "us",
            Kind = "delivered",
            Urls = new[]
            {
                "https://example.com",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mailgun.Webhook;
    import com.pulumi.mailgun.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) {
            // Create a new Mailgun webhook
            var default_ = new Webhook("default", WebhookArgs.builder()        
                .domain("test.example.com")
                .region("us")
                .kind("delivered")
                .urls("https://example.com")
                .build());
    
        }
    }
    
    resources:
      # Create a new Mailgun webhook
      default:
        type: mailgun:Webhook
        properties:
          domain: test.example.com
          region: us
          kind: delivered
          urls:
            - https://example.com
    

    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,
                domain: Optional[str] = None,
                kind: Optional[str] = None,
                urls: Optional[Sequence[str]] = None,
                region: 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: mailgun: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.

    Constructor example

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

    var webhookResource = new Mailgun.Webhook("webhookResource", new()
    {
        Domain = "string",
        Kind = "string",
        Urls = new[]
        {
            "string",
        },
        Region = "string",
    });
    
    example, err := mailgun.NewWebhook(ctx, "webhookResource", &mailgun.WebhookArgs{
    	Domain: pulumi.String("string"),
    	Kind:   pulumi.String("string"),
    	Urls: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Region: pulumi.String("string"),
    })
    
    var webhookResource = new Webhook("webhookResource", WebhookArgs.builder()
        .domain("string")
        .kind("string")
        .urls("string")
        .region("string")
        .build());
    
    webhook_resource = mailgun.Webhook("webhookResource",
        domain="string",
        kind="string",
        urls=["string"],
        region="string")
    
    const webhookResource = new mailgun.Webhook("webhookResource", {
        domain: "string",
        kind: "string",
        urls: ["string"],
        region: "string",
    });
    
    type: mailgun:Webhook
    properties:
        domain: string
        kind: string
        region: string
        urls:
            - 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:

    Domain string
    The domain to add to Mailgun
    Kind string
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    Urls List<string>
    The urls of webhook
    Region string
    The region where domain will be created. Default value is us.
    Domain string
    The domain to add to Mailgun
    Kind string
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    Urls []string
    The urls of webhook
    Region string
    The region where domain will be created. Default value is us.
    domain String
    The domain to add to Mailgun
    kind String
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    urls List<String>
    The urls of webhook
    region String
    The region where domain will be created. Default value is us.
    domain string
    The domain to add to Mailgun
    kind string
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    urls string[]
    The urls of webhook
    region string
    The region where domain will be created. Default value is us.
    domain str
    The domain to add to Mailgun
    kind str
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    urls Sequence[str]
    The urls of webhook
    region str
    The region where domain will be created. Default value is us.
    domain String
    The domain to add to Mailgun
    kind String
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    urls List<String>
    The urls of webhook
    region String
    The region where domain will be created. Default value is us.

    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,
            domain: Optional[str] = None,
            kind: Optional[str] = None,
            region: Optional[str] = None,
            urls: Optional[Sequence[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:
    Domain string
    The domain to add to Mailgun
    Kind string
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    Region string
    The region where domain will be created. Default value is us.
    Urls List<string>
    The urls of webhook
    Domain string
    The domain to add to Mailgun
    Kind string
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    Region string
    The region where domain will be created. Default value is us.
    Urls []string
    The urls of webhook
    domain String
    The domain to add to Mailgun
    kind String
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    region String
    The region where domain will be created. Default value is us.
    urls List<String>
    The urls of webhook
    domain string
    The domain to add to Mailgun
    kind string
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    region string
    The region where domain will be created. Default value is us.
    urls string[]
    The urls of webhook
    domain str
    The domain to add to Mailgun
    kind str
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    region str
    The region where domain will be created. Default value is us.
    urls Sequence[str]
    The urls of webhook
    domain String
    The domain to add to Mailgun
    kind String
    The kind of webhook. Supported values (clicked complained delivered opened permanent_fail, temporary_fail unsubscribed)
    region String
    The region where domain will be created. Default value is us.
    urls List<String>
    The urls of webhook

    Package Details

    Repository
    Mailgun pulumi/pulumi-mailgun
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mailgun Terraform Provider.
    mailgun logo
    Mailgun v3.5.3 published on Wednesday, May 1, 2024 by Pulumi