Route
Provides a Mailgun Route resource. This can be used to create and manage routes on Mailgun.
Example Usage
using Pulumi;
using Mailgun = Pulumi.Mailgun;
class MyStack : Stack
{
public MyStack()
{
// Create a new Mailgun route
var @default = new Mailgun.Route("default", new Mailgun.RouteArgs
{
Actions =
{
"forward('http://example.com/api/v1/foos/')",
"stop()",
},
Description = "inbound",
Expression = "match_recipient('.*@foo.example.com')",
Priority = 0,
});
}
}
Coming soon!
import pulumi
import pulumi_mailgun as mailgun
# Create a new Mailgun route
default = mailgun.Route("default",
actions=[
"forward('http://example.com/api/v1/foos/')",
"stop()",
],
description="inbound",
expression="match_recipient('.*@foo.example.com')",
priority="0")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,
});Create a Route Resource
new Route(name: string, args: RouteArgs, opts?: CustomResourceOptions);def Route(resource_name, opts=None, actions=None, description=None, expression=None, priority=None, region=None, __props__=None);public Route(string name, RouteArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Route Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Route resource accepts the following input properties:
- Actions List<string>
- Expression string
A filter expression like
match_recipient('.*@gmail.com')- Priority int
Smaller number indicates higher priority. Higher priority routes are handled first.
- Description string
- Region string
The region where domain will be created. Default value is
us.
- Actions []string
- Expression string
A filter expression like
match_recipient('.*@gmail.com')- Priority int
Smaller number indicates higher priority. Higher priority routes are handled first.
- Description string
- Region string
The region where domain will be created. Default value is
us.
- actions string[]
- expression string
A filter expression like
match_recipient('.*@gmail.com')- priority number
Smaller number indicates higher priority. Higher priority routes are handled first.
- description string
- region string
The region where domain will be created. Default value is
us.
- actions List[str]
- expression str
A filter expression like
match_recipient('.*@gmail.com')- priority float
Smaller number indicates higher priority. Higher priority routes are handled first.
- description str
- region str
The region where domain will be created. Default value is
us.
Outputs
All input properties are implicitly available as output properties. Additionally, the Route resource produces the following output properties:
Look up an Existing Route Resource
Get an existing Route 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?: RouteState, opts?: CustomResourceOptions): Routestatic get(resource_name, id, opts=None, actions=None, description=None, expression=None, priority=None, region=None, __props__=None);func GetRoute(ctx *Context, name string, id IDInput, state *RouteState, opts ...ResourceOption) (*Route, error)public static Route Get(string name, Input<string> id, RouteState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Actions List<string>
- Description string
- Expression string
A filter expression like
match_recipient('.*@gmail.com')- Priority int
Smaller number indicates higher priority. Higher priority routes are handled first.
- Region string
The region where domain will be created. Default value is
us.
- Actions []string
- Description string
- Expression string
A filter expression like
match_recipient('.*@gmail.com')- Priority int
Smaller number indicates higher priority. Higher priority routes are handled first.
- Region string
The region where domain will be created. Default value is
us.
- actions string[]
- description string
- expression string
A filter expression like
match_recipient('.*@gmail.com')- priority number
Smaller number indicates higher priority. Higher priority routes are handled first.
- region string
The region where domain will be created. Default value is
us.
- actions List[str]
- description str
- expression str
A filter expression like
match_recipient('.*@gmail.com')- priority float
Smaller number indicates higher priority. Higher priority routes are handled first.
- region str
The region where domain will be created. Default value is
us.
Package Details
- Repository
- https://github.com/pulumi/pulumi-mailgun
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
mailgunTerraform Provider.