1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getEmailSecurityBlockSender
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi

    Accepted Permissions

    • Cloud Email Security: Read
    • Cloud Email Security: Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleEmailSecurityBlockSender = cloudflare.getEmailSecurityBlockSender({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        patternId: "2402",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_email_security_block_sender = cloudflare.get_email_security_block_sender(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        pattern_id="2402")
    
    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.GetEmailSecurityBlockSender(ctx, &cloudflare.LookupEmailSecurityBlockSenderArgs{
    			AccountId: pulumi.StringRef("023e105f4ecef8ad9ca31a8372d0c353"),
    			PatternId: pulumi.StringRef("2402"),
    		}, 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 exampleEmailSecurityBlockSender = Cloudflare.GetEmailSecurityBlockSender.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            PatternId = "2402",
        });
    
    });
    
    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.GetEmailSecurityBlockSenderArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 exampleEmailSecurityBlockSender = CloudflareFunctions.getEmailSecurityBlockSender(GetEmailSecurityBlockSenderArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .patternId("2402")
                .build());
    
        }
    }
    
    variables:
      exampleEmailSecurityBlockSender:
        fn::invoke:
          function: cloudflare:getEmailSecurityBlockSender
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            patternId: 2402
    
    pulumi {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    data "cloudflare_getemailsecurityblocksender" "exampleEmailSecurityBlockSender" {
      account_id = "023e105f4ecef8ad9ca31a8372d0c353"
      pattern_id = 2402
    }
    

    Using getEmailSecurityBlockSender

    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 getEmailSecurityBlockSender(args: GetEmailSecurityBlockSenderArgs, opts?: InvokeOptions): Promise<GetEmailSecurityBlockSenderResult>
    function getEmailSecurityBlockSenderOutput(args: GetEmailSecurityBlockSenderOutputArgs, opts?: InvokeOptions): Output<GetEmailSecurityBlockSenderResult>
    def get_email_security_block_sender(account_id: Optional[str] = None,
                                        filter: Optional[GetEmailSecurityBlockSenderFilter] = None,
                                        pattern_id: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetEmailSecurityBlockSenderResult
    def get_email_security_block_sender_output(account_id: pulumi.Input[Optional[str]] = None,
                                        filter: pulumi.Input[Optional[GetEmailSecurityBlockSenderFilterArgs]] = None,
                                        pattern_id: pulumi.Input[Optional[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetEmailSecurityBlockSenderResult]
    func LookupEmailSecurityBlockSender(ctx *Context, args *LookupEmailSecurityBlockSenderArgs, opts ...InvokeOption) (*LookupEmailSecurityBlockSenderResult, error)
    func LookupEmailSecurityBlockSenderOutput(ctx *Context, args *LookupEmailSecurityBlockSenderOutputArgs, opts ...InvokeOption) LookupEmailSecurityBlockSenderResultOutput

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

    public static class GetEmailSecurityBlockSender 
    {
        public static Task<GetEmailSecurityBlockSenderResult> InvokeAsync(GetEmailSecurityBlockSenderArgs args, InvokeOptions? opts = null)
        public static Output<GetEmailSecurityBlockSenderResult> Invoke(GetEmailSecurityBlockSenderInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEmailSecurityBlockSenderResult> getEmailSecurityBlockSender(GetEmailSecurityBlockSenderArgs args, InvokeOptions options)
    public static Output<GetEmailSecurityBlockSenderResult> getEmailSecurityBlockSender(GetEmailSecurityBlockSenderArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getEmailSecurityBlockSender:getEmailSecurityBlockSender
      arguments:
        # arguments dictionary
    data "cloudflare_getemailsecurityblocksender" "name" {
        # arguments
    }

    The following arguments are supported:

    AccountId string
    Identifier.
    Filter GetEmailSecurityBlockSenderFilter
    PatternId string
    Blocked sender pattern identifier
    AccountId string
    Identifier.
    Filter GetEmailSecurityBlockSenderFilter
    PatternId string
    Blocked sender pattern identifier
    account_id string
    Identifier.
    filter object
    pattern_id string
    Blocked sender pattern identifier
    accountId String
    Identifier.
    filter GetEmailSecurityBlockSenderFilter
    patternId String
    Blocked sender pattern identifier
    accountId string
    Identifier.
    filter GetEmailSecurityBlockSenderFilter
    patternId string
    Blocked sender pattern identifier
    account_id str
    Identifier.
    filter GetEmailSecurityBlockSenderFilter
    pattern_id str
    Blocked sender pattern identifier
    accountId String
    Identifier.
    filter Property Map
    patternId String
    Blocked sender pattern identifier

    getEmailSecurityBlockSender Result

    The following output properties are available:

    Comments string
    CreatedAt string
    Id string
    Blocked sender pattern identifier
    IsRegex bool
    LastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    ModifiedAt string
    Pattern string
    PatternType string
    Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used when creating or updating policies, but may be returned for existing entries. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    AccountId string
    Identifier.
    Filter GetEmailSecurityBlockSenderFilter
    PatternId string
    Blocked sender pattern identifier
    Comments string
    CreatedAt string
    Id string
    Blocked sender pattern identifier
    IsRegex bool
    LastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    ModifiedAt string
    Pattern string
    PatternType string
    Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used when creating or updating policies, but may be returned for existing entries. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    AccountId string
    Identifier.
    Filter GetEmailSecurityBlockSenderFilter
    PatternId string
    Blocked sender pattern identifier
    comments string
    created_at string
    id string
    Blocked sender pattern identifier
    is_regex bool
    last_modified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modified_at string
    pattern string
    pattern_type string
    Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used when creating or updating policies, but may be returned for existing entries. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    account_id string
    Identifier.
    filter object
    pattern_id string
    Blocked sender pattern identifier
    comments String
    createdAt String
    id String
    Blocked sender pattern identifier
    isRegex Boolean
    lastModified String
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt String
    pattern String
    patternType String
    Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used when creating or updating policies, but may be returned for existing entries. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    accountId String
    Identifier.
    filter GetEmailSecurityBlockSenderFilter
    patternId String
    Blocked sender pattern identifier
    comments string
    createdAt string
    id string
    Blocked sender pattern identifier
    isRegex boolean
    lastModified string
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt string
    pattern string
    patternType string
    Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used when creating or updating policies, but may be returned for existing entries. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    accountId string
    Identifier.
    filter GetEmailSecurityBlockSenderFilter
    patternId string
    Blocked sender pattern identifier
    comments str
    created_at str
    id str
    Blocked sender pattern identifier
    is_regex bool
    last_modified str
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modified_at str
    pattern str
    pattern_type str
    Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used when creating or updating policies, but may be returned for existing entries. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    account_id str
    Identifier.
    filter GetEmailSecurityBlockSenderFilter
    pattern_id str
    Blocked sender pattern identifier
    comments String
    createdAt String
    id String
    Blocked sender pattern identifier
    isRegex Boolean
    lastModified String
    Deprecated, use modifiedAt instead. End of life: November 1, 2026.

    Deprecated: Use modifiedAt instead.

    modifiedAt String
    pattern String
    patternType String
    Type of pattern matching. Note: UNKNOWN is deprecated and cannot be used when creating or updating policies, but may be returned for existing entries. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    accountId String
    Identifier.
    filter Property Map
    patternId String
    Blocked sender pattern identifier

    Supporting Types

    GetEmailSecurityBlockSenderFilter

    Direction string
    The sorting direction. Available values: "asc", "desc".
    Order string
    Field to sort by. Available values: "pattern", "createdAt".
    Pattern string
    Filter by pattern value.
    PatternType string
    Filter by pattern type. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    Search string
    Search term for filtering records. Behavior may change.
    Direction string
    The sorting direction. Available values: "asc", "desc".
    Order string
    Field to sort by. Available values: "pattern", "createdAt".
    Pattern string
    Filter by pattern value.
    PatternType string
    Filter by pattern type. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    Search string
    Search term for filtering records. Behavior may change.
    direction string
    The sorting direction. Available values: "asc", "desc".
    order string
    Field to sort by. Available values: "pattern", "createdAt".
    pattern string
    Filter by pattern value.
    pattern_type string
    Filter by pattern type. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    search string
    Search term for filtering records. Behavior may change.
    direction String
    The sorting direction. Available values: "asc", "desc".
    order String
    Field to sort by. Available values: "pattern", "createdAt".
    pattern String
    Filter by pattern value.
    patternType String
    Filter by pattern type. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    search String
    Search term for filtering records. Behavior may change.
    direction string
    The sorting direction. Available values: "asc", "desc".
    order string
    Field to sort by. Available values: "pattern", "createdAt".
    pattern string
    Filter by pattern value.
    patternType string
    Filter by pattern type. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    search string
    Search term for filtering records. Behavior may change.
    direction str
    The sorting direction. Available values: "asc", "desc".
    order str
    Field to sort by. Available values: "pattern", "createdAt".
    pattern str
    Filter by pattern value.
    pattern_type str
    Filter by pattern type. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    search str
    Search term for filtering records. Behavior may change.
    direction String
    The sorting direction. Available values: "asc", "desc".
    order String
    Field to sort by. Available values: "pattern", "createdAt".
    pattern String
    Filter by pattern value.
    patternType String
    Filter by pattern type. Available values: "EMAIL", "DOMAIN", "IP", "UNKNOWN".
    search String
    Search term for filtering records. Behavior may change.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.18.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial