mailgun.Webhook
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Webhook resource accepts the following input properties:
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.
Package Details
- Repository
- Mailgun pulumi/pulumi-mailgun
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mailgun
Terraform Provider.