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-mailgunrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-mailgunrepo.
var mailgun = require("@pulumi/mailgun");
import * as mailgun from "@pulumi/mailgun";Modules
Resources
Others
Resources
Resource Domain
class Domain extends CustomResourceProvides 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",
});constructor
new Domain(name: string, args?: DomainArgs, opts?: pulumi.CustomResourceOptions)Create a Domain resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): DomainGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is DomainReturns 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 ProviderResourceThe 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.
constructor
new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)Create a Provider resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ProviderReturns 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 CustomResourceProvides 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,
});constructor
new Route(name: string, args: RouteArgs, opts?: pulumi.CustomResourceOptions)Create a Route resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA 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): RouteGet 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 | undefinedmethod isInstance
public static isInstance(obj: any): obj is RouteReturns 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 DomainArgsThe 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 DomainStateInput 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 | undefinedfunction getEnvBoolean
getEnvBoolean(vars: string[]): boolean | undefinedfunction getEnvNumber
getEnvNumber(vars: string[]): number | undefinedfunction getVersion
getVersion(): stringinterface ProviderArgs
interface ProviderArgsThe set of arguments for constructing a Provider resource.
property apiKey
apiKey?: pulumi.Input<string>;interface RouteArgs
interface RouteArgsThe 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 RouteStateInput 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.