1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. DlpProfile
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

cloudflare.DlpProfile

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.43.0 published on Wednesday, Nov 13, 2024 by Pulumi

    Provides a Cloudflare DLP Profile resource. Data Loss Prevention profiles are a set of entries that can be matched in HTTP bodies or files. They are referenced in Zero Trust Gateway rules.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    // Predefined profile must be imported, cannot be created
    const creds = new cloudflare.DlpProfile("creds", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        name: "Credentials and Secrets",
        type: "predefined",
        allowedMatchCount: 3,
        entries: [
            {
                enabled: true,
                name: "Amazon AWS Access Key ID",
                id: "d8fcfc9c-773c-405e-8426-21ecbb67ba93",
            },
            {
                enabled: false,
                id: "2c0e33e1-71da-40c8-aad3-32e674ad3d96",
                name: "Amazon AWS Secret Access Key",
            },
            {
                enabled: true,
                id: "4e92c006-3802-4dff-bbe1-8e1513b1c92a",
                name: "Microsoft Azure Client Secret",
            },
            {
                enabled: false,
                id: "5c713294-2375-4904-abcf-e4a15be4d592",
                name: "SSH Private Key",
            },
            {
                enabled: true,
                id: "6c6579e4-d832-42d5-905c-8e53340930f2",
                name: "Google GCP API Key",
            },
        ],
    });
    // Custom profile
    const exampleCustom = new cloudflare.DlpProfile("example_custom", {
        accountId: "f037e56e89293a057740de681ac9abbe",
        name: "Example Custom Profile",
        description: "A profile with example entries",
        type: "custom",
        allowedMatchCount: 0,
        entries: [
            {
                name: "Matches visa credit cards",
                enabled: true,
                pattern: {
                    regex: "4\\d{3}([-\\. ])?\\d{4}([-\\. ])?\\d{4}([-\\. ])?\\d{4}",
                    validation: "luhn",
                },
            },
            {
                name: "Matches diners club card",
                enabled: true,
                pattern: {
                    regex: "(?:0[0-5]|[68][0-9])[0-9]{11}",
                    validation: "luhn",
                },
            },
        ],
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Predefined profile must be imported, cannot be created
    creds = cloudflare.DlpProfile("creds",
        account_id="f037e56e89293a057740de681ac9abbe",
        name="Credentials and Secrets",
        type="predefined",
        allowed_match_count=3,
        entries=[
            {
                "enabled": True,
                "name": "Amazon AWS Access Key ID",
                "id": "d8fcfc9c-773c-405e-8426-21ecbb67ba93",
            },
            {
                "enabled": False,
                "id": "2c0e33e1-71da-40c8-aad3-32e674ad3d96",
                "name": "Amazon AWS Secret Access Key",
            },
            {
                "enabled": True,
                "id": "4e92c006-3802-4dff-bbe1-8e1513b1c92a",
                "name": "Microsoft Azure Client Secret",
            },
            {
                "enabled": False,
                "id": "5c713294-2375-4904-abcf-e4a15be4d592",
                "name": "SSH Private Key",
            },
            {
                "enabled": True,
                "id": "6c6579e4-d832-42d5-905c-8e53340930f2",
                "name": "Google GCP API Key",
            },
        ])
    # Custom profile
    example_custom = cloudflare.DlpProfile("example_custom",
        account_id="f037e56e89293a057740de681ac9abbe",
        name="Example Custom Profile",
        description="A profile with example entries",
        type="custom",
        allowed_match_count=0,
        entries=[
            {
                "name": "Matches visa credit cards",
                "enabled": True,
                "pattern": {
                    "regex": "4\\d{3}([-\\. ])?\\d{4}([-\\. ])?\\d{4}([-\\. ])?\\d{4}",
                    "validation": "luhn",
                },
            },
            {
                "name": "Matches diners club card",
                "enabled": True,
                "pattern": {
                    "regex": "(?:0[0-5]|[68][0-9])[0-9]{11}",
                    "validation": "luhn",
                },
            },
        ])
    
    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 {
    		// Predefined profile must be imported, cannot be created
    		_, err := cloudflare.NewDlpProfile(ctx, "creds", &cloudflare.DlpProfileArgs{
    			AccountId:         pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Name:              pulumi.String("Credentials and Secrets"),
    			Type:              pulumi.String("predefined"),
    			AllowedMatchCount: pulumi.Int(3),
    			Entries: cloudflare.DlpProfileEntryArray{
    				&cloudflare.DlpProfileEntryArgs{
    					Enabled: pulumi.Bool(true),
    					Name:    pulumi.String("Amazon AWS Access Key ID"),
    					Id:      pulumi.String("d8fcfc9c-773c-405e-8426-21ecbb67ba93"),
    				},
    				&cloudflare.DlpProfileEntryArgs{
    					Enabled: pulumi.Bool(false),
    					Id:      pulumi.String("2c0e33e1-71da-40c8-aad3-32e674ad3d96"),
    					Name:    pulumi.String("Amazon AWS Secret Access Key"),
    				},
    				&cloudflare.DlpProfileEntryArgs{
    					Enabled: pulumi.Bool(true),
    					Id:      pulumi.String("4e92c006-3802-4dff-bbe1-8e1513b1c92a"),
    					Name:    pulumi.String("Microsoft Azure Client Secret"),
    				},
    				&cloudflare.DlpProfileEntryArgs{
    					Enabled: pulumi.Bool(false),
    					Id:      pulumi.String("5c713294-2375-4904-abcf-e4a15be4d592"),
    					Name:    pulumi.String("SSH Private Key"),
    				},
    				&cloudflare.DlpProfileEntryArgs{
    					Enabled: pulumi.Bool(true),
    					Id:      pulumi.String("6c6579e4-d832-42d5-905c-8e53340930f2"),
    					Name:    pulumi.String("Google GCP API Key"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Custom profile
    		_, err = cloudflare.NewDlpProfile(ctx, "example_custom", &cloudflare.DlpProfileArgs{
    			AccountId:         pulumi.String("f037e56e89293a057740de681ac9abbe"),
    			Name:              pulumi.String("Example Custom Profile"),
    			Description:       pulumi.String("A profile with example entries"),
    			Type:              pulumi.String("custom"),
    			AllowedMatchCount: pulumi.Int(0),
    			Entries: cloudflare.DlpProfileEntryArray{
    				&cloudflare.DlpProfileEntryArgs{
    					Name:    pulumi.String("Matches visa credit cards"),
    					Enabled: pulumi.Bool(true),
    					Pattern: &cloudflare.DlpProfileEntryPatternArgs{
    						Regex:      pulumi.String("4\\d{3}([-\\. ])?\\d{4}([-\\. ])?\\d{4}([-\\. ])?\\d{4}"),
    						Validation: pulumi.String("luhn"),
    					},
    				},
    				&cloudflare.DlpProfileEntryArgs{
    					Name:    pulumi.String("Matches diners club card"),
    					Enabled: pulumi.Bool(true),
    					Pattern: &cloudflare.DlpProfileEntryPatternArgs{
    						Regex:      pulumi.String("(?:0[0-5]|[68][0-9])[0-9]{11}"),
    						Validation: pulumi.String("luhn"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Predefined profile must be imported, cannot be created
        var creds = new Cloudflare.DlpProfile("creds", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "Credentials and Secrets",
            Type = "predefined",
            AllowedMatchCount = 3,
            Entries = new[]
            {
                new Cloudflare.Inputs.DlpProfileEntryArgs
                {
                    Enabled = true,
                    Name = "Amazon AWS Access Key ID",
                    Id = "d8fcfc9c-773c-405e-8426-21ecbb67ba93",
                },
                new Cloudflare.Inputs.DlpProfileEntryArgs
                {
                    Enabled = false,
                    Id = "2c0e33e1-71da-40c8-aad3-32e674ad3d96",
                    Name = "Amazon AWS Secret Access Key",
                },
                new Cloudflare.Inputs.DlpProfileEntryArgs
                {
                    Enabled = true,
                    Id = "4e92c006-3802-4dff-bbe1-8e1513b1c92a",
                    Name = "Microsoft Azure Client Secret",
                },
                new Cloudflare.Inputs.DlpProfileEntryArgs
                {
                    Enabled = false,
                    Id = "5c713294-2375-4904-abcf-e4a15be4d592",
                    Name = "SSH Private Key",
                },
                new Cloudflare.Inputs.DlpProfileEntryArgs
                {
                    Enabled = true,
                    Id = "6c6579e4-d832-42d5-905c-8e53340930f2",
                    Name = "Google GCP API Key",
                },
            },
        });
    
        // Custom profile
        var exampleCustom = new Cloudflare.DlpProfile("example_custom", new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "Example Custom Profile",
            Description = "A profile with example entries",
            Type = "custom",
            AllowedMatchCount = 0,
            Entries = new[]
            {
                new Cloudflare.Inputs.DlpProfileEntryArgs
                {
                    Name = "Matches visa credit cards",
                    Enabled = true,
                    Pattern = new Cloudflare.Inputs.DlpProfileEntryPatternArgs
                    {
                        Regex = "4\\d{3}([-\\. ])?\\d{4}([-\\. ])?\\d{4}([-\\. ])?\\d{4}",
                        Validation = "luhn",
                    },
                },
                new Cloudflare.Inputs.DlpProfileEntryArgs
                {
                    Name = "Matches diners club card",
                    Enabled = true,
                    Pattern = new Cloudflare.Inputs.DlpProfileEntryPatternArgs
                    {
                        Regex = "(?:0[0-5]|[68][0-9])[0-9]{11}",
                        Validation = "luhn",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.DlpProfile;
    import com.pulumi.cloudflare.DlpProfileArgs;
    import com.pulumi.cloudflare.inputs.DlpProfileEntryArgs;
    import com.pulumi.cloudflare.inputs.DlpProfileEntryPatternArgs;
    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) {
            // Predefined profile must be imported, cannot be created
            var creds = new DlpProfile("creds", DlpProfileArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .name("Credentials and Secrets")
                .type("predefined")
                .allowedMatchCount(3)
                .entries(            
                    DlpProfileEntryArgs.builder()
                        .enabled(true)
                        .name("Amazon AWS Access Key ID")
                        .id("d8fcfc9c-773c-405e-8426-21ecbb67ba93")
                        .build(),
                    DlpProfileEntryArgs.builder()
                        .enabled(false)
                        .id("2c0e33e1-71da-40c8-aad3-32e674ad3d96")
                        .name("Amazon AWS Secret Access Key")
                        .build(),
                    DlpProfileEntryArgs.builder()
                        .enabled(true)
                        .id("4e92c006-3802-4dff-bbe1-8e1513b1c92a")
                        .name("Microsoft Azure Client Secret")
                        .build(),
                    DlpProfileEntryArgs.builder()
                        .enabled(false)
                        .id("5c713294-2375-4904-abcf-e4a15be4d592")
                        .name("SSH Private Key")
                        .build(),
                    DlpProfileEntryArgs.builder()
                        .enabled(true)
                        .id("6c6579e4-d832-42d5-905c-8e53340930f2")
                        .name("Google GCP API Key")
                        .build())
                .build());
    
            // Custom profile
            var exampleCustom = new DlpProfile("exampleCustom", DlpProfileArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .name("Example Custom Profile")
                .description("A profile with example entries")
                .type("custom")
                .allowedMatchCount(0)
                .entries(            
                    DlpProfileEntryArgs.builder()
                        .name("Matches visa credit cards")
                        .enabled(true)
                        .pattern(DlpProfileEntryPatternArgs.builder()
                            .regex("4\\d{3}([-\\. ])?\\d{4}([-\\. ])?\\d{4}([-\\. ])?\\d{4}")
                            .validation("luhn")
                            .build())
                        .build(),
                    DlpProfileEntryArgs.builder()
                        .name("Matches diners club card")
                        .enabled(true)
                        .pattern(DlpProfileEntryPatternArgs.builder()
                            .regex("(?:0[0-5]|[68][0-9])[0-9]{11}")
                            .validation("luhn")
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      # Predefined profile must be imported, cannot be created
      creds:
        type: cloudflare:DlpProfile
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          name: Credentials and Secrets
          type: predefined
          allowedMatchCount: 3
          entries:
            - enabled: true
              name: Amazon AWS Access Key ID
              id: d8fcfc9c-773c-405e-8426-21ecbb67ba93
            - enabled: false
              id: 2c0e33e1-71da-40c8-aad3-32e674ad3d96
              name: Amazon AWS Secret Access Key
            - enabled: true
              id: 4e92c006-3802-4dff-bbe1-8e1513b1c92a
              name: Microsoft Azure Client Secret
            - enabled: false
              id: 5c713294-2375-4904-abcf-e4a15be4d592
              name: SSH Private Key
            - enabled: true
              id: 6c6579e4-d832-42d5-905c-8e53340930f2
              name: Google GCP API Key
      # Custom profile
      exampleCustom:
        type: cloudflare:DlpProfile
        name: example_custom
        properties:
          accountId: f037e56e89293a057740de681ac9abbe
          name: Example Custom Profile
          description: A profile with example entries
          type: custom
          allowedMatchCount: 0
          entries:
            - name: Matches visa credit cards
              enabled: true
              pattern:
                regex: 4\d{3}([-\. ])?\d{4}([-\. ])?\d{4}([-\. ])?\d{4}
                validation: luhn
            - name: Matches diners club card
              enabled: true
              pattern:
                regex: (?:0[0-5]|[68][0-9])[0-9]{11}
                validation: luhn
    

    Create DlpProfile Resource

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

    Constructor syntax

    new DlpProfile(name: string, args: DlpProfileArgs, opts?: CustomResourceOptions);
    @overload
    def DlpProfile(resource_name: str,
                   args: DlpProfileArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def DlpProfile(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   account_id: Optional[str] = None,
                   allowed_match_count: Optional[int] = None,
                   entries: Optional[Sequence[DlpProfileEntryArgs]] = None,
                   name: Optional[str] = None,
                   type: Optional[str] = None,
                   context_awareness: Optional[DlpProfileContextAwarenessArgs] = None,
                   description: Optional[str] = None,
                   ocr_enabled: Optional[bool] = None)
    func NewDlpProfile(ctx *Context, name string, args DlpProfileArgs, opts ...ResourceOption) (*DlpProfile, error)
    public DlpProfile(string name, DlpProfileArgs args, CustomResourceOptions? opts = null)
    public DlpProfile(String name, DlpProfileArgs args)
    public DlpProfile(String name, DlpProfileArgs args, CustomResourceOptions options)
    
    type: cloudflare:DlpProfile
    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 DlpProfileArgs
    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 DlpProfileArgs
    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 DlpProfileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DlpProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DlpProfileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var dlpProfileResource = new Cloudflare.DlpProfile("dlpProfileResource", new()
    {
        AccountId = "string",
        AllowedMatchCount = 0,
        Entries = new[]
        {
            new Cloudflare.Inputs.DlpProfileEntryArgs
            {
                Name = "string",
                Enabled = false,
                Id = "string",
                Pattern = new Cloudflare.Inputs.DlpProfileEntryPatternArgs
                {
                    Regex = "string",
                    Validation = "string",
                },
            },
        },
        Name = "string",
        Type = "string",
        ContextAwareness = new Cloudflare.Inputs.DlpProfileContextAwarenessArgs
        {
            Enabled = false,
            Skip = new Cloudflare.Inputs.DlpProfileContextAwarenessSkipArgs
            {
                Files = false,
            },
        },
        Description = "string",
        OcrEnabled = false,
    });
    
    example, err := cloudflare.NewDlpProfile(ctx, "dlpProfileResource", &cloudflare.DlpProfileArgs{
    	AccountId:         pulumi.String("string"),
    	AllowedMatchCount: pulumi.Int(0),
    	Entries: cloudflare.DlpProfileEntryArray{
    		&cloudflare.DlpProfileEntryArgs{
    			Name:    pulumi.String("string"),
    			Enabled: pulumi.Bool(false),
    			Id:      pulumi.String("string"),
    			Pattern: &cloudflare.DlpProfileEntryPatternArgs{
    				Regex:      pulumi.String("string"),
    				Validation: pulumi.String("string"),
    			},
    		},
    	},
    	Name: pulumi.String("string"),
    	Type: pulumi.String("string"),
    	ContextAwareness: &cloudflare.DlpProfileContextAwarenessArgs{
    		Enabled: pulumi.Bool(false),
    		Skip: &cloudflare.DlpProfileContextAwarenessSkipArgs{
    			Files: pulumi.Bool(false),
    		},
    	},
    	Description: pulumi.String("string"),
    	OcrEnabled:  pulumi.Bool(false),
    })
    
    var dlpProfileResource = new DlpProfile("dlpProfileResource", DlpProfileArgs.builder()
        .accountId("string")
        .allowedMatchCount(0)
        .entries(DlpProfileEntryArgs.builder()
            .name("string")
            .enabled(false)
            .id("string")
            .pattern(DlpProfileEntryPatternArgs.builder()
                .regex("string")
                .validation("string")
                .build())
            .build())
        .name("string")
        .type("string")
        .contextAwareness(DlpProfileContextAwarenessArgs.builder()
            .enabled(false)
            .skip(DlpProfileContextAwarenessSkipArgs.builder()
                .files(false)
                .build())
            .build())
        .description("string")
        .ocrEnabled(false)
        .build());
    
    dlp_profile_resource = cloudflare.DlpProfile("dlpProfileResource",
        account_id="string",
        allowed_match_count=0,
        entries=[{
            "name": "string",
            "enabled": False,
            "id": "string",
            "pattern": {
                "regex": "string",
                "validation": "string",
            },
        }],
        name="string",
        type="string",
        context_awareness={
            "enabled": False,
            "skip": {
                "files": False,
            },
        },
        description="string",
        ocr_enabled=False)
    
    const dlpProfileResource = new cloudflare.DlpProfile("dlpProfileResource", {
        accountId: "string",
        allowedMatchCount: 0,
        entries: [{
            name: "string",
            enabled: false,
            id: "string",
            pattern: {
                regex: "string",
                validation: "string",
            },
        }],
        name: "string",
        type: "string",
        contextAwareness: {
            enabled: false,
            skip: {
                files: false,
            },
        },
        description: "string",
        ocrEnabled: false,
    });
    
    type: cloudflare:DlpProfile
    properties:
        accountId: string
        allowedMatchCount: 0
        contextAwareness:
            enabled: false
            skip:
                files: false
        description: string
        entries:
            - enabled: false
              id: string
              name: string
              pattern:
                regex: string
                validation: string
        name: string
        ocrEnabled: false
        type: string
    

    DlpProfile Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The DlpProfile resource accepts the following input properties:

    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    AllowedMatchCount int
    Related DLP policies will trigger when the match count exceeds the number set.
    Entries List<DlpProfileEntry>
    List of entries to apply to the profile.
    Name string
    Name of the profile. Modifying this attribute will force creation of a new resource.
    Type string
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    ContextAwareness DlpProfileContextAwareness
    Scan the context of predefined entries to only return matches surrounded by keywords.
    Description string
    Brief summary of the profile and its intended use.
    OcrEnabled bool
    If true, scan images via OCR to determine if any text present matches filters.
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    AllowedMatchCount int
    Related DLP policies will trigger when the match count exceeds the number set.
    Entries []DlpProfileEntryArgs
    List of entries to apply to the profile.
    Name string
    Name of the profile. Modifying this attribute will force creation of a new resource.
    Type string
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    ContextAwareness DlpProfileContextAwarenessArgs
    Scan the context of predefined entries to only return matches surrounded by keywords.
    Description string
    Brief summary of the profile and its intended use.
    OcrEnabled bool
    If true, scan images via OCR to determine if any text present matches filters.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowedMatchCount Integer
    Related DLP policies will trigger when the match count exceeds the number set.
    entries List<DlpProfileEntry>
    List of entries to apply to the profile.
    name String
    Name of the profile. Modifying this attribute will force creation of a new resource.
    type String
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    contextAwareness DlpProfileContextAwareness
    Scan the context of predefined entries to only return matches surrounded by keywords.
    description String
    Brief summary of the profile and its intended use.
    ocrEnabled Boolean
    If true, scan images via OCR to determine if any text present matches filters.
    accountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowedMatchCount number
    Related DLP policies will trigger when the match count exceeds the number set.
    entries DlpProfileEntry[]
    List of entries to apply to the profile.
    name string
    Name of the profile. Modifying this attribute will force creation of a new resource.
    type string
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    contextAwareness DlpProfileContextAwareness
    Scan the context of predefined entries to only return matches surrounded by keywords.
    description string
    Brief summary of the profile and its intended use.
    ocrEnabled boolean
    If true, scan images via OCR to determine if any text present matches filters.
    account_id str
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowed_match_count int
    Related DLP policies will trigger when the match count exceeds the number set.
    entries Sequence[DlpProfileEntryArgs]
    List of entries to apply to the profile.
    name str
    Name of the profile. Modifying this attribute will force creation of a new resource.
    type str
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    context_awareness DlpProfileContextAwarenessArgs
    Scan the context of predefined entries to only return matches surrounded by keywords.
    description str
    Brief summary of the profile and its intended use.
    ocr_enabled bool
    If true, scan images via OCR to determine if any text present matches filters.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowedMatchCount Number
    Related DLP policies will trigger when the match count exceeds the number set.
    entries List<Property Map>
    List of entries to apply to the profile.
    name String
    Name of the profile. Modifying this attribute will force creation of a new resource.
    type String
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    contextAwareness Property Map
    Scan the context of predefined entries to only return matches surrounded by keywords.
    description String
    Brief summary of the profile and its intended use.
    ocrEnabled Boolean
    If true, scan images via OCR to determine if any text present matches filters.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DlpProfile Resource

    Get an existing DlpProfile 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?: DlpProfileState, opts?: CustomResourceOptions): DlpProfile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            allowed_match_count: Optional[int] = None,
            context_awareness: Optional[DlpProfileContextAwarenessArgs] = None,
            description: Optional[str] = None,
            entries: Optional[Sequence[DlpProfileEntryArgs]] = None,
            name: Optional[str] = None,
            ocr_enabled: Optional[bool] = None,
            type: Optional[str] = None) -> DlpProfile
    func GetDlpProfile(ctx *Context, name string, id IDInput, state *DlpProfileState, opts ...ResourceOption) (*DlpProfile, error)
    public static DlpProfile Get(string name, Input<string> id, DlpProfileState? state, CustomResourceOptions? opts = null)
    public static DlpProfile get(String name, Output<String> id, DlpProfileState 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:
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    AllowedMatchCount int
    Related DLP policies will trigger when the match count exceeds the number set.
    ContextAwareness DlpProfileContextAwareness
    Scan the context of predefined entries to only return matches surrounded by keywords.
    Description string
    Brief summary of the profile and its intended use.
    Entries List<DlpProfileEntry>
    List of entries to apply to the profile.
    Name string
    Name of the profile. Modifying this attribute will force creation of a new resource.
    OcrEnabled bool
    If true, scan images via OCR to determine if any text present matches filters.
    Type string
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    AccountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    AllowedMatchCount int
    Related DLP policies will trigger when the match count exceeds the number set.
    ContextAwareness DlpProfileContextAwarenessArgs
    Scan the context of predefined entries to only return matches surrounded by keywords.
    Description string
    Brief summary of the profile and its intended use.
    Entries []DlpProfileEntryArgs
    List of entries to apply to the profile.
    Name string
    Name of the profile. Modifying this attribute will force creation of a new resource.
    OcrEnabled bool
    If true, scan images via OCR to determine if any text present matches filters.
    Type string
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowedMatchCount Integer
    Related DLP policies will trigger when the match count exceeds the number set.
    contextAwareness DlpProfileContextAwareness
    Scan the context of predefined entries to only return matches surrounded by keywords.
    description String
    Brief summary of the profile and its intended use.
    entries List<DlpProfileEntry>
    List of entries to apply to the profile.
    name String
    Name of the profile. Modifying this attribute will force creation of a new resource.
    ocrEnabled Boolean
    If true, scan images via OCR to determine if any text present matches filters.
    type String
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    accountId string
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowedMatchCount number
    Related DLP policies will trigger when the match count exceeds the number set.
    contextAwareness DlpProfileContextAwareness
    Scan the context of predefined entries to only return matches surrounded by keywords.
    description string
    Brief summary of the profile and its intended use.
    entries DlpProfileEntry[]
    List of entries to apply to the profile.
    name string
    Name of the profile. Modifying this attribute will force creation of a new resource.
    ocrEnabled boolean
    If true, scan images via OCR to determine if any text present matches filters.
    type string
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    account_id str
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowed_match_count int
    Related DLP policies will trigger when the match count exceeds the number set.
    context_awareness DlpProfileContextAwarenessArgs
    Scan the context of predefined entries to only return matches surrounded by keywords.
    description str
    Brief summary of the profile and its intended use.
    entries Sequence[DlpProfileEntryArgs]
    List of entries to apply to the profile.
    name str
    Name of the profile. Modifying this attribute will force creation of a new resource.
    ocr_enabled bool
    If true, scan images via OCR to determine if any text present matches filters.
    type str
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.
    accountId String
    The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
    allowedMatchCount Number
    Related DLP policies will trigger when the match count exceeds the number set.
    contextAwareness Property Map
    Scan the context of predefined entries to only return matches surrounded by keywords.
    description String
    Brief summary of the profile and its intended use.
    entries List<Property Map>
    List of entries to apply to the profile.
    name String
    Name of the profile. Modifying this attribute will force creation of a new resource.
    ocrEnabled Boolean
    If true, scan images via OCR to determine if any text present matches filters.
    type String
    The type of the profile. Available values: custom, predefined. Modifying this attribute will force creation of a new resource.

    Supporting Types

    DlpProfileContextAwareness, DlpProfileContextAwarenessArgs

    Enabled bool
    Scan the context of predefined entries to only return matches surrounded by keywords.
    Skip DlpProfileContextAwarenessSkip
    Content types to exclude from context analysis and return all matches.
    Enabled bool
    Scan the context of predefined entries to only return matches surrounded by keywords.
    Skip DlpProfileContextAwarenessSkip
    Content types to exclude from context analysis and return all matches.
    enabled Boolean
    Scan the context of predefined entries to only return matches surrounded by keywords.
    skip DlpProfileContextAwarenessSkip
    Content types to exclude from context analysis and return all matches.
    enabled boolean
    Scan the context of predefined entries to only return matches surrounded by keywords.
    skip DlpProfileContextAwarenessSkip
    Content types to exclude from context analysis and return all matches.
    enabled bool
    Scan the context of predefined entries to only return matches surrounded by keywords.
    skip DlpProfileContextAwarenessSkip
    Content types to exclude from context analysis and return all matches.
    enabled Boolean
    Scan the context of predefined entries to only return matches surrounded by keywords.
    skip Property Map
    Content types to exclude from context analysis and return all matches.

    DlpProfileContextAwarenessSkip, DlpProfileContextAwarenessSkipArgs

    Files bool
    Return all matches, regardless of context analysis result, if the data is a file.
    Files bool
    Return all matches, regardless of context analysis result, if the data is a file.
    files Boolean
    Return all matches, regardless of context analysis result, if the data is a file.
    files boolean
    Return all matches, regardless of context analysis result, if the data is a file.
    files bool
    Return all matches, regardless of context analysis result, if the data is a file.
    files Boolean
    Return all matches, regardless of context analysis result, if the data is a file.

    DlpProfileEntry, DlpProfileEntryArgs

    Name string
    Name of the entry to deploy.
    Enabled bool
    Whether the entry is active. Defaults to false.
    Id string
    Unique entry identifier.
    Pattern DlpProfileEntryPattern
    Name string
    Name of the entry to deploy.
    Enabled bool
    Whether the entry is active. Defaults to false.
    Id string
    Unique entry identifier.
    Pattern DlpProfileEntryPattern
    name String
    Name of the entry to deploy.
    enabled Boolean
    Whether the entry is active. Defaults to false.
    id String
    Unique entry identifier.
    pattern DlpProfileEntryPattern
    name string
    Name of the entry to deploy.
    enabled boolean
    Whether the entry is active. Defaults to false.
    id string
    Unique entry identifier.
    pattern DlpProfileEntryPattern
    name str
    Name of the entry to deploy.
    enabled bool
    Whether the entry is active. Defaults to false.
    id str
    Unique entry identifier.
    pattern DlpProfileEntryPattern
    name String
    Name of the entry to deploy.
    enabled Boolean
    Whether the entry is active. Defaults to false.
    id String
    Unique entry identifier.
    pattern Property Map

    DlpProfileEntryPattern, DlpProfileEntryPatternArgs

    Regex string
    The regex that defines the pattern.
    Validation string
    The validation algorithm to apply with this pattern.
    Regex string
    The regex that defines the pattern.
    Validation string
    The validation algorithm to apply with this pattern.
    regex String
    The regex that defines the pattern.
    validation String
    The validation algorithm to apply with this pattern.
    regex string
    The regex that defines the pattern.
    validation string
    The validation algorithm to apply with this pattern.
    regex str
    The regex that defines the pattern.
    validation str
    The validation algorithm to apply with this pattern.
    regex String
    The regex that defines the pattern.
    validation String
    The validation algorithm to apply with this pattern.

    Import

    $ pulumi import cloudflare:index/dlpProfile:DlpProfile example <account_id>/<dlp_profile_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.43.0 published on Wednesday, Nov 13, 2024 by Pulumi