cloudflare.DlpProfile
Explore with Pulumi AI
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,
context_awareness: Optional[DlpProfileContextAwarenessArgs] = 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.
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",
});
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"),
})
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")
.build());
dlp_profile_resource = cloudflare.DlpProfile("dlpProfileResource",
account_id="string",
allowed_match_count=0,
entries=[cloudflare.DlpProfileEntryArgs(
name="string",
enabled=False,
id="string",
pattern=cloudflare.DlpProfileEntryPatternArgs(
regex="string",
validation="string",
),
)],
name="string",
type="string",
context_awareness=cloudflare.DlpProfileContextAwarenessArgs(
enabled=False,
skip=cloudflare.DlpProfileContextAwarenessSkipArgs(
files=False,
),
),
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",
contextAwareness: {
enabled: false,
skip: {
files: false,
},
},
description: "string",
});
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
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
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 entry to deploy.
- Type string
- The type of the profile. Available values:
custom
,predefined
. Modifying this attribute will force creation of a new resource. - Context
Awareness DlpProfile Context Awareness - Scan the context of predefined entries to only return matches surrounded by keywords.
- 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 entry to deploy.
- Type string
- The type of the profile. Available values:
custom
,predefined
. Modifying this attribute will force creation of a new resource. - Context
Awareness DlpProfile Context Awareness Args - Scan the context of predefined entries to only return matches surrounded by keywords.
- 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 entry to deploy.
- type String
- The type of the profile. Available values:
custom
,predefined
. Modifying this attribute will force creation of a new resource. - context
Awareness DlpProfile Context Awareness - Scan the context of predefined entries to only return matches surrounded by keywords.
- 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 entry to deploy.
- type string
- The type of the profile. Available values:
custom
,predefined
. Modifying this attribute will force creation of a new resource. - context
Awareness DlpProfile Context Awareness - Scan the context of predefined entries to only return matches surrounded by keywords.
- 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 entry to deploy.
- type str
- The type of the profile. Available values:
custom
,predefined
. Modifying this attribute will force creation of a new resource. - context_
awareness DlpProfile Context Awareness Args - Scan the context of predefined entries to only return matches surrounded by keywords.
- 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 entry to deploy.
- type String
- The type of the profile. Available values:
custom
,predefined
. Modifying this attribute will force creation of a new resource. - context
Awareness 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.
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,
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.
- 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.
- Context
Awareness DlpProfile Context Awareness - 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<Dlp
Profile Entry> - List of entries to apply to the profile.
- Name string
- Name of the entry to deploy.
- 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.
- Context
Awareness DlpProfile Context Awareness Args - 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
[]Dlp
Profile Entry Args - List of entries to apply to the profile.
- Name string
- Name of the entry to deploy.
- 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.
- context
Awareness DlpProfile Context Awareness - 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<Dlp
Profile Entry> - List of entries to apply to the profile.
- name String
- Name of the entry to deploy.
- 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.
- context
Awareness DlpProfile Context Awareness - 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
Dlp
Profile Entry[] - List of entries to apply to the profile.
- name string
- Name of the entry to deploy.
- 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.
- context_
awareness DlpProfile Context Awareness Args - 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[Dlp
Profile Entry Args] - List of entries to apply to the profile.
- name str
- Name of the entry to deploy.
- 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.
- context
Awareness 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 entry to deploy.
- 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
Dlp
Profile Context Awareness Skip - 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
Dlp
Profile Context Awareness Skip - 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
Dlp
Profile Context Awareness Skip - 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
Dlp
Profile Context Awareness Skip - 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
Dlp
Profile Context Awareness Skip - 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
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
- 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.