published on Monday, Mar 9, 2026 by Pulumi
published on Monday, Mar 9, 2026 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.
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,
description: Optional[str] = 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",
Description = "string",
});
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"),
Description: pulumi.String("string"),
})
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")
.description("string")
.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",
description="string")
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",
description: "string",
});
type: cloudflare:DlpProfile
properties:
accountId: string
allowedMatchCount: 0
description: string
entries:
- enabled: false
id: string
name: string
pattern:
regex: string
validation: string
name: string
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:
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Allowed
Match intCount - Related DLP policies will trigger when the match count exceeds the number set.
- Entries
List<Dlp
Profile Entry> - 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. - Description string
- Brief summary of the profile and its intended use.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Allowed
Match intCount - Related DLP policies will trigger when the match count exceeds the number set.
- Entries
[]Dlp
Profile Entry Args - 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. - Description string
- Brief summary of the profile and its intended use.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- allowed
Match IntegerCount - Related DLP policies will trigger when the match count exceeds the number set.
- entries
List<Dlp
Profile Entry> - 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. - description String
- Brief summary of the profile and its intended use.
- account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- allowed
Match numberCount - Related DLP policies will trigger when the match count exceeds the number set.
- entries
Dlp
Profile Entry[] - 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. - description string
- Brief summary of the profile and its intended use.
- account_
id str - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- allowed_
match_ intcount - Related DLP policies will trigger when the match count exceeds the number set.
- entries
Sequence[Dlp
Profile Entry Args] - 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. - description str
- Brief summary of the profile and its intended use.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- allowed
Match NumberCount - 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. - description String
- Brief summary of the profile and its intended use.
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,
description: Optional[str] = None,
entries: Optional[Sequence[DlpProfileEntryArgs]] = None,
name: Optional[str] = None,
type: Optional[str] = None) -> DlpProfilefunc 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)resources: _: type: cloudflare:DlpProfile get: id: ${id}- 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.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Allowed
Match intCount - Related DLP policies will trigger when the match count exceeds the number set.
- Description string
- Brief summary of the profile and its intended use.
- Entries
List<Dlp
Profile Entry> - 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.
- Account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Allowed
Match intCount - Related DLP policies will trigger when the match count exceeds the number set.
- Description string
- Brief summary of the profile and its intended use.
- Entries
[]Dlp
Profile Entry Args - 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.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- allowed
Match IntegerCount - Related DLP policies will trigger when the match count exceeds the number set.
- description String
- Brief summary of the profile and its intended use.
- entries
List<Dlp
Profile Entry> - 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.
- account
Id string - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- allowed
Match numberCount - Related DLP policies will trigger when the match count exceeds the number set.
- description string
- Brief summary of the profile and its intended use.
- entries
Dlp
Profile Entry[] - 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.
- account_
id str - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- allowed_
match_ intcount - Related DLP policies will trigger when the match count exceeds the number set.
- description str
- Brief summary of the profile and its intended use.
- entries
Sequence[Dlp
Profile Entry Args] - 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.
- account
Id String - The account identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- allowed
Match NumberCount - Related DLP policies will trigger when the match count exceeds the number set.
- 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.
- type String
- The type of the profile. Available values:
custom,predefined. Modifying this attribute will force creation of a new resource.
Supporting Types
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
Dlp
Profile Entry Pattern
- Name string
- Name of the entry to deploy.
- Enabled bool
- Whether the entry is active. Defaults to
false. - Id string
- Unique entry identifier.
- Pattern
Dlp
Profile Entry Pattern
- name String
- Name of the entry to deploy.
- enabled Boolean
- Whether the entry is active. Defaults to
false. - id String
- Unique entry identifier.
- pattern
Dlp
Profile Entry Pattern
- name string
- Name of the entry to deploy.
- enabled boolean
- Whether the entry is active. Defaults to
false. - id string
- Unique entry identifier.
- pattern
Dlp
Profile Entry Pattern
- name str
- Name of the entry to deploy.
- enabled bool
- Whether the entry is active. Defaults to
false. - id str
- Unique entry identifier.
- pattern
Dlp
Profile Entry Pattern
- 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
- Validation string
- Regex string
- Validation string
- regex String
- validation String
- regex string
- validation string
- regex str
- validation str
- regex String
- validation String
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
cloudflareTerraform Provider.
published on Monday, Mar 9, 2026 by Pulumi
