1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getEmailRoutingRule
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getEmailRoutingRule

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleEmailRoutingRule = cloudflare.getEmailRoutingRule({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        ruleIdentifier: "a7e6fb77503c41d8a7f3113c6918f10c",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_email_routing_rule = cloudflare.get_email_routing_rule(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        rule_identifier="a7e6fb77503c41d8a7f3113c6918f10c")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.LookupEmailRoutingRule(ctx, &cloudflare.LookupEmailRoutingRuleArgs{
    			ZoneId:         "023e105f4ecef8ad9ca31a8372d0c353",
    			RuleIdentifier: pulumi.StringRef("a7e6fb77503c41d8a7f3113c6918f10c"),
    		}, nil)
    		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 exampleEmailRoutingRule = Cloudflare.GetEmailRoutingRule.Invoke(new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            RuleIdentifier = "a7e6fb77503c41d8a7f3113c6918f10c",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetEmailRoutingRuleArgs;
    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) {
            final var exampleEmailRoutingRule = CloudflareFunctions.getEmailRoutingRule(GetEmailRoutingRuleArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .ruleIdentifier("a7e6fb77503c41d8a7f3113c6918f10c")
                .build());
    
        }
    }
    
    variables:
      exampleEmailRoutingRule:
        fn::invoke:
          function: cloudflare:getEmailRoutingRule
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
            ruleIdentifier: a7e6fb77503c41d8a7f3113c6918f10c
    

    Using getEmailRoutingRule

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getEmailRoutingRule(args: GetEmailRoutingRuleArgs, opts?: InvokeOptions): Promise<GetEmailRoutingRuleResult>
    function getEmailRoutingRuleOutput(args: GetEmailRoutingRuleOutputArgs, opts?: InvokeOptions): Output<GetEmailRoutingRuleResult>
    def get_email_routing_rule(filter: Optional[GetEmailRoutingRuleFilter] = None,
                               rule_identifier: Optional[str] = None,
                               zone_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetEmailRoutingRuleResult
    def get_email_routing_rule_output(filter: Optional[pulumi.Input[GetEmailRoutingRuleFilterArgs]] = None,
                               rule_identifier: Optional[pulumi.Input[str]] = None,
                               zone_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetEmailRoutingRuleResult]
    func LookupEmailRoutingRule(ctx *Context, args *LookupEmailRoutingRuleArgs, opts ...InvokeOption) (*LookupEmailRoutingRuleResult, error)
    func LookupEmailRoutingRuleOutput(ctx *Context, args *LookupEmailRoutingRuleOutputArgs, opts ...InvokeOption) LookupEmailRoutingRuleResultOutput

    > Note: This function is named LookupEmailRoutingRule in the Go SDK.

    public static class GetEmailRoutingRule 
    {
        public static Task<GetEmailRoutingRuleResult> InvokeAsync(GetEmailRoutingRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetEmailRoutingRuleResult> Invoke(GetEmailRoutingRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEmailRoutingRuleResult> getEmailRoutingRule(GetEmailRoutingRuleArgs args, InvokeOptions options)
    public static Output<GetEmailRoutingRuleResult> getEmailRoutingRule(GetEmailRoutingRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getEmailRoutingRule:getEmailRoutingRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    Identifier
    Filter GetEmailRoutingRuleFilter
    RuleIdentifier string
    Routing rule identifier.
    ZoneId string
    Identifier
    Filter GetEmailRoutingRuleFilter
    RuleIdentifier string
    Routing rule identifier.
    zoneId String
    Identifier
    filter GetEmailRoutingRuleFilter
    ruleIdentifier String
    Routing rule identifier.
    zoneId string
    Identifier
    filter GetEmailRoutingRuleFilter
    ruleIdentifier string
    Routing rule identifier.
    zone_id str
    Identifier
    filter GetEmailRoutingRuleFilter
    rule_identifier str
    Routing rule identifier.
    zoneId String
    Identifier
    filter Property Map
    ruleIdentifier String
    Routing rule identifier.

    getEmailRoutingRule Result

    The following output properties are available:

    Actions List<GetEmailRoutingRuleAction>
    List actions patterns.
    Enabled bool
    Routing rule status.
    Id string
    Routing rule identifier.
    Matchers List<GetEmailRoutingRuleMatcher>
    Matching patterns to forward to your actions.
    Name string
    Routing rule name.
    Priority double
    Priority of the routing rule.
    Tag string
    Routing rule tag. (Deprecated, replaced by routing rule identifier)

    Deprecated: This attribute is deprecated.

    ZoneId string
    Identifier
    Filter GetEmailRoutingRuleFilter
    RuleIdentifier string
    Routing rule identifier.
    Actions []GetEmailRoutingRuleAction
    List actions patterns.
    Enabled bool
    Routing rule status.
    Id string
    Routing rule identifier.
    Matchers []GetEmailRoutingRuleMatcher
    Matching patterns to forward to your actions.
    Name string
    Routing rule name.
    Priority float64
    Priority of the routing rule.
    Tag string
    Routing rule tag. (Deprecated, replaced by routing rule identifier)

    Deprecated: This attribute is deprecated.

    ZoneId string
    Identifier
    Filter GetEmailRoutingRuleFilter
    RuleIdentifier string
    Routing rule identifier.
    actions List<GetEmailRoutingRuleAction>
    List actions patterns.
    enabled Boolean
    Routing rule status.
    id String
    Routing rule identifier.
    matchers List<GetEmailRoutingRuleMatcher>
    Matching patterns to forward to your actions.
    name String
    Routing rule name.
    priority Double
    Priority of the routing rule.
    tag String
    Routing rule tag. (Deprecated, replaced by routing rule identifier)

    Deprecated: This attribute is deprecated.

    zoneId String
    Identifier
    filter GetEmailRoutingRuleFilter
    ruleIdentifier String
    Routing rule identifier.
    actions GetEmailRoutingRuleAction[]
    List actions patterns.
    enabled boolean
    Routing rule status.
    id string
    Routing rule identifier.
    matchers GetEmailRoutingRuleMatcher[]
    Matching patterns to forward to your actions.
    name string
    Routing rule name.
    priority number
    Priority of the routing rule.
    tag string
    Routing rule tag. (Deprecated, replaced by routing rule identifier)

    Deprecated: This attribute is deprecated.

    zoneId string
    Identifier
    filter GetEmailRoutingRuleFilter
    ruleIdentifier string
    Routing rule identifier.
    actions Sequence[GetEmailRoutingRuleAction]
    List actions patterns.
    enabled bool
    Routing rule status.
    id str
    Routing rule identifier.
    matchers Sequence[GetEmailRoutingRuleMatcher]
    Matching patterns to forward to your actions.
    name str
    Routing rule name.
    priority float
    Priority of the routing rule.
    tag str
    Routing rule tag. (Deprecated, replaced by routing rule identifier)

    Deprecated: This attribute is deprecated.

    zone_id str
    Identifier
    filter GetEmailRoutingRuleFilter
    rule_identifier str
    Routing rule identifier.
    actions List<Property Map>
    List actions patterns.
    enabled Boolean
    Routing rule status.
    id String
    Routing rule identifier.
    matchers List<Property Map>
    Matching patterns to forward to your actions.
    name String
    Routing rule name.
    priority Number
    Priority of the routing rule.
    tag String
    Routing rule tag. (Deprecated, replaced by routing rule identifier)

    Deprecated: This attribute is deprecated.

    zoneId String
    Identifier
    filter Property Map
    ruleIdentifier String
    Routing rule identifier.

    Supporting Types

    GetEmailRoutingRuleAction

    Type string
    Type of supported action. Available values: "drop", "forward", "worker".
    Values List<string>
    Type string
    Type of supported action. Available values: "drop", "forward", "worker".
    Values []string
    type String
    Type of supported action. Available values: "drop", "forward", "worker".
    values List<String>
    type string
    Type of supported action. Available values: "drop", "forward", "worker".
    values string[]
    type str
    Type of supported action. Available values: "drop", "forward", "worker".
    values Sequence[str]
    type String
    Type of supported action. Available values: "drop", "forward", "worker".
    values List<String>

    GetEmailRoutingRuleFilter

    Enabled bool
    Filter by enabled routing rules.
    Enabled bool
    Filter by enabled routing rules.
    enabled Boolean
    Filter by enabled routing rules.
    enabled boolean
    Filter by enabled routing rules.
    enabled bool
    Filter by enabled routing rules.
    enabled Boolean
    Filter by enabled routing rules.

    GetEmailRoutingRuleMatcher

    Field string
    Field for type matcher. Available values: "to".
    Type string
    Type of matcher. Available values: "literal".
    Value string
    Value for matcher.
    Field string
    Field for type matcher. Available values: "to".
    Type string
    Type of matcher. Available values: "literal".
    Value string
    Value for matcher.
    field String
    Field for type matcher. Available values: "to".
    type String
    Type of matcher. Available values: "literal".
    value String
    Value for matcher.
    field string
    Field for type matcher. Available values: "to".
    type string
    Type of matcher. Available values: "literal".
    value string
    Value for matcher.
    field str
    Field for type matcher. Available values: "to".
    type str
    Type of matcher. Available values: "literal".
    value str
    Value for matcher.
    field String
    Field for type matcher. Available values: "to".
    type String
    Type of matcher. Available values: "literal".
    value String
    Value for matcher.

    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 v6.1.2 published on Monday, Apr 28, 2025 by Pulumi