Package @pulumi/mailgun

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-mailgun repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-mailgun repo.

var mailgun = require("@pulumi/mailgun");
import * as mailgun from "@pulumi/mailgun";

Modules

Resources

Others

Resources

Resource Domain

class Domain extends CustomResource

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

After DNS records are set, domain verification should be triggered manually using PUT /domains/<domain>/verify

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as mailgun from "@pulumi/mailgun";

// Create a new Mailgun domain
const defaultDomain = new mailgun.Domain("default", {
    region: "us",
    spamAction: "disabled",
});

This content is derived from https://github.com/terraform-providers/terraform-provider-mailgun/blob/master/website/docs/r/domain.html.markdown.

constructor

new Domain(name: string, args?: DomainArgs, opts?: pulumi.CustomResourceOptions)

Create a Domain resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DomainState, opts?: pulumi.CustomResourceOptions): Domain

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Domain

Returns true if the given object is an instance of Domain. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The domain to add to Mailgun

property receivingRecords

public receivingRecords: pulumi.Output<DomainReceivingRecord[]>;

A list of DNS records for receiving validation.

property region

public region: pulumi.Output<string | undefined>;

The region where domain will be created. Default value is us.

property sendingRecords

public sendingRecords: pulumi.Output<DomainSendingRecord[]>;

A list of DNS records for sending validation.

property smtpLogin

public smtpLogin: pulumi.Output<string>;

The login email for the SMTP server.

property smtpPassword

public smtpPassword: pulumi.Output<string>;

The password to the SMTP server.

property spamAction

public spamAction: pulumi.Output<string | undefined>;

disabled or tag Disable, no spam filtering will occur for inbound messages. Tag, messages will be tagged with a spam header.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

property wildcard

public wildcard: pulumi.Output<boolean | undefined>;

Boolean that determines whether the domain will accept email for sub-domains.

Resource Provider

class Provider extends ProviderResource

The provider type for the mailgun package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

This content is derived from https://github.com/terraform-providers/terraform-provider-mailgun/blob/master/website/docs/index.html.markdown.

constructor

new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)

Create a Provider resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Provider

Returns true if the given object is an instance of Provider. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

method register

static register(provider: ProviderResource | undefined): Promise<string | undefined>

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Route

class Route extends CustomResource

Provides a Mailgun Route resource. This can be used to create and manage routes on Mailgun.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as mailgun from "@pulumi/mailgun";

// Create a new Mailgun route
const defaultRoute = new mailgun.Route("default", {
    actions: [
        "forward('http://example.com/api/v1/foos/')",
        "stop()",
    ],
    description: "inbound",
    expression: "match_recipient('.*@foo.example.com')",
    priority: 0,
});

This content is derived from https://github.com/terraform-providers/terraform-provider-mailgun/blob/master/website/docs/r/route.html.markdown.

constructor

new Route(name: string, args: RouteArgs, opts?: pulumi.CustomResourceOptions)

Create a Route resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RouteState, opts?: pulumi.CustomResourceOptions): Route

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

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Route

Returns true if the given object is an instance of Route. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property actions

public actions: pulumi.Output<string[]>;

property description

public description: pulumi.Output<string | undefined>;

property expression

public expression: pulumi.Output<string>;

A filter expression like match_recipient('.*@gmail.com')

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property priority

public priority: pulumi.Output<number>;

Smaller number indicates higher priority. Higher priority routes are handled first.

property region

public region: pulumi.Output<string | undefined>;

The region where domain will be created. Default value is us.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Others

interface DomainArgs

interface DomainArgs

The set of arguments for constructing a Domain resource.

property name

name?: pulumi.Input<string>;

The domain to add to Mailgun

property region

region?: pulumi.Input<string>;

The region where domain will be created. Default value is us.

property spamAction

spamAction?: pulumi.Input<string>;

disabled or tag Disable, no spam filtering will occur for inbound messages. Tag, messages will be tagged with a spam header.

property wildcard

wildcard?: pulumi.Input<boolean>;

Boolean that determines whether the domain will accept email for sub-domains.

interface DomainState

interface DomainState

Input properties used for looking up and filtering Domain resources.

property name

name?: pulumi.Input<string>;

The domain to add to Mailgun

property receivingRecords

receivingRecords?: pulumi.Input<pulumi.Input<DomainReceivingRecord>[]>;

A list of DNS records for receiving validation.

property region

region?: pulumi.Input<string>;

The region where domain will be created. Default value is us.

property sendingRecords

sendingRecords?: pulumi.Input<pulumi.Input<DomainSendingRecord>[]>;

A list of DNS records for sending validation.

property smtpLogin

smtpLogin?: pulumi.Input<string>;

The login email for the SMTP server.

property smtpPassword

smtpPassword?: pulumi.Input<string>;

The password to the SMTP server.

property spamAction

spamAction?: pulumi.Input<string>;

disabled or tag Disable, no spam filtering will occur for inbound messages. Tag, messages will be tagged with a spam header.

property wildcard

wildcard?: pulumi.Input<boolean>;

Boolean that determines whether the domain will accept email for sub-domains.

function getEnv

getEnv(vars: string[]): string | undefined

function getEnvBoolean

getEnvBoolean(vars: string[]): boolean | undefined

function getEnvNumber

getEnvNumber(vars: string[]): number | undefined

function getVersion

getVersion(): string

interface ProviderArgs

interface ProviderArgs

The set of arguments for constructing a Provider resource.

property apiKey

apiKey?: pulumi.Input<string>;

interface RouteArgs

interface RouteArgs

The set of arguments for constructing a Route resource.

property actions

actions: pulumi.Input<pulumi.Input<string>[]>;

property description

description?: pulumi.Input<string>;

property expression

expression: pulumi.Input<string>;

A filter expression like match_recipient('.*@gmail.com')

property priority

priority: pulumi.Input<number>;

Smaller number indicates higher priority. Higher priority routes are handled first.

property region

region?: pulumi.Input<string>;

The region where domain will be created. Default value is us.

interface RouteState

interface RouteState

Input properties used for looking up and filtering Route resources.

property actions

actions?: pulumi.Input<pulumi.Input<string>[]>;

property description

description?: pulumi.Input<string>;

property expression

expression?: pulumi.Input<string>;

A filter expression like match_recipient('.*@gmail.com')

property priority

priority?: pulumi.Input<number>;

Smaller number indicates higher priority. Higher priority routes are handled first.

property region

region?: pulumi.Input<string>;

The region where domain will be created. Default value is us.