Use the Cloudflare CLI (cf) to manage supported Data Loss Prevention (DLP) resources from the command line. Sign in with cf auth login before running account commands.
The command groups below are generated from the Cloudflare CLI version pinned in this repository. For available flags and examples, run a command with --help.
List and manage predefined and custom DLP profiles.
zero-trust dlp profiles custom create
Creates a DLP custom profile.
cf zero-trust dlp profiles custom create [options]--ai-context-enabledbooleandefault: falseThe ai_context_enabled field
--allowed-match-countnumberdefault: 0Related DLP policies will trigger when the match count exceeds the number set.
--confidence-thresholdstringdefault: lowThe confidence_threshold field
--context-awareness-enabledbooleanIf true, scan the context of predefined entries to only return matches surrounded by keywords.
--context-awareness-skip-filesbooleanIf the content type is a file, skip context analysis and return all matches.
--data-classesstringData class IDs to associate with the profile.
--data-tagsstringData tag IDs to associate with the profile.
--descriptionstringThe description of the profile.
--entriesstringThe entries field. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"enabled": boolean, "name": string, "pattern": {...}, "description"?: (string | null)} | {"enabled": boolean, "name": string, "words": [string]})]. ? marks optional keys.
--namestringrequiredThe name field
--ocr-enabledbooleandefault: falseThe ocr_enabled field
--sensitivity-levelsstringSensitivity levels to associate with the profile. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"group_id": string, "level_id": string}].
--shared-entriesstringEntries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). Provide as a JSON array of objects or @path/to/file.json. Shape: [{"enabled": boolean, "entry_id": string}].
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp profiles custom delete
Deletes a DLP custom profile.
cf zero-trust dlp profiles custom delete <profile-id><PROFILE-ID>stringrequiredProfile ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp profiles custom update
Updates a DLP custom profile.
cf zero-trust dlp profiles custom update <profile-id> [options]<PROFILE-ID>stringrequiredProfile ID
--ai-context-enabledbooleanThe ai_context_enabled field
--allowed-match-countnumberThe allowed_match_count field
--confidence-thresholdstringThe confidence_threshold field
--context-awareness-enabledbooleanIf true, scan the context of predefined entries to only return matches surrounded by keywords.
--context-awareness-skip-filesbooleanIf the content type is a file, skip context analysis and return all matches.
--data-classesstringData class IDs to associate with the profile. If omitted, existing associations are unchanged.
--data-tagsstringData tag IDs to associate with the profile. If omitted, existing associations are unchanged.
--descriptionstringThe description of the profile.
--entriesstringCustom entries from this profile. If this field is omitted, entries owned by this profile will not be changed. Provide as a JSON array of objects, null, or @path/to/file.json. Shape: [(({"enabled": boolean, "name": string, "pattern": {...}, "description"?: (string | null)} & {"entry_id": string}) | {"enabled": boolean, "name": string, "pattern": {...}, "description"?: (string | null)})]. ? marks optional keys.
--namestringrequiredThe name field
--ocr-enabledbooleanThe ocr_enabled field
--sensitivity-levelsstringSensitivity levels to associate with the profile. If omitted, existing associations are unchanged. Provide as a JSON array of objects, null, or @path/to/file.json. Shape: [{"group_id": string, "level_id": string}].
--shared-entriesstringOther entries, e.g. predefined or integration. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"enabled": boolean, "entry_id": string}].
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp profiles get
Fetches a DLP profile by ID.
cf zero-trust dlp profiles get <profile-id><PROFILE-ID>stringrequiredProfile ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp profiles list
Lists all DLP profiles in an account.
cf zero-trust dlp profiles list [options]--allbooleanReturn all profiles, including those that current account does not have access to.
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp profiles predefined update
Updates a DLP predefined profile. Only supports enabling/disabling entries.
cf zero-trust dlp profiles predefined update <profile-id> [options]<PROFILE-ID>stringrequiredProfile ID
--ai-context-enabledbooleanThe ai_context_enabled field
--allowed-match-countnumberThe allowed_match_count field
--confidence-thresholdstringThe confidence_threshold field
--context-awareness-enabledbooleanIf true, scan the context of predefined entries to only return matches surrounded by keywords.
--context-awareness-skip-filesbooleanIf the content type is a file, skip context analysis and return all matches.
--entriesstringThe entries field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"enabled": boolean, "id": string}].
--ocr-enabledbooleanThe ocr_enabled field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
Manage custom detection entries and validate regular-expression patterns. For supported regex syntax and length limits, refer to Pattern entries.
zero-trust dlp entries create
Creates a DLP custom entry.
cf zero-trust dlp entries create [options]--descriptionstringThe description field
--enabledbooleanrequiredThe enabled field
--namestringrequiredThe name field
--pattern-regexstringrequiredThe pattern.regex field
--pattern-validation"luhn"The pattern.validation field
--profile-idstringThe profile_id field
--validator-idsstringValidators the new entry should reference, by id, at most 10.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp entries delete
Deletes a DLP custom entry.
cf zero-trust dlp entries delete <entry-id><ENTRY-ID>stringrequiredEntry ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp entries get
Fetches a DLP entry by ID.
cf zero-trust dlp entries get <entry-id><ENTRY-ID>stringrequiredEntry ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp entries list
Lists all DLP entries in an account.
cf zero-trust dlp entries list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp entries update
Updates a DLP entry.
cf zero-trust dlp entries update <entry-id> [options]<ENTRY-ID>stringrequiredEntry ID
--enabledbooleanrequiredThe enabled field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp patterns validate
Validates whether this pattern is a valid regular expression. Rejects it if the regular expression is too complex or can match an unbounded-length string. The regex will be rejected if it uses * or +. Bound the maximum number of characters that can be matched using a range, e.g. {1,100}.
cf zero-trust dlp patterns validate [options]--max-match-bytesnumberMaximum number of bytes that the regular expression can match.
If this is
nullthen there is no limit on the length. Patterns can use*and+. Otherwise repeats should use a range{m,n}to restrict patterns to the length. If this field is missing, then a default length limit is used.Note that the length is specified in bytes. Since regular expressions use UTF-8 the pattern
.can match up to 4 bytes. Hence.{1,256}has a maximum length of 1024 bytes.--regexstringrequiredThe regex field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
Manage datasets and document fingerprints used by DLP detection entries. Check the relevant dataset preparation instructions before uploading sensitive data.
zero-trust dlp datasets create
Creates a new DLP (Data Loss Prevention) dataset for storing custom detection patterns. Datasets can contain exact match data, word lists, or EDM (Exact Data Match) configurations.
cf zero-trust dlp datasets create [options]--case-sensitivebooleanOnly applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if
secretis true or undefined--descriptionstringThe description of the dataset.
--encoding-versionnumberDataset encoding version
Non-secret custom word lists with no header are always version 1. Secret EDM lists with no header are version 1. Multicolumn CSV with headers are version 2. Omitting this field provides the default value 0, which is interpreted the same as 1.
--namestringrequiredThe name field
--secretbooleanGenerate a secret dataset.
If true, the response will include a secret to use with the EDM encoder. If false, the response has no secret and the dataset is uploaded in plaintext.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp datasets delete
This deletes all versions of the dataset.
cf zero-trust dlp datasets delete <dataset-id><DATASET-ID>stringrequiredDataset ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp datasets get
Gets a dataset and its latest upload status.
cf zero-trust dlp datasets get <dataset-id><DATASET-ID>stringrequiredDataset ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp datasets list
Lists all DLP datasets configured for the account, including custom word lists and EDM datasets.
cf zero-trust dlp datasets list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp datasets prepare-upload
Creates a new version of a DLP dataset, allowing you to stage changes before activation. Used for single-column EDM and custom word lists.
cf zero-trust dlp datasets prepare-upload <dataset-id><DATASET-ID>stringrequiredDataset ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp datasets update
Updates the configuration of an existing DLP dataset, such as its name, description, or detection settings.
cf zero-trust dlp datasets update <dataset-id> [options]<DATASET-ID>stringrequiredDataset ID
--case-sensitivebooleanDetermines if the words should be matched in a case-sensitive manner.
Only required for custom word lists.
--descriptionstringThe description of the dataset.
--namestringThe name of the dataset, must be unique.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp datasets upload
This is used for single-column EDMv1 and Custom Word Lists. The EDM format can only be created in the Cloudflare dashboard. For other clients, this operation can only be used for non-secret Custom Word Lists. The body must be a UTF-8 encoded, newline (NL or CRNL) separated list of words to be matched.
cf zero-trust dlp datasets upload <dataset-version> [options]<DATASET-VERSION>stringrequiredVersion
--dataset-idstringrequiredDataset ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
--filestringPath to a file to upload as the request body
zero-trust dlp document-fingerprints create
Creates a new document fingerprint for DLP scanning. Document fingerprints detect documents that are structurally similar to the uploaded sample.
cf zero-trust dlp document-fingerprints create [options]--descriptionstringdefault:The description field
--match-percentnumberrequiredThe match_percent field
--namestringrequiredThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp document-fingerprints delete
Removes a document fingerprint from DLP configuration. Documents matching this fingerprint will no longer be detected.
cf zero-trust dlp document-fingerprints delete <document-fingerprint-id><DOCUMENT-FINGERPRINT-ID>stringrequiredDocument fingerprint ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp document-fingerprints get
Gets a document fingerprint and its latest upload status.
cf zero-trust dlp document-fingerprints get <document-fingerprint-id><DOCUMENT-FINGERPRINT-ID>stringrequiredDocument fingerprint ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp document-fingerprints list
Lists all document fingerprints configured for DLP scanning in the account.
cf zero-trust dlp document-fingerprints list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp document-fingerprints update
Updates metadata for an existing document fingerprint, such as its name or description.
cf zero-trust dlp document-fingerprints update <document-fingerprint-id> [options]<DOCUMENT-FINGERPRINT-ID>stringrequiredDocument fingerprint ID
--descriptionstringThe description field
--match-percentnumberThe match_percent field
--namestringThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp document-fingerprints upload
Uploads a new document to create or update a fingerprint. The document structure is analyzed to enable detection of similar documents.
cf zero-trust dlp document-fingerprints upload <document-fingerprint-id><DOCUMENT-FINGERPRINT-ID>stringrequiredDocument fingerprint ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
--filestringPath to a file to upload as the request body
Manage data classes, data-tag categories and tags, sensitivity groups and levels, and the available templates.
zero-trust dlp data-classes create
Creates a data class for use in DLP profiles.
cf zero-trust dlp data-classes create [options]--data-tagsstringrequiredThe data_tags field
--descriptionstringThe description field
--expressionstringrequiredThe expression field
--namestringrequiredThe name field
--sensitivity-levelsstringrequiredThe sensitivity_levels field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"group_id": string, "level_id": string}].
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp data-classes delete
Deletes a data class from the account.
cf zero-trust dlp data-classes delete <data-class-id><DATA-CLASS-ID>stringrequiredData class ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp data-classes get
Gets the configuration for a data class.
cf zero-trust dlp data-classes get <data-class-id><DATA-CLASS-ID>stringrequiredData class ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp data-classes list
Lists data classes configured for the account.
cf zero-trust dlp data-classes list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp data-classes update
Updates the configuration for a data class.
cf zero-trust dlp data-classes update <data-class-id> [options]<DATA-CLASS-ID>stringrequiredData class ID
--data-tagsstringThe data_tags field
--descriptionstringThe description field
--expressionstringThe expression field
--namestringThe name field
--sensitivity-levelsstringThe sensitivity_levels field. Provide as a JSON array of objects, null, or @path/to/file.json. Shape: [{"group_id": string, "level_id": string}].
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp data-tag-categories create
Creates a data tag category, optionally from a template.
cf zero-trust dlp data-tag-categories create [options]--descriptionstringThe description field
--namestringrequiredThe name field
--tagsstringTags to create with the category. Mutually exclusive with
template_id. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "description"?: (string | null)}]. ? marks optional keys.--template-idstringThe template_id field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp data-tag-categories delete
Deletes a data tag category and its tags.
cf zero-trust dlp data-tag-categories delete <category-id><CATEGORY-ID>stringrequiredCategory ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp data-tag-categories get
Gets a data tag category and its tags.
cf zero-trust dlp data-tag-categories get <category-id><CATEGORY-ID>stringrequiredCategory ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp data-tag-categories list
Lists data tag categories configured for the account.
cf zero-trust dlp data-tag-categories list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp data-tag-categories update
Updates a data tag category and its tags.
cf zero-trust dlp data-tag-categories update <category-id> [options]<CATEGORY-ID>stringrequiredCategory ID
--descriptionstringThe description field
--namestringThe name field
--tagsstringThe desired final state of tags.
None(omitted): no tag changes.Some([]): delete all tags.Some([...]): desired final set + order. Provide as a JSON array of objects, null, or @path/to/file.json. Shape: [({"description"?: (string | null), "name"?: (string | null)} & {"id"?: (string | null)})]. ? marks optional keys.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp data-tags create
Creates a data tag in a category.
cf zero-trust dlp data-tags create <category-id> [options]<CATEGORY-ID>stringrequiredCategory ID
--descriptionstringThe description field
--namestringrequiredThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp data-tags delete
Deletes a data tag from a category.
cf zero-trust dlp data-tags delete <tag-id> [options]<TAG-ID>stringrequiredTag ID
--category-idstringrequiredCategory ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp data-tags get
Gets a data tag from a category.
cf zero-trust dlp data-tags get <tag-id> [options]<TAG-ID>stringrequiredTag ID
--category-idstringrequiredCategory ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp data-tags list
Lists data tags in a category.
cf zero-trust dlp data-tags list [options]--category-idstringrequiredCategory ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp data-tags update
Updates a data tag in a category.
cf zero-trust dlp data-tags update <tag-id> [options]<TAG-ID>stringrequiredTag ID
--category-idstringrequiredCategory ID
--descriptionstringThe description field
--namestringThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp sensitivity-groups create
Creates a sensitivity group, optionally from a template.
cf zero-trust dlp sensitivity-groups create [options]--descriptionstringThe description field
--levelsstringLevels to create with the group. Mutually exclusive with
template_id. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "description"?: (string | null)}]. ? marks optional keys.--namestringrequiredThe name field
--template-idstringThe template_id field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp sensitivity-groups delete
Deletes a sensitivity group and its levels.
cf zero-trust dlp sensitivity-groups delete <sensitivity-group-id><SENSITIVITY-GROUP-ID>stringrequiredSensitivity group ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp sensitivity-groups get
Gets a sensitivity group and its levels.
cf zero-trust dlp sensitivity-groups get <sensitivity-group-id><SENSITIVITY-GROUP-ID>stringrequiredSensitivity group ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp sensitivity-groups get-level-order
Gets the current order of sensitivity levels in a group.
cf zero-trust dlp sensitivity-groups get-level-order <sensitivity-group-id><SENSITIVITY-GROUP-ID>stringrequiredSensitivity group ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp sensitivity-groups list
Lists sensitivity groups configured for the account.
cf zero-trust dlp sensitivity-groups list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp sensitivity-groups update
Updates a sensitivity group and its levels.
cf zero-trust dlp sensitivity-groups update <sensitivity-group-id> [options]<SENSITIVITY-GROUP-ID>stringrequiredSensitivity group ID
--descriptionstringThe description field
--levelsstringThe desired final state of levels.
None(omitted): no level changes.Some([]): delete all levels.Some([...]): desired final set + order. Provide as a JSON array of objects, null, or @path/to/file.json. Shape: [({"description"?: (string | null), "name"?: (string | null)} & {"id"?: (string | null)})]. ? marks optional keys.
--namestringThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp sensitivity-groups update-level-order
Updates the order of sensitivity levels in a group.
cf zero-trust dlp sensitivity-groups update-level-order <sensitivity-group-id> [options]<SENSITIVITY-GROUP-ID>stringrequiredSensitivity group ID
--level-idsstringrequiredThe level_ids field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp sensitivity-levels create
Creates a sensitivity level in a group.
cf zero-trust dlp sensitivity-levels create <sensitivity-group-id> [options]<SENSITIVITY-GROUP-ID>stringrequiredSensitivity group ID
--descriptionstringThe description field
--namestringrequiredThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp sensitivity-levels delete
Deletes a sensitivity level from a group.
cf zero-trust dlp sensitivity-levels delete <sensitivity-level-id> [options]<SENSITIVITY-LEVEL-ID>stringrequiredSensitivity level ID
--sensitivity-group-idstringrequiredSensitivity group ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp sensitivity-levels get
Gets a sensitivity level from a group.
cf zero-trust dlp sensitivity-levels get <sensitivity-level-id> [options]<SENSITIVITY-LEVEL-ID>stringrequiredSensitivity level ID
--sensitivity-group-idstringrequiredSensitivity group ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp sensitivity-levels list
Lists sensitivity levels in a sensitivity group.
cf zero-trust dlp sensitivity-levels list [options]--sensitivity-group-idstringrequiredSensitivity group ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp sensitivity-levels update
Updates a sensitivity level in a group.
cf zero-trust dlp sensitivity-levels update <sensitivity-level-id> [options]<SENSITIVITY-LEVEL-ID>stringrequiredSensitivity level ID
--sensitivity-group-idstringrequiredSensitivity group ID
--descriptionstringThe description field
--namestringThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp sensitivity-group-templates get
Gets an available sensitivity group template.
cf zero-trust dlp sensitivity-group-templates get <template-id><TEMPLATE-ID>stringrequiredTemplate ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp sensitivity-group-templates list
Lists available sensitivity group templates.
cf zero-trust dlp sensitivity-group-templates list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp data-tag-category-templates get
Gets an available data tag category template.
cf zero-trust dlp data-tag-category-templates get <template-id><TEMPLATE-ID>stringrequiredTemplate ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp data-tag-category-templates list
Lists available data tag category templates.
cf zero-trust dlp data-tag-category-templates list--dry-runbooleandefault: falseValidate and show what would happen without executing
Manage custom prompt topics for DLP content detection.
zero-trust dlp custom-prompt-topics create
Creates a DLP custom prompt topic entry.
cf zero-trust dlp custom-prompt-topics create [options]--descriptionstringThe description field
--enabledbooleanrequiredThe enabled field
--namestringrequiredThe name field
--profile-idstringThe profile_id field
--topicstringrequiredThe topic field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp custom-prompt-topics delete
Deletes a DLP custom prompt topic entry.
cf zero-trust dlp custom-prompt-topics delete <entry-id><ENTRY-ID>stringrequiredEntry ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp custom-prompt-topics get
Fetches a DLP custom prompt topic entry by ID.
cf zero-trust dlp custom-prompt-topics get <entry-id><ENTRY-ID>stringrequiredEntry ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp custom-prompt-topics list
Lists all DLP custom prompt topic entries in an account.
cf zero-trust dlp custom-prompt-topics list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp custom-prompt-topics update
Updates a DLP custom prompt topic entry.
cf zero-trust dlp custom-prompt-topics update <entry-id> [options]<ENTRY-ID>stringrequiredEntry ID
--descriptionstringThe description field
--enabledbooleanrequiredThe enabled field
--namestringrequiredThe name field
--topicstringrequiredThe topic field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
Review account-level settings, content validators, and DLP resource limits.
zero-trust dlp settings delete
Deletes account-level DLP settings and returns the initial values.
cf zero-trust dlp settings delete--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp settings edit
Missing fields keep their existing values.
cf zero-trust dlp settings edit [options]--ai-context-analysisbooleanWhether AI context analysis is enabled at the account level.
--ocrbooleanWhether OCR is enabled at the account level.
--payload-logging-masking-level"full" | "partial" | "clear" | "default"Masking level for payload logs.
full: The entire payload is masked.partial: Only partial payload content is masked.clear: No masking is applied to the payload content.default: DLP uses its default masking behavior.
--payload-logging-public-keystringBase64-encoded public key for encrypting payload logs.
- Set to a non-empty base64 string to enable payload logging with the given key.
- Set to an empty string to disable payload logging.
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp settings get
Gets the account-level DLP settings.
cf zero-trust dlp settings get--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp settings update
Missing fields are reset to initial (unconfigured) values.
cf zero-trust dlp settings update [options]--ai-context-analysisbooleanWhether AI context analysis is enabled at the account level.
--ocrbooleanWhether OCR is enabled at the account level.
--payload-logging-masking-level"full" | "partial" | "clear" | "default"Masking level for payload logs.
full: The entire payload is masked.partial: Only partial payload content is masked.clear: No masking is applied to the payload content.default: DLP uses its default masking behavior.
--payload-logging-public-keystringBase64-encoded public key for encrypting payload logs.
- Set to a non-empty base64 string to enable payload logging with the given key.
- Set to an empty string to disable payload logging.
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp validators get
Fetches a validator of any kind by ID.
cf zero-trust dlp validators get <validator-id><VALIDATOR-ID>stringrequiredValidator ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp validators list
Lists the validators configured for the account, of every kind.
cf zero-trust dlp validators list [options]--kind"proximity_words" | "worker"Only return validators of this kind. Omit to return every kind.
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp validators proximity-words create
Creates a reusable list of weighted words that detection entries can attach to in order to refine their matches. An account may own at most 100 validators across all kinds.
cf zero-trust dlp validators proximity-words create [options]--namestringrequiredA name for this validator, at most 50 characters.
--wordsstringrequiredThe words that raise confidence when found near a match, at most 100 per validator. Matching ignores case, so the list may not contain the same word twice with different capitalisation. Words are stored as sent.
For example, a validator for medical record numbers might use
[{"word": "patient", "weight": "strong"}, {"word": "diagnosis", "weight": "moderate"}, {"word": "mrn", "weight": "weak"}]. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"weight": "strong" | "moderate" | "weak", "word": string}].--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp validators proximity-words delete
Deletes a proximity_words validator. Fails with 409 while any detection entry is still attached to it; detach it from those entries first.
cf zero-trust dlp validators proximity-words delete <validator-id><VALIDATOR-ID>stringrequiredValidator ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp validators proximity-words get
Fetches a proximity_words validator by ID.
cf zero-trust dlp validators proximity-words get <validator-id><VALIDATOR-ID>stringrequiredValidator ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp validators proximity-words list
Lists the proximity_words validators configured for the account.
cf zero-trust dlp validators proximity-words list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp validators proximity-words update
Replaces the name and word list of a proximity_words validator. Attachments to detection entries are owned from the entry side and are not affected.
cf zero-trust dlp validators proximity-words update <validator-id> [options]<VALIDATOR-ID>stringrequiredValidator ID
--namestringrequiredA name for this validator, at most 50 characters.
--wordsstringrequiredThe words that raise confidence when found near a match, at most 100 per validator. Matching ignores case, so the list may not contain the same word twice with different capitalisation. Words are stored as sent.
For example, a validator for medical record numbers might use
[{"word": "patient", "weight": "strong"}, {"word": "diagnosis", "weight": "moderate"}, {"word": "mrn", "weight": "weak"}]. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"weight": "strong" | "moderate" | "weak", "word": string}].--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp validators worker create
Registers a customer Worker as a validator. An account may own at most 100 validators across all kinds.
cf zero-trust dlp validators worker create [options]--defaultstringThe default field. Accepts a JSON scalar or plain string, or @path/to/file.
--namestringrequiredA name for this validator, at most 50 characters.
--script-tagstringrequiredThe public script tag of the customer's Worker that scores matches.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp validators worker delete
Deletes a worker validator. Fails with 409 while any detection entry is still attached to it; detach it from those entries first.
cf zero-trust dlp validators worker delete <validator-id><VALIDATOR-ID>stringrequiredValidator ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp validators worker get
Fetches a worker validator by ID.
cf zero-trust dlp validators worker get <validator-id><VALIDATOR-ID>stringrequiredValidator ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp validators worker list
Lists the worker validators configured for the account.
cf zero-trust dlp validators worker list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp validators worker status get
Reports whether the validator's Worker can be used. Returns worker_not_found if the Worker cannot be found, and worker_error if the Worker does not have a valid validation entrypoint or is returning incorrect responses.
cf zero-trust dlp validators worker status get <validator-id><VALIDATOR-ID>stringrequiredValidator ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp validators worker update
Replaces the name, script tag and fallback verdict of a worker validator. Attachments to detection entries are owned from the entry side and are not affected.
cf zero-trust dlp validators worker update <validator-id> [options]<VALIDATOR-ID>stringrequiredValidator ID
--defaultstringThe default field. Accepts a JSON scalar or plain string, or @path/to/file.
--namestringrequiredA name for this validator, at most 50 characters.
--script-tagstringrequiredThe public script tag of the customer's Worker that scores matches.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp limits list
Retrieves current DLP usage limits and quotas for the account, including maximum allowed counts and current usage for custom entries, dataset cells, and document fingerprints.
cf zero-trust dlp limits list--dry-runbooleandefault: falseValidate and show what would happen without executing
The Cloudflare CLI exposes Zero Trust Gateway rule management. Use the Gateway rules command group to create and manage Gateway policies; verify the DLP Profile selector expression and rule behavior in a test account before applying rules to production traffic.
zero-trust gateway rules create
Create a new Zero Trust Gateway rule.
cf zero-trust gateway rules create [options]--action"on" | "off" | "allow" | "block" | "scan" | "noscan" | "safesearch" | "ytrestricted" | "isolate" | "noisolate" | "override" | "l4_override" | "egress" | "resolve" | "quarantine" | "redirect" | "forward"requiredSpecify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to
true.--descriptionstringdefault:Specify the rule description.
--device-posturestringdefault:Specify the wirefilter expression used for device posture check. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
--enabledbooleandefault: falseSpecify whether the rule is enabled.
--expiration-durationnumberDefines the default duration a policy active in minutes. Must set in order to use the
reset_expirationendpoint on this rule.--expiration-expires-atstringThe expiration.expires_at field
--filtersstringSpecify the protocol or layer to evaluate the traffic, identity, and device posture expressions. Can only contain a single value.
--identitystringdefault:Specify the wirefilter expression used for identity matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
--namestringrequiredSpecify the rule name.
--precedencenumberSet the order of your rules. Lower values indicate higher precedence. At each processing phase, evaluate applicable rules in ascending order of this value. Refer to Order of enforcement to manage precedence via Terraform.
--rule-settings-add-headersstringAdd custom headers to allowed requests as key-value pairs. Use header names as keys that map to arrays of header values. Header values may contain
@{selector.name}variable references that are interpolated at the edge. Use@@{to escape a literal@{. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only forhttprules with the action set toallow. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.--rule-settings-allow-child-bypassbooleanSet to enable MSP children to bypass this rule. Only parent MSP accounts can set this. this rule. Settable for all types of rules.
--rule-settings-biso-admin-controls-copy"enabled" | "disabled" | "remote_only"Configure copy behavior. If set to remote_only, users cannot copy isolated content from the remote browser to the local clipboard. If this field is absent, copying remains enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-dcpbooleanSet to false to enable copy-pasting. Only applies when
version == "v1".--rule-settings-biso-admin-controls-ddbooleanSet to false to enable downloading. Only applies when
version == "v1".--rule-settings-biso-admin-controls-dkbooleanSet to false to enable keyboard usage. Only applies when
version == "v1".--rule-settings-biso-admin-controls-download"enabled" | "disabled" | "remote_only"Configure download behavior. When set to remote_only, users can view downloads but cannot save them. If this field is absent, downloading remains enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-dpbooleanSet to false to enable printing. Only applies when
version == "v1".--rule-settings-biso-admin-controls-dubooleanSet to false to enable uploading. Only applies when
version == "v1".--rule-settings-biso-admin-controls-keyboard"enabled" | "disabled" | "enable_read_only_actions"Configure keyboard usage behavior. When set to enable_read_only_actions, only approved browser commands (find, copy, print, zoom, and select-all) may execute; other keyboard input is blocked from reaching the page. Copy and print remain subject to their independent controls. If this field is absent, keyboard usage remains enabled. Applies only when version == "v2". The enable_read_only_actions value requires an explicit version of "v2".
--rule-settings-biso-admin-controls-paste"enabled" | "disabled" | "remote_only"Configure paste behavior. If set to remote_only, users cannot paste content from the local clipboard into isolated pages. If this field is absent, pasting remains enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-printing"enabled" | "disabled"Configure print behavior. Default, Printing is enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-upload"enabled" | "disabled"Configure upload behavior. If this field is absent, uploading remains enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-version"v1" | "v2"Indicate which version of the browser isolation controls should apply.
--rule-settings-biso-admin-controls-wm-idstringSpecify the watermark ID (UUID) to apply to the isolated browser session. When present, enables watermark rendering in the isolated browser.
--rule-settings-block-page-include-contextbooleanSpecify whether to pass the context information as query parameters.
--rule-settings-block-page-target-uristringSpecify the URI to which the user is redirected.
--rule-settings-block-page-enabledbooleanEnable the custom block page. Settable only for
dnsrules with actionblock.--rule-settings-block-reasonstringExplain why the rule blocks the request. The custom block page shows this text (if enabled). Settable only for
dns,l4, andhttprules when the action set toblock.--rule-settings-bypass-parent-rulebooleanSet to enable MSP accounts to bypass their parent's rules. Only MSP child accounts can set this. Settable for all types of rules.
--rule-settings-check-session-durationstringSets the required session freshness threshold. The API returns a normalized version of this value.
--rule-settings-check-session-enforcebooleanEnable session enforcement.
--rule-settings-delete-headersstringRemove headers from allowed requests by name. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes. Settable only for
httprules with the action set toallow.--rule-settings-dns-resolvers-ipv4stringThe rule_settings.dns_resolvers.ipv4 field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"ip": string, "port"?: number, "route_through_private_network"?: boolean, "vnet_id"?: string}]. ? marks optional keys.
--rule-settings-dns-resolvers-ipv6stringThe rule_settings.dns_resolvers.ipv6 field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"ip": string, "port"?: number, "route_through_private_network"?: boolean, "vnet_id"?: string}]. ? marks optional keys.
--rule-settings-egress-ipv4stringSpecify the IPv4 address to use for egress.
--rule-settings-egress-ipv4-fallbackstringSpecify the fallback IPv4 address to use for egress when the primary IPv4 fails. Set '0.0.0.0' to indicate local egress via WARP IPs.
--rule-settings-egress-ipv6stringSpecify the IPv6 range to use for egress.
--rule-settings-forensic-copy-enabledbooleanEnable sending the copy to storage.
--rule-settings-forward-worker-idstringSpecify the public Worker ID of the target Worker.
--rule-settings-ignore-cname-category-matchesbooleanIgnore category matches at CNAME domains in a response. When off, evaluate categories in this rule against all CNAME domain categories in the response. Settable only for
dnsanddns_resolverrules.--rule-settings-insecure-disable-dnssec-validationbooleanSpecify whether to disable DNSSEC validation (for Allow actions) [INSECURE]. Settable only for
dnsrules.--rule-settings-ip-categoriesbooleanEnable IPs in DNS resolver category blocks. The system blocks only domain name categories unless you enable this setting. Settable only for
dnsanddns_resolverrules.--rule-settings-ip-indicator-feedsbooleanIndicates whether to include IPs in DNS resolver indicator feed blocks. Default, indicator feeds block only domain names. Settable only for
dnsanddns_resolverrules.--rule-settings-l4override-ipstringDefines the IPv4 or IPv6 address.
--rule-settings-l4override-portnumberDefines a port number to use for TCP/UDP overrides.
--rule-settings-notification-settings-enabledbooleanEnable notification.
--rule-settings-notification-settings-include-contextbooleanIndicates whether to pass the context information as query parameters.
--rule-settings-notification-settings-msgstringCustomize the message shown in the notification.
--rule-settings-notification-settings-support-urlstringDefines an optional URL to direct users to additional information. If unset, the notification opens a block page.
--rule-settings-override-hoststringDefines a hostname for override, for the matching DNS queries. Settable only for
dnsrules with the action set tooverride.--rule-settings-override-ipsstringDefines a an IP or set of IPs for overriding matched DNS queries. Settable only for
dnsrules with the action set tooverride.--rule-settings-payload-log-enabledbooleanEnable DLP payload logging for this rule.
--rule-settings-quarantine-file-typesstringSpecify the types of files to sandbox.
--rule-settings-redirect-include-contextbooleanSpecify whether to pass the context information as query parameters.
--rule-settings-redirect-preserve-path-and-querybooleanSpecify whether to append the path and query parameters from the original request to target_uri.
--rule-settings-redirect-target-uristringSpecify the URI to which the user is redirected.
--rule-settings-resolve-dns-internally-fallback"none" | "public_dns"Specify the fallback behavior to apply when the internal DNS response code differs from 'NOERROR' or when the response data contains only CNAME records for 'A' or 'AAAA' queries.
--rule-settings-resolve-dns-internally-view-idstringSpecify the internal DNS view identifier to pass to the internal DNS service.
--rule-settings-resolve-dns-through-cloudflarebooleanEnable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot set when 'dns_resolvers' specified or 'resolve_dns_internally' is set. Only valid when a rule's action set to 'resolve'. Settable only for
dns_resolverrules.--rule-settings-set-headersstringReplace existing headers on allowed requests with the specified key-value pairs. If a header does not exist, it is added. Header values may contain
@{selector.name}variable references that are interpolated at the edge. Use@@{to escape a literal@{. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only forhttprules with the action set toallow. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.--rule-settings-untrusted-cert-action"pass_through" | "block" | "error"Defines the action performed when an untrusted certificate seen. The default action an error with HTTP code 526.
--schedule-fristringSpecify the time intervals when the rule is active on Fridays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Fridays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-monstringSpecify the time intervals when the rule is active on Mondays, in the increasing order from 00:00-24:00(capped at maximum of 6 time splits). If this parameter omitted, the rule is deactivated on Mondays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-satstringSpecify the time intervals when the rule is active on Saturdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Saturdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-sunstringSpecify the time intervals when the rule is active on Sundays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Sundays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-thustringSpecify the time intervals when the rule is active on Thursdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Thursdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-time-zonestringSpecify the time zone for rule evaluation. When a valid time zone city name is provided, Gateway always uses the current time for that time zone. When this parameter is omitted, Gateway uses the time zone determined from the user's IP address. Colo time zone is used when the user's IP address does not resolve to a location.
--schedule-tuestringSpecify the time intervals when the rule is active on Tuesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Tuesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-wedstringSpecify the time intervals when the rule is active on Wednesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Wednesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--trafficstringdefault:Specify the wirefilter expression used for traffic matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust gateway rules delete
Delete a Zero Trust Gateway rule.
cf zero-trust gateway rules delete <rule-id><RULE-ID>stringrequiredIdentify the API resource with a UUID.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust gateway rules get
Get a single Zero Trust Gateway rule.
cf zero-trust gateway rules get <rule-id><RULE-ID>stringrequiredIdentify the API resource with a UUID.
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust gateway rules list
List Zero Trust Gateway rules for an account.
cf zero-trust gateway rules list [options]--filterstringFilter the returned rules by one or more
field:valuepairs. Repeat the parameter to combine filters with logical AND.Supported fields are
name,id,action,enabled,source_account,is_shared,filters, andexpression(max 1024 bytes). Thesource_accountvalue is matched as a normalized UUID substring. Thefiltersvalue must be one of the rule filter names and matches a member of the rule'sfiltersarray. Theexpressionfilter performs a case-insensitive literal substring match across traffic, identity, and device posture expressions.--searchstringCase-insensitive substring search across rule name and description.
--order-by"name" | "created_at" | "updated_at" | "precedence"Field to sort the returned rules by. Supported values are
name,created_at,updated_at, andprecedence.--direction"asc" | "desc"Sort direction. When
order_byis omitted, this controls the direction of the existing precedence ordering. Shared rules remain first in either direction. Accepted values areascanddesc.--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust gateway rules list-tenant
List Zero Trust Gateway rules for the parent account of an account in the MSP configuration.
cf zero-trust gateway rules list-tenant--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust gateway rules reset-expiration
Resets the expiration of a Zero Trust Gateway Rule if its duration elapsed and it has a default duration. The Zero Trust Gateway Rule must have values for both expiration.expires_at and expiration.duration.
cf zero-trust gateway rules reset-expiration <rule-id><RULE-ID>stringrequiredIdentify the API resource with a UUID.
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust gateway rules update
Update a configured Zero Trust Gateway rule.
cf zero-trust gateway rules update <rule-id> [options]<RULE-ID>stringrequiredIdentify the API resource with a UUID.
--action"on" | "off" | "allow" | "block" | "scan" | "noscan" | "safesearch" | "ytrestricted" | "isolate" | "noisolate" | "override" | "l4_override" | "egress" | "resolve" | "quarantine" | "redirect" | "forward"requiredSpecify the action to perform when the associated traffic, identity, and device posture expressions either absent or evaluate to
true.--descriptionstringSpecify the rule description.
--device-posturestringSpecify the wirefilter expression used for device posture check. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
--enabledbooleanSpecify whether the rule is enabled.
--expiration-durationnumberDefines the default duration a policy active in minutes. Must set in order to use the
reset_expirationendpoint on this rule.--expiration-expires-atstringThe expiration.expires_at field
--filtersstringSpecify the protocol or layer to evaluate the traffic, identity, and device posture expressions. Can only contain a single value.
--identitystringSpecify the wirefilter expression used for identity matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
--namestringrequiredSpecify the rule name.
--precedencenumberSet the order of your rules. Lower values indicate higher precedence. At each processing phase, evaluate applicable rules in ascending order of this value. Refer to Order of enforcement to manage precedence via Terraform.
--rule-settings-add-headersstringAdd custom headers to allowed requests as key-value pairs. Use header names as keys that map to arrays of header values. Header values may contain
@{selector.name}variable references that are interpolated at the edge. Use@@{to escape a literal@{. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only forhttprules with the action set toallow. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.--rule-settings-allow-child-bypassbooleanSet to enable MSP children to bypass this rule. Only parent MSP accounts can set this. this rule. Settable for all types of rules.
--rule-settings-biso-admin-controls-copy"enabled" | "disabled" | "remote_only"Configure copy behavior. If set to remote_only, users cannot copy isolated content from the remote browser to the local clipboard. If this field is absent, copying remains enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-dcpbooleanSet to false to enable copy-pasting. Only applies when
version == "v1".--rule-settings-biso-admin-controls-ddbooleanSet to false to enable downloading. Only applies when
version == "v1".--rule-settings-biso-admin-controls-dkbooleanSet to false to enable keyboard usage. Only applies when
version == "v1".--rule-settings-biso-admin-controls-download"enabled" | "disabled" | "remote_only"Configure download behavior. When set to remote_only, users can view downloads but cannot save them. If this field is absent, downloading remains enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-dpbooleanSet to false to enable printing. Only applies when
version == "v1".--rule-settings-biso-admin-controls-dubooleanSet to false to enable uploading. Only applies when
version == "v1".--rule-settings-biso-admin-controls-keyboard"enabled" | "disabled" | "enable_read_only_actions"Configure keyboard usage behavior. When set to enable_read_only_actions, only approved browser commands (find, copy, print, zoom, and select-all) may execute; other keyboard input is blocked from reaching the page. Copy and print remain subject to their independent controls. If this field is absent, keyboard usage remains enabled. Applies only when version == "v2". The enable_read_only_actions value requires an explicit version of "v2".
--rule-settings-biso-admin-controls-paste"enabled" | "disabled" | "remote_only"Configure paste behavior. If set to remote_only, users cannot paste content from the local clipboard into isolated pages. If this field is absent, pasting remains enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-printing"enabled" | "disabled"Configure print behavior. Default, Printing is enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-upload"enabled" | "disabled"Configure upload behavior. If this field is absent, uploading remains enabled. Applies only when version == "v2".
--rule-settings-biso-admin-controls-version"v1" | "v2"Indicate which version of the browser isolation controls should apply.
--rule-settings-biso-admin-controls-wm-idstringSpecify the watermark ID (UUID) to apply to the isolated browser session. When present, enables watermark rendering in the isolated browser.
--rule-settings-block-page-include-contextbooleanSpecify whether to pass the context information as query parameters.
--rule-settings-block-page-target-uristringSpecify the URI to which the user is redirected.
--rule-settings-block-page-enabledbooleanEnable the custom block page. Settable only for
dnsrules with actionblock.--rule-settings-block-reasonstringExplain why the rule blocks the request. The custom block page shows this text (if enabled). Settable only for
dns,l4, andhttprules when the action set toblock.--rule-settings-bypass-parent-rulebooleanSet to enable MSP accounts to bypass their parent's rules. Only MSP child accounts can set this. Settable for all types of rules.
--rule-settings-check-session-durationstringSets the required session freshness threshold. The API returns a normalized version of this value.
--rule-settings-check-session-enforcebooleanEnable session enforcement.
--rule-settings-delete-headersstringRemove headers from allowed requests by name. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes. Settable only for
httprules with the action set toallow.--rule-settings-dns-resolvers-ipv4stringThe rule_settings.dns_resolvers.ipv4 field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"ip": string, "port"?: number, "route_through_private_network"?: boolean, "vnet_id"?: string}]. ? marks optional keys.
--rule-settings-dns-resolvers-ipv6stringThe rule_settings.dns_resolvers.ipv6 field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"ip": string, "port"?: number, "route_through_private_network"?: boolean, "vnet_id"?: string}]. ? marks optional keys.
--rule-settings-egress-ipv4stringSpecify the IPv4 address to use for egress.
--rule-settings-egress-ipv4-fallbackstringSpecify the fallback IPv4 address to use for egress when the primary IPv4 fails. Set '0.0.0.0' to indicate local egress via WARP IPs.
--rule-settings-egress-ipv6stringSpecify the IPv6 range to use for egress.
--rule-settings-forensic-copy-enabledbooleanEnable sending the copy to storage.
--rule-settings-forward-worker-idstringSpecify the public Worker ID of the target Worker.
--rule-settings-ignore-cname-category-matchesbooleanIgnore category matches at CNAME domains in a response. When off, evaluate categories in this rule against all CNAME domain categories in the response. Settable only for
dnsanddns_resolverrules.--rule-settings-insecure-disable-dnssec-validationbooleanSpecify whether to disable DNSSEC validation (for Allow actions) [INSECURE]. Settable only for
dnsrules.--rule-settings-ip-categoriesbooleanEnable IPs in DNS resolver category blocks. The system blocks only domain name categories unless you enable this setting. Settable only for
dnsanddns_resolverrules.--rule-settings-ip-indicator-feedsbooleanIndicates whether to include IPs in DNS resolver indicator feed blocks. Default, indicator feeds block only domain names. Settable only for
dnsanddns_resolverrules.--rule-settings-l4override-ipstringDefines the IPv4 or IPv6 address.
--rule-settings-l4override-portnumberDefines a port number to use for TCP/UDP overrides.
--rule-settings-notification-settings-enabledbooleanEnable notification.
--rule-settings-notification-settings-include-contextbooleanIndicates whether to pass the context information as query parameters.
--rule-settings-notification-settings-msgstringCustomize the message shown in the notification.
--rule-settings-notification-settings-support-urlstringDefines an optional URL to direct users to additional information. If unset, the notification opens a block page.
--rule-settings-override-hoststringDefines a hostname for override, for the matching DNS queries. Settable only for
dnsrules with the action set tooverride.--rule-settings-override-ipsstringDefines a an IP or set of IPs for overriding matched DNS queries. Settable only for
dnsrules with the action set tooverride.--rule-settings-payload-log-enabledbooleanEnable DLP payload logging for this rule.
--rule-settings-quarantine-file-typesstringSpecify the types of files to sandbox.
--rule-settings-redirect-include-contextbooleanSpecify whether to pass the context information as query parameters.
--rule-settings-redirect-preserve-path-and-querybooleanSpecify whether to append the path and query parameters from the original request to target_uri.
--rule-settings-redirect-target-uristringSpecify the URI to which the user is redirected.
--rule-settings-resolve-dns-internally-fallback"none" | "public_dns"Specify the fallback behavior to apply when the internal DNS response code differs from 'NOERROR' or when the response data contains only CNAME records for 'A' or 'AAAA' queries.
--rule-settings-resolve-dns-internally-view-idstringSpecify the internal DNS view identifier to pass to the internal DNS service.
--rule-settings-resolve-dns-through-cloudflarebooleanEnable to send queries that match the policy to Cloudflare's default 1.1.1.1 DNS resolver. Cannot set when 'dns_resolvers' specified or 'resolve_dns_internally' is set. Only valid when a rule's action set to 'resolve'. Settable only for
dns_resolverrules.--rule-settings-set-headersstringReplace existing headers on allowed requests with the specified key-value pairs. If a header does not exist, it is added. Header values may contain
@{selector.name}variable references that are interpolated at the edge. Use@@{to escape a literal@{. A maximum of 20 header operations (add + set + delete) is allowed per policy. Each header name may not exceed 256 bytes and each header value may not exceed 4 KB. Settable only forhttprules with the action set toallow. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": [string]}.--rule-settings-untrusted-cert-action"pass_through" | "block" | "error"Defines the action performed when an untrusted certificate seen. The default action an error with HTTP code 526.
--schedule-fristringSpecify the time intervals when the rule is active on Fridays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Fridays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-monstringSpecify the time intervals when the rule is active on Mondays, in the increasing order from 00:00-24:00(capped at maximum of 6 time splits). If this parameter omitted, the rule is deactivated on Mondays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-satstringSpecify the time intervals when the rule is active on Saturdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Saturdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-sunstringSpecify the time intervals when the rule is active on Sundays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Sundays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-thustringSpecify the time intervals when the rule is active on Thursdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Thursdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-time-zonestringSpecify the time zone for rule evaluation. When a valid time zone city name is provided, Gateway always uses the current time for that time zone. When this parameter is omitted, Gateway uses the time zone determined from the user's IP address. Colo time zone is used when the user's IP address does not resolve to a location.
--schedule-tuestringSpecify the time intervals when the rule is active on Tuesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Tuesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--schedule-wedstringSpecify the time intervals when the rule is active on Wednesdays, in the increasing order from 00:00-24:00. If this parameter omitted, the rule is deactivated on Wednesdays. API returns a formatted version of this string, which may cause Terraform drift if a unformatted value is used.
--trafficstringSpecify the wirefilter expression used for traffic matching. The API automatically formats and sanitizes expressions before storing them. To prevent Terraform state drift, use the formatted expression returned in the API response.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp email account-mapping create
Creates a mapping between a Cloudflare account and an email provider for DLP email scanning integration.
cf zero-trust dlp email account-mapping create [options]--auth-requirements-allowed-microsoft-organizationsstringThe auth_requirements.allowed_microsoft_organizations field
--auth-requirements-type"Org" | "NoAuth"requiredThe auth_requirements.type field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp email account-mapping get
Retrieves the email provider mapping configuration for DLP email scanning.
cf zero-trust dlp email account-mapping get--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp email rules bulk-edit
Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first.
cf zero-trust dlp email rules bulk-edit [options]--new-prioritiesstringrequiredThe new_priorities field. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": number}.
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp email rules create
Creates a new DLP email scanning rule that defines what content patterns to detect in email messages and what actions to take.
cf zero-trust dlp email rules create [options]--action-action"Block"requiredThe action.action field
--action-messagestringThe action.message field
--conditionsstringrequiredTriggered if all conditions match. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"operator": "InList" | "NotInList" | "MatchRegex" | ...more, "selector": "Recipients" | "Sender" | "DLPProfiles", "value": ([string] | string)}].
--descriptionstringThe description field
--enabledbooleanrequiredThe enabled field
--namestringrequiredThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)
zero-trust dlp email rules delete
Removes a DLP email scanning rule. The rule will no longer be applied to email messages.
cf zero-trust dlp email rules delete <rule-id><RULE-ID>stringrequiredRule ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
--forcebooleandefault: falseSkip confirmation (useful in scripts and CI)
zero-trust dlp email rules get
Gets detailed configuration for a specific DLP email scanning rule, including detection patterns and actions.
cf zero-trust dlp email rules get <rule-id><RULE-ID>stringrequiredRule ID
--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp email rules list
Lists all email scanner rules for an account.
cf zero-trust dlp email rules list--dry-runbooleandefault: falseValidate and show what would happen without executing
zero-trust dlp email rules update
Updates a DLP email scanning rule.
cf zero-trust dlp email rules update <rule-id> [options]<RULE-ID>stringrequiredRule ID
--action-action"Block"requiredThe action.action field
--action-messagestringThe action.message field
--conditionsstringrequiredTriggered if all conditions match. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"operator": "InList" | "NotInList" | "MatchRegex" | ...more, "selector": "Recipients" | "Sender" | "DLPProfiles", "value": ([string] | string)}].
--descriptionstringThe description field
--enabledbooleanrequiredThe enabled field
--namestringrequiredThe name field
--dry-runbooleandefault: falseValidate and show what would happen without executing
--bodystringRaw JSON request body (bypasses individual flags)