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

cloudflare.getEmailRoutingRules

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 exampleEmailRoutingRules = cloudflare.getEmailRoutingRules({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        enabled: true,
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_email_routing_rules = cloudflare.get_email_routing_rules(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        enabled=True)
    
    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.LookupEmailRoutingRules(ctx, &cloudflare.LookupEmailRoutingRulesArgs{
    			ZoneId:  "023e105f4ecef8ad9ca31a8372d0c353",
    			Enabled: pulumi.BoolRef(true),
    		}, 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 exampleEmailRoutingRules = Cloudflare.GetEmailRoutingRules.Invoke(new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            Enabled = true,
        });
    
    });
    
    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.GetEmailRoutingRulesArgs;
    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 exampleEmailRoutingRules = CloudflareFunctions.getEmailRoutingRules(GetEmailRoutingRulesArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .enabled(true)
                .build());
    
        }
    }
    
    variables:
      exampleEmailRoutingRules:
        fn::invoke:
          function: cloudflare:getEmailRoutingRules
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
            enabled: true
    

    Using getEmailRoutingRules

    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 getEmailRoutingRules(args: GetEmailRoutingRulesArgs, opts?: InvokeOptions): Promise<GetEmailRoutingRulesResult>
    function getEmailRoutingRulesOutput(args: GetEmailRoutingRulesOutputArgs, opts?: InvokeOptions): Output<GetEmailRoutingRulesResult>
    def get_email_routing_rules(enabled: Optional[bool] = None,
                                max_items: Optional[int] = None,
                                zone_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetEmailRoutingRulesResult
    def get_email_routing_rules_output(enabled: Optional[pulumi.Input[bool]] = None,
                                max_items: Optional[pulumi.Input[int]] = None,
                                zone_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetEmailRoutingRulesResult]
    func LookupEmailRoutingRules(ctx *Context, args *LookupEmailRoutingRulesArgs, opts ...InvokeOption) (*LookupEmailRoutingRulesResult, error)
    func LookupEmailRoutingRulesOutput(ctx *Context, args *LookupEmailRoutingRulesOutputArgs, opts ...InvokeOption) LookupEmailRoutingRulesResultOutput

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

    public static class GetEmailRoutingRules 
    {
        public static Task<GetEmailRoutingRulesResult> InvokeAsync(GetEmailRoutingRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetEmailRoutingRulesResult> Invoke(GetEmailRoutingRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEmailRoutingRulesResult> getEmailRoutingRules(GetEmailRoutingRulesArgs args, InvokeOptions options)
    public static Output<GetEmailRoutingRulesResult> getEmailRoutingRules(GetEmailRoutingRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getEmailRoutingRules:getEmailRoutingRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    Identifier
    Enabled bool
    Filter by enabled routing rules.
    MaxItems int
    Max items to fetch, default: 1000
    ZoneId string
    Identifier
    Enabled bool
    Filter by enabled routing rules.
    MaxItems int
    Max items to fetch, default: 1000
    zoneId String
    Identifier
    enabled Boolean
    Filter by enabled routing rules.
    maxItems Integer
    Max items to fetch, default: 1000
    zoneId string
    Identifier
    enabled boolean
    Filter by enabled routing rules.
    maxItems number
    Max items to fetch, default: 1000
    zone_id str
    Identifier
    enabled bool
    Filter by enabled routing rules.
    max_items int
    Max items to fetch, default: 1000
    zoneId String
    Identifier
    enabled Boolean
    Filter by enabled routing rules.
    maxItems Number
    Max items to fetch, default: 1000

    getEmailRoutingRules Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Results List<GetEmailRoutingRulesResult>
    The items returned by the data source
    ZoneId string
    Identifier
    Enabled bool
    Filter by enabled routing rules.
    MaxItems int
    Max items to fetch, default: 1000
    Id string
    The provider-assigned unique ID for this managed resource.
    Results []GetEmailRoutingRulesResult
    The items returned by the data source
    ZoneId string
    Identifier
    Enabled bool
    Filter by enabled routing rules.
    MaxItems int
    Max items to fetch, default: 1000
    id String
    The provider-assigned unique ID for this managed resource.
    results List<GetEmailRoutingRulesResult>
    The items returned by the data source
    zoneId String
    Identifier
    enabled Boolean
    Filter by enabled routing rules.
    maxItems Integer
    Max items to fetch, default: 1000
    id string
    The provider-assigned unique ID for this managed resource.
    results GetEmailRoutingRulesResult[]
    The items returned by the data source
    zoneId string
    Identifier
    enabled boolean
    Filter by enabled routing rules.
    maxItems number
    Max items to fetch, default: 1000
    id str
    The provider-assigned unique ID for this managed resource.
    results Sequence[GetEmailRoutingRulesResult]
    The items returned by the data source
    zone_id str
    Identifier
    enabled bool
    Filter by enabled routing rules.
    max_items int
    Max items to fetch, default: 1000
    id String
    The provider-assigned unique ID for this managed resource.
    results List<Property Map>
    The items returned by the data source
    zoneId String
    Identifier
    enabled Boolean
    Filter by enabled routing rules.
    maxItems Number
    Max items to fetch, default: 1000

    Supporting Types

    GetEmailRoutingRulesResult

    Actions List<GetEmailRoutingRulesResultAction>
    List actions patterns.
    Enabled bool
    Routing rule status.
    Id string
    Routing rule identifier.
    Matchers List<GetEmailRoutingRulesResultMatcher>
    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.

    Actions []GetEmailRoutingRulesResultAction
    List actions patterns.
    Enabled bool
    Routing rule status.
    Id string
    Routing rule identifier.
    Matchers []GetEmailRoutingRulesResultMatcher
    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.

    actions List<GetEmailRoutingRulesResultAction>
    List actions patterns.
    enabled Boolean
    Routing rule status.
    id String
    Routing rule identifier.
    matchers List<GetEmailRoutingRulesResultMatcher>
    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.

    actions GetEmailRoutingRulesResultAction[]
    List actions patterns.
    enabled boolean
    Routing rule status.
    id string
    Routing rule identifier.
    matchers GetEmailRoutingRulesResultMatcher[]
    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.

    actions Sequence[GetEmailRoutingRulesResultAction]
    List actions patterns.
    enabled bool
    Routing rule status.
    id str
    Routing rule identifier.
    matchers Sequence[GetEmailRoutingRulesResultMatcher]
    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.

    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.

    GetEmailRoutingRulesResultAction

    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>

    GetEmailRoutingRulesResultMatcher

    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