1. Packages
  2. Cloudflare
  3. API Docs
  4. EmailRoutingCatchAll
Cloudflare v5.25.0 published on Sunday, Apr 7, 2024 by Pulumi

cloudflare.EmailRoutingCatchAll

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.25.0 published on Sunday, Apr 7, 2024 by Pulumi

    Provides a resource for managing Email Routing Addresses catch all behaviour.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = new cloudflare.EmailRoutingCatchAll("example", {
        actions: [{
            type: "forward",
            values: ["destinationaddress@example.net"],
        }],
        enabled: true,
        matchers: [{
            type: "all",
        }],
        name: "example catch all",
        zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.EmailRoutingCatchAll("example",
        actions=[cloudflare.EmailRoutingCatchAllActionArgs(
            type="forward",
            values=["destinationaddress@example.net"],
        )],
        enabled=True,
        matchers=[cloudflare.EmailRoutingCatchAllMatcherArgs(
            type="all",
        )],
        name="example catch all",
        zone_id="0da42c8d2132a9ddaf714f9e7c920711")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewEmailRoutingCatchAll(ctx, "example", &cloudflare.EmailRoutingCatchAllArgs{
    			Actions: cloudflare.EmailRoutingCatchAllActionArray{
    				&cloudflare.EmailRoutingCatchAllActionArgs{
    					Type: pulumi.String("forward"),
    					Values: pulumi.StringArray{
    						pulumi.String("destinationaddress@example.net"),
    					},
    				},
    			},
    			Enabled: pulumi.Bool(true),
    			Matchers: cloudflare.EmailRoutingCatchAllMatcherArray{
    				&cloudflare.EmailRoutingCatchAllMatcherArgs{
    					Type: pulumi.String("all"),
    				},
    			},
    			Name:   pulumi.String("example catch all"),
    			ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Cloudflare.EmailRoutingCatchAll("example", new()
        {
            Actions = new[]
            {
                new Cloudflare.Inputs.EmailRoutingCatchAllActionArgs
                {
                    Type = "forward",
                    Values = new[]
                    {
                        "destinationaddress@example.net",
                    },
                },
            },
            Enabled = true,
            Matchers = new[]
            {
                new Cloudflare.Inputs.EmailRoutingCatchAllMatcherArgs
                {
                    Type = "all",
                },
            },
            Name = "example catch all",
            ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.EmailRoutingCatchAll;
    import com.pulumi.cloudflare.EmailRoutingCatchAllArgs;
    import com.pulumi.cloudflare.inputs.EmailRoutingCatchAllActionArgs;
    import com.pulumi.cloudflare.inputs.EmailRoutingCatchAllMatcherArgs;
    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) {
            var example = new EmailRoutingCatchAll("example", EmailRoutingCatchAllArgs.builder()        
                .actions(EmailRoutingCatchAllActionArgs.builder()
                    .type("forward")
                    .values("destinationaddress@example.net")
                    .build())
                .enabled(true)
                .matchers(EmailRoutingCatchAllMatcherArgs.builder()
                    .type("all")
                    .build())
                .name("example catch all")
                .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
                .build());
    
        }
    }
    
    resources:
      example:
        type: cloudflare:EmailRoutingCatchAll
        properties:
          actions:
            - type: forward
              values:
                - destinationaddress@example.net
          enabled: true
          matchers:
            - type: all
          name: example catch all
          zoneId: 0da42c8d2132a9ddaf714f9e7c920711
    

    Create EmailRoutingCatchAll Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EmailRoutingCatchAll(name: string, args: EmailRoutingCatchAllArgs, opts?: CustomResourceOptions);
    @overload
    def EmailRoutingCatchAll(resource_name: str,
                             args: EmailRoutingCatchAllArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def EmailRoutingCatchAll(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             actions: Optional[Sequence[EmailRoutingCatchAllActionArgs]] = None,
                             matchers: Optional[Sequence[EmailRoutingCatchAllMatcherArgs]] = None,
                             name: Optional[str] = None,
                             zone_id: Optional[str] = None,
                             enabled: Optional[bool] = None)
    func NewEmailRoutingCatchAll(ctx *Context, name string, args EmailRoutingCatchAllArgs, opts ...ResourceOption) (*EmailRoutingCatchAll, error)
    public EmailRoutingCatchAll(string name, EmailRoutingCatchAllArgs args, CustomResourceOptions? opts = null)
    public EmailRoutingCatchAll(String name, EmailRoutingCatchAllArgs args)
    public EmailRoutingCatchAll(String name, EmailRoutingCatchAllArgs args, CustomResourceOptions options)
    
    type: cloudflare:EmailRoutingCatchAll
    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 EmailRoutingCatchAllArgs
    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 EmailRoutingCatchAllArgs
    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 EmailRoutingCatchAllArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EmailRoutingCatchAllArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EmailRoutingCatchAllArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var emailRoutingCatchAllResource = new Cloudflare.EmailRoutingCatchAll("emailRoutingCatchAllResource", new()
    {
        Actions = new[]
        {
            new Cloudflare.Inputs.EmailRoutingCatchAllActionArgs
            {
                Type = "string",
                Values = new[]
                {
                    "string",
                },
            },
        },
        Matchers = new[]
        {
            new Cloudflare.Inputs.EmailRoutingCatchAllMatcherArgs
            {
                Type = "string",
            },
        },
        Name = "string",
        ZoneId = "string",
        Enabled = false,
    });
    
    example, err := cloudflare.NewEmailRoutingCatchAll(ctx, "emailRoutingCatchAllResource", &cloudflare.EmailRoutingCatchAllArgs{
    	Actions: cloudflare.EmailRoutingCatchAllActionArray{
    		&cloudflare.EmailRoutingCatchAllActionArgs{
    			Type: pulumi.String("string"),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Matchers: cloudflare.EmailRoutingCatchAllMatcherArray{
    		&cloudflare.EmailRoutingCatchAllMatcherArgs{
    			Type: pulumi.String("string"),
    		},
    	},
    	Name:    pulumi.String("string"),
    	ZoneId:  pulumi.String("string"),
    	Enabled: pulumi.Bool(false),
    })
    
    var emailRoutingCatchAllResource = new EmailRoutingCatchAll("emailRoutingCatchAllResource", EmailRoutingCatchAllArgs.builder()        
        .actions(EmailRoutingCatchAllActionArgs.builder()
            .type("string")
            .values("string")
            .build())
        .matchers(EmailRoutingCatchAllMatcherArgs.builder()
            .type("string")
            .build())
        .name("string")
        .zoneId("string")
        .enabled(false)
        .build());
    
    email_routing_catch_all_resource = cloudflare.EmailRoutingCatchAll("emailRoutingCatchAllResource",
        actions=[cloudflare.EmailRoutingCatchAllActionArgs(
            type="string",
            values=["string"],
        )],
        matchers=[cloudflare.EmailRoutingCatchAllMatcherArgs(
            type="string",
        )],
        name="string",
        zone_id="string",
        enabled=False)
    
    const emailRoutingCatchAllResource = new cloudflare.EmailRoutingCatchAll("emailRoutingCatchAllResource", {
        actions: [{
            type: "string",
            values: ["string"],
        }],
        matchers: [{
            type: "string",
        }],
        name: "string",
        zoneId: "string",
        enabled: false,
    });
    
    type: cloudflare:EmailRoutingCatchAll
    properties:
        actions:
            - type: string
              values:
                - string
        enabled: false
        matchers:
            - type: string
        name: string
        zoneId: string
    

    EmailRoutingCatchAll 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 EmailRoutingCatchAll resource accepts the following input properties:

    Actions List<EmailRoutingCatchAllAction>
    List actions patterns.
    Matchers List<EmailRoutingCatchAllMatcher>
    Matching patterns to forward to your actions.
    Name string
    Routing rule name.
    ZoneId string
    The zone identifier to target for the resource.
    Enabled bool
    Routing rule status.
    Actions []EmailRoutingCatchAllActionArgs
    List actions patterns.
    Matchers []EmailRoutingCatchAllMatcherArgs
    Matching patterns to forward to your actions.
    Name string
    Routing rule name.
    ZoneId string
    The zone identifier to target for the resource.
    Enabled bool
    Routing rule status.
    actions List<EmailRoutingCatchAllAction>
    List actions patterns.
    matchers List<EmailRoutingCatchAllMatcher>
    Matching patterns to forward to your actions.
    name String
    Routing rule name.
    zoneId String
    The zone identifier to target for the resource.
    enabled Boolean
    Routing rule status.
    actions EmailRoutingCatchAllAction[]
    List actions patterns.
    matchers EmailRoutingCatchAllMatcher[]
    Matching patterns to forward to your actions.
    name string
    Routing rule name.
    zoneId string
    The zone identifier to target for the resource.
    enabled boolean
    Routing rule status.
    actions Sequence[EmailRoutingCatchAllActionArgs]
    List actions patterns.
    matchers Sequence[EmailRoutingCatchAllMatcherArgs]
    Matching patterns to forward to your actions.
    name str
    Routing rule name.
    zone_id str
    The zone identifier to target for the resource.
    enabled bool
    Routing rule status.
    actions List<Property Map>
    List actions patterns.
    matchers List<Property Map>
    Matching patterns to forward to your actions.
    name String
    Routing rule name.
    zoneId String
    The zone identifier to target for the resource.
    enabled Boolean
    Routing rule status.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EmailRoutingCatchAll resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Tag string
    Routing rule identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    Tag string
    Routing rule identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    tag String
    Routing rule identifier.
    id string
    The provider-assigned unique ID for this managed resource.
    tag string
    Routing rule identifier.
    id str
    The provider-assigned unique ID for this managed resource.
    tag str
    Routing rule identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    tag String
    Routing rule identifier.

    Look up Existing EmailRoutingCatchAll Resource

    Get an existing EmailRoutingCatchAll 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?: EmailRoutingCatchAllState, opts?: CustomResourceOptions): EmailRoutingCatchAll
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[Sequence[EmailRoutingCatchAllActionArgs]] = None,
            enabled: Optional[bool] = None,
            matchers: Optional[Sequence[EmailRoutingCatchAllMatcherArgs]] = None,
            name: Optional[str] = None,
            tag: Optional[str] = None,
            zone_id: Optional[str] = None) -> EmailRoutingCatchAll
    func GetEmailRoutingCatchAll(ctx *Context, name string, id IDInput, state *EmailRoutingCatchAllState, opts ...ResourceOption) (*EmailRoutingCatchAll, error)
    public static EmailRoutingCatchAll Get(string name, Input<string> id, EmailRoutingCatchAllState? state, CustomResourceOptions? opts = null)
    public static EmailRoutingCatchAll get(String name, Output<String> id, EmailRoutingCatchAllState 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:
    Actions List<EmailRoutingCatchAllAction>
    List actions patterns.
    Enabled bool
    Routing rule status.
    Matchers List<EmailRoutingCatchAllMatcher>
    Matching patterns to forward to your actions.
    Name string
    Routing rule name.
    Tag string
    Routing rule identifier.
    ZoneId string
    The zone identifier to target for the resource.
    Actions []EmailRoutingCatchAllActionArgs
    List actions patterns.
    Enabled bool
    Routing rule status.
    Matchers []EmailRoutingCatchAllMatcherArgs
    Matching patterns to forward to your actions.
    Name string
    Routing rule name.
    Tag string
    Routing rule identifier.
    ZoneId string
    The zone identifier to target for the resource.
    actions List<EmailRoutingCatchAllAction>
    List actions patterns.
    enabled Boolean
    Routing rule status.
    matchers List<EmailRoutingCatchAllMatcher>
    Matching patterns to forward to your actions.
    name String
    Routing rule name.
    tag String
    Routing rule identifier.
    zoneId String
    The zone identifier to target for the resource.
    actions EmailRoutingCatchAllAction[]
    List actions patterns.
    enabled boolean
    Routing rule status.
    matchers EmailRoutingCatchAllMatcher[]
    Matching patterns to forward to your actions.
    name string
    Routing rule name.
    tag string
    Routing rule identifier.
    zoneId string
    The zone identifier to target for the resource.
    actions Sequence[EmailRoutingCatchAllActionArgs]
    List actions patterns.
    enabled bool
    Routing rule status.
    matchers Sequence[EmailRoutingCatchAllMatcherArgs]
    Matching patterns to forward to your actions.
    name str
    Routing rule name.
    tag str
    Routing rule identifier.
    zone_id str
    The zone identifier to target for the resource.
    actions List<Property Map>
    List actions patterns.
    enabled Boolean
    Routing rule status.
    matchers List<Property Map>
    Matching patterns to forward to your actions.
    name String
    Routing rule name.
    tag String
    Routing rule identifier.
    zoneId String
    The zone identifier to target for the resource.

    Supporting Types

    EmailRoutingCatchAllAction, EmailRoutingCatchAllActionArgs

    Type string
    Type of supported action. Available values: drop, forward, worker.
    Values List<string>
    A list with items in the following form.
    Type string
    Type of supported action. Available values: drop, forward, worker.
    Values []string
    A list with items in the following form.
    type String
    Type of supported action. Available values: drop, forward, worker.
    values List<String>
    A list with items in the following form.
    type string
    Type of supported action. Available values: drop, forward, worker.
    values string[]
    A list with items in the following form.
    type str
    Type of supported action. Available values: drop, forward, worker.
    values Sequence[str]
    A list with items in the following form.
    type String
    Type of supported action. Available values: drop, forward, worker.
    values List<String>
    A list with items in the following form.

    EmailRoutingCatchAllMatcher, EmailRoutingCatchAllMatcherArgs

    Type string
    Type of matcher. Available values: all.
    Type string
    Type of matcher. Available values: all.
    type String
    Type of matcher. Available values: all.
    type string
    Type of matcher. Available values: all.
    type str
    Type of matcher. Available values: all.
    type String
    Type of matcher. Available values: all.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.25.0 published on Sunday, Apr 7, 2024 by Pulumi