# DLP # Datasets ## Fetch all datasets `zero_trust.dlp.datasets.list(DatasetListParams**kwargs) -> SyncSinglePage[Dataset]` **get** `/accounts/{account_id}/dlp/datasets` Lists all DLP datasets configured for the account, including custom word lists and EDM datasets. ### Parameters - `account_id: str` ### Returns - `class Dataset: …` - `id: str` - `columns: List[Column]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: datetime` - `encoding_version: int` - `name: str` - `num_cells: int` - `secret: bool` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: datetime` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: List[Upload]` - `num_cells: int` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: int` - `case_sensitive: Optional[bool]` - `description: Optional[str]` The description of the dataset. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dlp.datasets.list( account_id="account_id", ) page = page.result[0] print(page.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } ] } ``` ## Fetch a specific dataset `zero_trust.dlp.datasets.get(strdataset_id, DatasetGetParams**kwargs) -> Dataset` **get** `/accounts/{account_id}/dlp/datasets/{dataset_id}` Fetch a specific dataset ### Parameters - `account_id: str` - `dataset_id: str` ### Returns - `class Dataset: …` - `id: str` - `columns: List[Column]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: datetime` - `encoding_version: int` - `name: str` - `num_cells: int` - `secret: bool` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: datetime` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: List[Upload]` - `num_cells: int` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: int` - `case_sensitive: Optional[bool]` - `description: Optional[str]` The description of the dataset. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dataset = client.zero_trust.dlp.datasets.get( dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(dataset.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Create a new dataset `zero_trust.dlp.datasets.create(DatasetCreateParams**kwargs) -> DatasetCreation` **post** `/accounts/{account_id}/dlp/datasets` 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. ### Parameters - `account_id: str` - `name: str` - `case_sensitive: Optional[bool]` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if `secret` is true or undefined - `description: Optional[str]` The description of the dataset. - `encoding_version: Optional[int]` Dataset 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. - `secret: Optional[bool]` Generate 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. ### Returns - `class DatasetCreation: …` - `dataset: Dataset` - `id: str` - `columns: List[Column]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: datetime` - `encoding_version: int` - `name: str` - `num_cells: int` - `secret: bool` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: datetime` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: List[Upload]` - `num_cells: int` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: int` - `case_sensitive: Optional[bool]` - `description: Optional[str]` The description of the dataset. - `encoding_version: int` Encoding version to use for dataset. - `max_cells: int` - `version: int` The version to use when uploading the dataset. - `secret: Optional[str]` The secret to use for Exact Data Match datasets. This is not present in Custom Wordlists. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dataset_creation = client.zero_trust.dlp.datasets.create( account_id="account_id", name="name", ) print(dataset_creation.dataset) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "dataset": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" }, "encoding_version": 0, "max_cells": 0, "version": 0, "secret": "secret" } } ``` ## Update details about a dataset `zero_trust.dlp.datasets.update(strdataset_id, DatasetUpdateParams**kwargs) -> Dataset` **put** `/accounts/{account_id}/dlp/datasets/{dataset_id}` Updates the configuration of an existing DLP dataset, such as its name, description, or detection settings. ### Parameters - `account_id: str` - `dataset_id: str` - `case_sensitive: Optional[bool]` Determines if the words should be matched in a case-sensitive manner. Only required for custom word lists. - `description: Optional[str]` The description of the dataset. - `name: Optional[str]` The name of the dataset, must be unique. ### Returns - `class Dataset: …` - `id: str` - `columns: List[Column]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: datetime` - `encoding_version: int` - `name: str` - `num_cells: int` - `secret: bool` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: datetime` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: List[Upload]` - `num_cells: int` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: int` - `case_sensitive: Optional[bool]` - `description: Optional[str]` The description of the dataset. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dataset = client.zero_trust.dlp.datasets.update( dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(dataset.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Delete a dataset `zero_trust.dlp.datasets.delete(strdataset_id, DatasetDeleteParams**kwargs)` **delete** `/accounts/{account_id}/dlp/datasets/{dataset_id}` This deletes all versions of the dataset. ### Parameters - `account_id: str` - `dataset_id: str` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) client.zero_trust.dlp.datasets.delete( dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) ``` ## Domain Types ### Dataset - `class Dataset: …` - `id: str` - `columns: List[Column]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: datetime` - `encoding_version: int` - `name: str` - `num_cells: int` - `secret: bool` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: datetime` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: List[Upload]` - `num_cells: int` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: int` - `case_sensitive: Optional[bool]` - `description: Optional[str]` The description of the dataset. ### Dataset Array - `List[Dataset]` - `id: str` - `columns: List[Column]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: datetime` - `encoding_version: int` - `name: str` - `num_cells: int` - `secret: bool` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: datetime` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: List[Upload]` - `num_cells: int` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: int` - `case_sensitive: Optional[bool]` - `description: Optional[str]` The description of the dataset. ### Dataset Creation - `class DatasetCreation: …` - `dataset: Dataset` - `id: str` - `columns: List[Column]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: datetime` - `encoding_version: int` - `name: str` - `num_cells: int` - `secret: bool` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: datetime` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: List[Upload]` - `num_cells: int` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: int` - `case_sensitive: Optional[bool]` - `description: Optional[str]` The description of the dataset. - `encoding_version: int` Encoding version to use for dataset. - `max_cells: int` - `version: int` The version to use when uploading the dataset. - `secret: Optional[str]` The secret to use for Exact Data Match datasets. This is not present in Custom Wordlists. # Upload ## Prepare to upload a new version of a dataset `zero_trust.dlp.datasets.upload.create(strdataset_id, UploadCreateParams**kwargs) -> NewVersion` **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/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. ### Parameters - `account_id: str` - `dataset_id: str` ### Returns - `class NewVersion: …` - `encoding_version: int` - `max_cells: int` - `version: int` - `case_sensitive: Optional[bool]` - `columns: Optional[List[Column]]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `secret: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) new_version = client.zero_trust.dlp.datasets.upload.create( dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(new_version.encoding_version) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "encoding_version": 0, "max_cells": 0, "version": 0, "case_sensitive": true, "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "secret": "secret" } } ``` ## Upload a new version of a dataset `zero_trust.dlp.datasets.upload.edit(intversion, objectdataset, UploadEditParams**kwargs) -> Dataset` **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/upload/{version}` 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. ### Parameters - `account_id: str` - `dataset_id: str` - `version: int` - `dataset: FileContent` ### Returns - `class Dataset: …` - `id: str` - `columns: List[Column]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `created_at: datetime` - `encoding_version: int` - `name: str` - `num_cells: int` - `secret: bool` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `updated_at: datetime` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `uploads: List[Upload]` - `num_cells: int` - `status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `version: int` - `case_sensitive: Optional[bool]` - `description: Optional[str]` The description of the dataset. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dataset = client.zero_trust.dlp.datasets.upload.edit( version=0, dataset=b"Example data", account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(dataset.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "columns": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ], "created_at": "2019-12-27T18:11:19.117Z", "encoding_version": 0, "name": "name", "num_cells": 0, "secret": true, "status": "empty", "updated_at": "2019-12-27T18:11:19.117Z", "uploads": [ { "num_cells": 0, "status": "empty", "version": 0 } ], "case_sensitive": true, "description": "description" } } ``` ## Domain Types ### New Version - `class NewVersion: …` - `encoding_version: int` - `max_cells: int` - `version: int` - `case_sensitive: Optional[bool]` - `columns: Optional[List[Column]]` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `secret: Optional[str]` # Versions ## Sets the column information for a multi-column upload `zero_trust.dlp.datasets.versions.create(intversion, VersionCreateParams**kwargs) -> SyncSinglePage[VersionCreateResponse]` **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/versions/{version}` This is used for multi-column EDMv2 datasets. The EDMv2 format can only be created in the Cloudflare dashboard. The columns in the response appear in the same order as in the request. ### Parameters - `account_id: str` - `dataset_id: str` - `version: int` - `body: Iterable[Body]` - `class BodyExistingColumn: …` - `entry_id: str` - `header_name: Optional[str]` - `num_cells: Optional[int]` - `class BodyNewColumn: …` - `entry_name: str` - `header_name: Optional[str]` - `num_cells: Optional[int]` ### Returns - `class VersionCreateResponse: …` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dlp.datasets.versions.create( version=0, account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", body=[{ "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }], ) page = page.result[0] print(page.entry_id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ] } ``` ## Domain Types ### Version Create Response - `class VersionCreateResponse: …` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Entries ## Upload a new version of a multi-column dataset `zero_trust.dlp.datasets.versions.entries.create(strentry_id, objectdataset_version_entry, EntryCreateParams**kwargs) -> EntryCreateResponse` **post** `/accounts/{account_id}/dlp/datasets/{dataset_id}/versions/{version}/entries/{entry_id}` This is used for multi-column EDMv2 datasets. The EDMv2 format can only be created in the Cloudflare dashboard. ### Parameters - `account_id: str` - `dataset_id: str` - `version: int` - `entry_id: str` - `dataset_version_entry: FileContent` ### Returns - `class EntryCreateResponse: …` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) entry = client.zero_trust.dlp.datasets.versions.entries.create( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", dataset_version_entry=b"Example data", account_id="account_id", dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", version=0, ) print(entry.entry_id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } } ``` ## Domain Types ### Entry Create Response - `class EntryCreateResponse: …` - `entry_id: str` - `header_name: str` - `num_cells: int` - `upload_status: Literal["empty", "uploading", "pending", 3 more]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Patterns ## Validate a DLP regex pattern `zero_trust.dlp.patterns.validate(PatternValidateParams**kwargs) -> PatternValidateResponse` **post** `/accounts/{account_id}/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}`. ### Parameters - `account_id: str` - `regex: str` - `max_match_bytes: Optional[int]` Maximum number of bytes that the regular expression can match. If this is `null` then 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. ### Returns - `class PatternValidateResponse: …` - `valid: bool` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.zero_trust.dlp.patterns.validate( account_id="account_id", regex="regex", ) print(response.valid) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "valid": true } } ``` ## Domain Types ### Pattern Validate Response - `class PatternValidateResponse: …` - `valid: bool` # Payload Logs ## Get payload log settings `zero_trust.dlp.payload_logs.get(PayloadLogGetParams**kwargs) -> PayloadLogGetResponse` **get** `/accounts/{account_id}/dlp/payload_log` Gets the current payload logging configuration for DLP, showing whether matched content is being logged. ### Parameters - `account_id: str` ### Returns - `class PayloadLogGetResponse: …` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) payload_log = client.zero_trust.dlp.payload_logs.get( account_id="account_id", ) print(payload_log.updated_at) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } ``` ## Set payload log settings `zero_trust.dlp.payload_logs.update(PayloadLogUpdateParams**kwargs) -> PayloadLogUpdateResponse` **put** `/accounts/{account_id}/dlp/payload_log` Enables or disables payload logging for DLP matches. When enabled, matched content is stored for review. ### Parameters - `account_id: str` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. - Set to null or empty string to disable payload logging. - Set to a non-empty base64 string to enable payload logging with the given key. For customers with configurable payload masking feature rolled out: - If the field is missing, the existing setting will be kept. Note that this is different from setting to null or empty string. For all other customers: - If the field is missing, the existing setting will be cleared. ### Returns - `class PayloadLogUpdateResponse: …` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) payload_log = client.zero_trust.dlp.payload_logs.update( account_id="account_id", ) print(payload_log.updated_at) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } ``` ## Domain Types ### Payload Log Get Response - `class PayloadLogGetResponse: …` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Payload Log Update Response - `class PayloadLogUpdateResponse: …` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. # Settings ## Get DLP account-level settings. `zero_trust.dlp.settings.get(SettingGetParams**kwargs) -> DLPSettings` **get** `/accounts/{account_id}/dlp/settings` Get DLP account-level settings. ### Parameters - `account_id: str` ### Returns - `class DLPSettings: …` DLP account-level settings response. - `ai_context_analysis: bool` Whether AI context analysis is enabled at the account level. - `ocr: bool` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dlp_settings = client.zero_trust.dlp.settings.get( account_id="account_id", ) print(dlp_settings.ai_context_analysis) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "ai_context_analysis": true, "ocr": true, "payload_logging": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } } ``` ## Update DLP account-level settings (full replacement). `zero_trust.dlp.settings.update(SettingUpdateParams**kwargs) -> DLPSettings` **put** `/accounts/{account_id}/dlp/settings` Missing fields are reset to initial (unconfigured) values. ### Parameters - `account_id: str` - `ai_context_analysis: Optional[bool]` Whether AI context analysis is enabled at the account level. - `ocr: Optional[bool]` Whether OCR is enabled at the account level. - `payload_logging: Optional[PayloadLogging]` Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT). - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-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). ### Returns - `class DLPSettings: …` DLP account-level settings response. - `ai_context_analysis: bool` Whether AI context analysis is enabled at the account level. - `ocr: bool` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dlp_settings = client.zero_trust.dlp.settings.update( account_id="account_id", ) print(dlp_settings.ai_context_analysis) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "ai_context_analysis": true, "ocr": true, "payload_logging": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } } ``` ## Partially update DLP account-level settings. `zero_trust.dlp.settings.edit(SettingEditParams**kwargs) -> DLPSettings` **patch** `/accounts/{account_id}/dlp/settings` Missing fields keep their existing values. ### Parameters - `account_id: str` - `ai_context_analysis: Optional[bool]` Whether AI context analysis is enabled at the account level. - `ocr: Optional[bool]` Whether OCR is enabled at the account level. - `payload_logging: Optional[PayloadLogging]` Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT). - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-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). ### Returns - `class DLPSettings: …` DLP account-level settings response. - `ai_context_analysis: bool` Whether AI context analysis is enabled at the account level. - `ocr: bool` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dlp_settings = client.zero_trust.dlp.settings.edit( account_id="account_id", ) print(dlp_settings.ai_context_analysis) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "ai_context_analysis": true, "ocr": true, "payload_logging": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } } ``` ## Delete (reset) DLP account-level settings to initial values. `zero_trust.dlp.settings.delete(SettingDeleteParams**kwargs) -> DLPSettings` **delete** `/accounts/{account_id}/dlp/settings` Delete (reset) DLP account-level settings to initial values. ### Parameters - `account_id: str` ### Returns - `class DLPSettings: …` DLP account-level settings response. - `ai_context_analysis: bool` Whether AI context analysis is enabled at the account level. - `ocr: bool` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) dlp_settings = client.zero_trust.dlp.settings.delete( account_id="account_id", ) print(dlp_settings.ai_context_analysis) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "ai_context_analysis": true, "ocr": true, "payload_logging": { "updated_at": "2019-12-27T18:11:19.117Z", "masking_level": "full", "public_key": "public_key" } } } ``` ## Domain Types ### DLP Settings - `class DLPSettings: …` DLP account-level settings response. - `ai_context_analysis: bool` Whether AI context analysis is enabled at the account level. - `ocr: bool` Whether OCR is enabled at the account level. - `payload_logging: PayloadLogging` - `updated_at: datetime` - `masking_level: Optional[Literal["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. - `"full"` - `"partial"` - `"clear"` - `"default"` - `public_key: Optional[str]` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. # Email # Account Mapping ## Get mapping `zero_trust.dlp.email.account_mapping.get(AccountMappingGetParams**kwargs) -> AccountMappingGetResponse` **get** `/accounts/{account_id}/dlp/email/account_mapping` Retrieves the email provider mapping configuration for DLP email scanning. ### Parameters - `account_id: str` ### Returns - `class AccountMappingGetResponse: …` - `addin_identifier_token: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: List[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) account_mapping = client.zero_trust.dlp.email.account_mapping.get( account_id="account_id", ) print(account_mapping.addin_identifier_token) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "addin_identifier_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } } } ``` ## Create mapping `zero_trust.dlp.email.account_mapping.create(AccountMappingCreateParams**kwargs) -> AccountMappingCreateResponse` **post** `/accounts/{account_id}/dlp/email/account_mapping` Creates a mapping between a Cloudflare account and an email provider for DLP email scanning integration. ### Parameters - `account_id: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: Sequence[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` ### Returns - `class AccountMappingCreateResponse: …` - `addin_identifier_token: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: List[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) account_mapping = client.zero_trust.dlp.email.account_mapping.create( account_id="account_id", auth_requirements={ "allowed_microsoft_organizations": ["string"], "type": "Org", }, ) print(account_mapping.addin_identifier_token) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "addin_identifier_token": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "auth_requirements": { "allowed_microsoft_organizations": [ "string" ], "type": "Org" } } } ``` ## Domain Types ### Account Mapping Get Response - `class AccountMappingGetResponse: …` - `addin_identifier_token: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: List[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` ### Account Mapping Create Response - `class AccountMappingCreateResponse: …` - `addin_identifier_token: str` - `auth_requirements: AuthRequirements` - `class AuthRequirementsUnionMember0: …` - `allowed_microsoft_organizations: List[str]` - `type: Literal["Org"]` - `"Org"` - `class AuthRequirementsType: …` - `type: Literal["NoAuth"]` - `"NoAuth"` # Rules ## List all email scanner rules `zero_trust.dlp.email.rules.list(RuleListParams**kwargs) -> SyncSinglePage[RuleListResponse]` **get** `/accounts/{account_id}/dlp/email/rules` Lists all email scanner rules for an account. ### Parameters - `account_id: str` ### Returns - `class RuleListResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dlp.email.rules.list( account_id="account_id", ) page = page.result[0] print(page.rule_id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } ] } ``` ## Get an email scanner rule `zero_trust.dlp.email.rules.get(strrule_id, RuleGetParams**kwargs) -> RuleGetResponse` **get** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Gets detailed configuration for a specific DLP email scanning rule, including detection patterns and actions. ### Parameters - `account_id: str` - `rule_id: str` ### Returns - `class RuleGetResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) rule = client.zero_trust.dlp.email.rules.get( rule_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(rule.rule_id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Create email scanner rule `zero_trust.dlp.email.rules.create(RuleCreateParams**kwargs) -> RuleCreateResponse` **post** `/accounts/{account_id}/dlp/email/rules` Creates a new DLP email scanning rule that defines what content patterns to detect in email messages and what actions to take. ### Parameters - `account_id: str` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: Iterable[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[Sequence[str], str]` - `Sequence[str]` - `str` - `enabled: bool` - `name: str` - `description: Optional[str]` ### Returns - `class RuleCreateResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) rule = client.zero_trust.dlp.email.rules.create( account_id="account_id", action={ "action": "Block" }, conditions=[{ "operator": "InList", "selector": "Recipients", "value": ["string"], }], enabled=True, name="name", ) print(rule.rule_id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update email scanner rule `zero_trust.dlp.email.rules.update(strrule_id, RuleUpdateParams**kwargs) -> RuleUpdateResponse` **put** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Update email scanner rule ### Parameters - `account_id: str` - `rule_id: str` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: Iterable[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[Sequence[str], str]` - `Sequence[str]` - `str` - `enabled: bool` - `name: str` - `description: Optional[str]` ### Returns - `class RuleUpdateResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) rule = client.zero_trust.dlp.email.rules.update( rule_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", action={ "action": "Block" }, conditions=[{ "operator": "InList", "selector": "Recipients", "value": ["string"], }], enabled=True, name="name", ) print(rule.rule_id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Delete email scanner rule `zero_trust.dlp.email.rules.delete(strrule_id, RuleDeleteParams**kwargs) -> RuleDeleteResponse` **delete** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Removes a DLP email scanning rule. The rule will no longer be applied to email messages. ### Parameters - `account_id: str` - `rule_id: str` ### Returns - `class RuleDeleteResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) rule = client.zero_trust.dlp.email.rules.delete( rule_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(rule.rule_id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Update email scanner rule priorities `zero_trust.dlp.email.rules.bulk_edit(RuleBulkEditParams**kwargs) -> RuleBulkEditResponse` **patch** `/accounts/{account_id}/dlp/email/rules` Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first. ### Parameters - `account_id: str` - `new_priorities: Dict[str, int]` ### Returns - `class RuleBulkEditResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) response = client.zero_trust.dlp.email.rules.bulk_edit( account_id="account_id", new_priorities={ "foo": 0 }, ) print(response.rule_id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "action": { "action": "Block", "message": "message" }, "conditions": [ { "operator": "InList", "selector": "Recipients", "value": [ "string" ] } ], "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "priority": 0, "rule_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description" } } ``` ## Domain Types ### Rule List Response - `class RuleListResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Rule Get Response - `class RuleGetResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Rule Create Response - `class RuleCreateResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Rule Update Response - `class RuleUpdateResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Rule Delete Response - `class RuleDeleteResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` ### Rule Bulk Edit Response - `class RuleBulkEditResponse: …` - `action: Action` - `action: Literal["Block"]` - `"Block"` - `message: Optional[str]` - `conditions: List[Condition]` Triggered if all conditions match. - `operator: Literal["InList", "NotInList", "MatchRegex", "NotMatchRegex"]` - `"InList"` - `"NotInList"` - `"MatchRegex"` - `"NotMatchRegex"` - `selector: Literal["Recipients", "Sender", "DLPProfiles"]` - `"Recipients"` - `"Sender"` - `"DLPProfiles"` - `value: Union[List[str], str]` - `List[str]` - `str` - `created_at: datetime` - `enabled: bool` - `name: str` - `priority: int` - `rule_id: str` - `updated_at: datetime` - `description: Optional[str]` # Profiles ## List all profiles `zero_trust.dlp.profiles.list(ProfileListParams**kwargs) -> SyncSinglePage[Profile]` **get** `/accounts/{account_id}/dlp/profiles` Lists all DLP profiles in an account. ### Parameters - `account_id: str` - `all: Optional[bool]` Return all profiles, including those that current account does not have access to. ### Returns - `Profile` - `class CustomProfile: …` - `id: str` The id of the profile (uuid). - `allowed_match_count: int` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: datetime` When the profile was created. - `name: str` The name of the profile. - `ocr_enabled: bool` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` When the profile was lasted updated. - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[List[str]]` Data classes associated with this profile. - `data_tags: Optional[List[str]]` Data tags associated with this profile. - `description: Optional[str]` The description of the profile. - `entries: Optional[List[CustomProfileEntry]]` - `class CustomProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `sensitivity_levels: Optional[List[CustomProfileSensitivityLevel]]` Sensitivity levels associated with this profile. - `group_id: str` - `level_id: str` - `shared_entries: Optional[List[CustomProfileSharedEntry]]` - `class CustomProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `entries: List[PredefinedProfileEntry]` - `class PredefinedProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class PredefinedProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class PredefinedProfileEntryPredefinedEntry: …` - `id: str` - `confidence: PredefinedProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[PredefinedProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class PredefinedProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class PredefinedProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class PredefinedProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class PredefinedProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `type: Literal["predefined"]` - `"predefined"` - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. - `class IntegrationProfile: …` - `id: str` - `created_at: datetime` - `entries: List[IntegrationProfileEntry]` - `class IntegrationProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` - `shared_entries: List[IntegrationProfileSharedEntry]` - `class IntegrationProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `description: Optional[str]` The description of the profile. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dlp.profiles.list( account_id="account_id", ) page = page.result[0] print(page) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } ] } ``` ## Get DLP Profile `zero_trust.dlp.profiles.get(strprofile_id, ProfileGetParams**kwargs) -> Profile` **get** `/accounts/{account_id}/dlp/profiles/{profile_id}` Fetches a DLP profile by ID. ### Parameters - `account_id: str` - `profile_id: str` ### Returns - `Profile` - `class CustomProfile: …` - `id: str` The id of the profile (uuid). - `allowed_match_count: int` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: datetime` When the profile was created. - `name: str` The name of the profile. - `ocr_enabled: bool` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` When the profile was lasted updated. - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[List[str]]` Data classes associated with this profile. - `data_tags: Optional[List[str]]` Data tags associated with this profile. - `description: Optional[str]` The description of the profile. - `entries: Optional[List[CustomProfileEntry]]` - `class CustomProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `sensitivity_levels: Optional[List[CustomProfileSensitivityLevel]]` Sensitivity levels associated with this profile. - `group_id: str` - `level_id: str` - `shared_entries: Optional[List[CustomProfileSharedEntry]]` - `class CustomProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `entries: List[PredefinedProfileEntry]` - `class PredefinedProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class PredefinedProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class PredefinedProfileEntryPredefinedEntry: …` - `id: str` - `confidence: PredefinedProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[PredefinedProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class PredefinedProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class PredefinedProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class PredefinedProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class PredefinedProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `type: Literal["predefined"]` - `"predefined"` - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. - `class IntegrationProfile: …` - `id: str` - `created_at: datetime` - `entries: List[IntegrationProfileEntry]` - `class IntegrationProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` - `shared_entries: List[IntegrationProfileSharedEntry]` - `class IntegrationProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `description: Optional[str]` The description of the profile. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) profile = client.zero_trust.dlp.profiles.get( profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(profile) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Domain Types ### Context Awareness - `class ContextAwareness: …` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. ### Profile - `Profile` - `class CustomProfile: …` - `id: str` The id of the profile (uuid). - `allowed_match_count: int` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: datetime` When the profile was created. - `name: str` The name of the profile. - `ocr_enabled: bool` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` When the profile was lasted updated. - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[List[str]]` Data classes associated with this profile. - `data_tags: Optional[List[str]]` Data tags associated with this profile. - `description: Optional[str]` The description of the profile. - `entries: Optional[List[CustomProfileEntry]]` - `class CustomProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `sensitivity_levels: Optional[List[CustomProfileSensitivityLevel]]` Sensitivity levels associated with this profile. - `group_id: str` - `level_id: str` - `shared_entries: Optional[List[CustomProfileSharedEntry]]` - `class CustomProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `entries: List[PredefinedProfileEntry]` - `class PredefinedProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class PredefinedProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class PredefinedProfileEntryPredefinedEntry: …` - `id: str` - `confidence: PredefinedProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[PredefinedProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class PredefinedProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class PredefinedProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class PredefinedProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class PredefinedProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `type: Literal["predefined"]` - `"predefined"` - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. - `class IntegrationProfile: …` - `id: str` - `created_at: datetime` - `entries: List[IntegrationProfileEntry]` - `class IntegrationProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` - `shared_entries: List[IntegrationProfileSharedEntry]` - `class IntegrationProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `description: Optional[str]` The description of the profile. ### Skip Configuration - `class SkipConfiguration: …` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. # Custom ## Get custom profile `zero_trust.dlp.profiles.custom.get(strprofile_id, CustomGetParams**kwargs) -> Profile` **get** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Fetches a custom DLP profile by id. ### Parameters - `account_id: str` - `profile_id: str` ### Returns - `Profile` - `class CustomProfile: …` - `id: str` The id of the profile (uuid). - `allowed_match_count: int` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: datetime` When the profile was created. - `name: str` The name of the profile. - `ocr_enabled: bool` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` When the profile was lasted updated. - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[List[str]]` Data classes associated with this profile. - `data_tags: Optional[List[str]]` Data tags associated with this profile. - `description: Optional[str]` The description of the profile. - `entries: Optional[List[CustomProfileEntry]]` - `class CustomProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `sensitivity_levels: Optional[List[CustomProfileSensitivityLevel]]` Sensitivity levels associated with this profile. - `group_id: str` - `level_id: str` - `shared_entries: Optional[List[CustomProfileSharedEntry]]` - `class CustomProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `entries: List[PredefinedProfileEntry]` - `class PredefinedProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class PredefinedProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class PredefinedProfileEntryPredefinedEntry: …` - `id: str` - `confidence: PredefinedProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[PredefinedProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class PredefinedProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class PredefinedProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class PredefinedProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class PredefinedProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `type: Literal["predefined"]` - `"predefined"` - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. - `class IntegrationProfile: …` - `id: str` - `created_at: datetime` - `entries: List[IntegrationProfileEntry]` - `class IntegrationProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` - `shared_entries: List[IntegrationProfileSharedEntry]` - `class IntegrationProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `description: Optional[str]` The description of the profile. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) profile = client.zero_trust.dlp.profiles.custom.get( profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(profile) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Create custom profile `zero_trust.dlp.profiles.custom.create(CustomCreateParams**kwargs) -> Profile` **post** `/accounts/{account_id}/dlp/profiles/custom` Creates a DLP custom profile. ### Parameters - `account_id: str` - `name: str` - `ai_context_enabled: Optional[bool]` - `allowed_match_count: Optional[int]` Related DLP policies will trigger when the match count exceeds the number set. - `confidence_threshold: Optional[str]` - `context_awareness: Optional[ContextAwarenessParam]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[Sequence[str]]` Data class IDs to associate with the profile. - `data_tags: Optional[Sequence[str]]` Data tag IDs to associate with the profile. - `description: Optional[str]` The description of the profile. - `entries: Optional[Iterable[Entry]]` - `class EntryDLPNewCustomEntry: …` - `enabled: bool` - `name: str` - `pattern: PatternParam` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `description: Optional[str]` - `class EntryDLPNewWordListEntry: …` - `enabled: bool` - `name: str` - `words: Sequence[str]` - `ocr_enabled: Optional[bool]` - `sensitivity_levels: Optional[Iterable[SensitivityLevel]]` Sensitivity levels to associate with the profile. - `group_id: str` - `level_id: str` - `shared_entries: Optional[Iterable[SharedEntry]]` Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). - `enabled: bool` - `entry_id: str` ### Returns - `Profile` - `class CustomProfile: …` - `id: str` The id of the profile (uuid). - `allowed_match_count: int` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: datetime` When the profile was created. - `name: str` The name of the profile. - `ocr_enabled: bool` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` When the profile was lasted updated. - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[List[str]]` Data classes associated with this profile. - `data_tags: Optional[List[str]]` Data tags associated with this profile. - `description: Optional[str]` The description of the profile. - `entries: Optional[List[CustomProfileEntry]]` - `class CustomProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `sensitivity_levels: Optional[List[CustomProfileSensitivityLevel]]` Sensitivity levels associated with this profile. - `group_id: str` - `level_id: str` - `shared_entries: Optional[List[CustomProfileSharedEntry]]` - `class CustomProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `entries: List[PredefinedProfileEntry]` - `class PredefinedProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class PredefinedProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class PredefinedProfileEntryPredefinedEntry: …` - `id: str` - `confidence: PredefinedProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[PredefinedProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class PredefinedProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class PredefinedProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class PredefinedProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class PredefinedProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `type: Literal["predefined"]` - `"predefined"` - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. - `class IntegrationProfile: …` - `id: str` - `created_at: datetime` - `entries: List[IntegrationProfileEntry]` - `class IntegrationProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` - `shared_entries: List[IntegrationProfileSharedEntry]` - `class IntegrationProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `description: Optional[str]` The description of the profile. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) profile = client.zero_trust.dlp.profiles.custom.create( account_id="account_id", name="name", ) print(profile) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Update custom profile `zero_trust.dlp.profiles.custom.update(strprofile_id, CustomUpdateParams**kwargs) -> Profile` **put** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Updates a DLP custom profile. ### Parameters - `account_id: str` - `profile_id: str` - `name: str` - `ai_context_enabled: Optional[bool]` - `allowed_match_count: Optional[int]` - `confidence_threshold: Optional[str]` - `context_awareness: Optional[ContextAwarenessParam]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[Sequence[str]]` Data class IDs to associate with the profile. If omitted, existing associations are unchanged. - `data_tags: Optional[Sequence[str]]` Data tag IDs to associate with the profile. If omitted, existing associations are unchanged. - `description: Optional[str]` The description of the profile. - `entries: Optional[Iterable[Entry]]` Custom entries from this profile. If this field is omitted, entries owned by this profile will not be changed. - `class EntryDLPNewCustomEntryWithID: …` - `enabled: bool` - `entry_id: str` - `name: str` - `pattern: PatternParam` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `description: Optional[str]` - `class EntryDLPNewCustomEntry: …` - `enabled: bool` - `name: str` - `pattern: PatternParam` - `description: Optional[str]` - `ocr_enabled: Optional[bool]` - `sensitivity_levels: Optional[Iterable[SensitivityLevel]]` Sensitivity levels to associate with the profile. If omitted, existing associations are unchanged. - `group_id: str` - `level_id: str` - `shared_entries: Optional[Iterable[SharedEntry]]` Other entries, e.g. predefined or integration. - `enabled: bool` - `entry_id: str` ### Returns - `Profile` - `class CustomProfile: …` - `id: str` The id of the profile (uuid). - `allowed_match_count: int` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: datetime` When the profile was created. - `name: str` The name of the profile. - `ocr_enabled: bool` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` When the profile was lasted updated. - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[List[str]]` Data classes associated with this profile. - `data_tags: Optional[List[str]]` Data tags associated with this profile. - `description: Optional[str]` The description of the profile. - `entries: Optional[List[CustomProfileEntry]]` - `class CustomProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `sensitivity_levels: Optional[List[CustomProfileSensitivityLevel]]` Sensitivity levels associated with this profile. - `group_id: str` - `level_id: str` - `shared_entries: Optional[List[CustomProfileSharedEntry]]` - `class CustomProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class CustomProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: CustomProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[CustomProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class CustomProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class CustomProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class CustomProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class CustomProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class CustomProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `entries: List[PredefinedProfileEntry]` - `class PredefinedProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class PredefinedProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class PredefinedProfileEntryPredefinedEntry: …` - `id: str` - `confidence: PredefinedProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[PredefinedProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class PredefinedProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class PredefinedProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class PredefinedProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class PredefinedProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class PredefinedProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `type: Literal["predefined"]` - `"predefined"` - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. - `class IntegrationProfile: …` - `id: str` - `created_at: datetime` - `entries: List[IntegrationProfileEntry]` - `class IntegrationProfileEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` - `shared_entries: List[IntegrationProfileSharedEntry]` - `class IntegrationProfileSharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryPredefinedEntry: …` - `id: str` - `confidence: IntegrationProfileSharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[IntegrationProfileSharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class IntegrationProfileSharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationProfileSharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class IntegrationProfileSharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class IntegrationProfileSharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `description: Optional[str]` The description of the profile. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) profile = client.zero_trust.dlp.profiles.custom.update( profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", name="name", ) print(profile) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 5, "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "ocr_enabled": true, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "ai_context_enabled": true, "confidence_threshold": "low", "context_awareness": { "enabled": true, "skip": { "files": true } }, "data_classes": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "data_tags": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "description": "description", "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "sensitivity_levels": [ { "group_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "level_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "shared_entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } } ``` ## Delete custom profile `zero_trust.dlp.profiles.custom.delete(strprofile_id, CustomDeleteParams**kwargs) -> object` **delete** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Deletes a DLP custom profile. ### Parameters - `account_id: str` - `profile_id: str` ### Returns - `object` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) custom = client.zero_trust.dlp.profiles.custom.delete( profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(custom) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": {} } ``` ## Domain Types ### Custom Profile - `class CustomProfile: …` - `id: str` The id of the profile (uuid). - `allowed_match_count: int` Related DLP policies will trigger when the match count exceeds the number set. - `created_at: datetime` When the profile was created. - `name: str` The name of the profile. - `ocr_enabled: bool` - `updated_at: datetime` When the profile was lasted updated. - `ai_context_enabled: Optional[bool]` - `confidence_threshold: Optional[Literal["low", "medium", "high", "very_high"]]` - `"low"` - `"medium"` - `"high"` - `"very_high"` - `context_awareness: Optional[ContextAwareness]` Scan the context of predefined entries to only return matches surrounded by keywords. - `enabled: bool` If true, scan the context of predefined entries to only return matches surrounded by keywords. - `skip: SkipConfiguration` Content types to exclude from context analysis and return all matches. - `files: bool` If the content type is a file, skip context analysis and return all matches. - `data_classes: Optional[List[str]]` Data classes associated with this profile. - `data_tags: Optional[List[str]]` Data tags associated with this profile. - `description: Optional[str]` The description of the profile. - `entries: Optional[List[Entry]]` - `class EntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class EntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class EntryPredefinedEntry: …` - `id: str` - `confidence: EntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[EntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class EntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class EntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class EntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class EntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class EntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class EntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `sensitivity_levels: Optional[List[SensitivityLevel]]` Sensitivity levels associated with this profile. - `group_id: str` - `level_id: str` - `shared_entries: Optional[List[SharedEntry]]` - `class SharedEntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class SharedEntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class SharedEntryPredefinedEntry: …` - `id: str` - `confidence: SharedEntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[SharedEntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class SharedEntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class SharedEntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class SharedEntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class SharedEntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class SharedEntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class SharedEntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` ### Pattern - `class Pattern: …` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` # Predefined ## Get predefined profile config `zero_trust.dlp.profiles.predefined.get(strprofile_id, PredefinedGetParams**kwargs) -> PredefinedProfile` **get** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}/config` This is similar to `get_predefined` but only returns entries that are enabled. This is needed for our terraform API Fetches a predefined DLP profile by id. ### Parameters - `account_id: str` - `profile_id: str` ### Returns - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `confidence_threshold: Optional[str]` - `enabled_entries: List[str]` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: List[Entry]` This field has been deprecated for `enabled_entries`. - `class EntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class EntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class EntryPredefinedEntry: …` - `id: str` - `confidence: EntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[EntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class EntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class EntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class EntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class EntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class EntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class EntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `ai_context_enabled: Optional[bool]` - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) predefined_profile = client.zero_trust.dlp.profiles.predefined.get( profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(predefined_profile.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 0, "confidence_threshold": "confidence_threshold", "enabled_entries": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "name": "name", "ai_context_enabled": true, "ocr_enabled": true, "open_access": true } } ``` ## Update predefined profile config `zero_trust.dlp.profiles.predefined.update(strprofile_id, PredefinedUpdateParams**kwargs) -> PredefinedProfile` **put** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}/config` This is similar to `update_predefined` but only returns entries that are enabled. This is needed for our terraform API Updates a DLP predefined profile. Only supports enabling/disabling entries. ### Parameters - `account_id: str` - `profile_id: str` - `ai_context_enabled: Optional[bool]` - `allowed_match_count: Optional[int]` - `confidence_threshold: Optional[str]` - `enabled_entries: Optional[Sequence[str]]` - `entries: Optional[Iterable[Entry]]` - `id: str` - `enabled: bool` - `ocr_enabled: Optional[bool]` ### Returns - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `confidence_threshold: Optional[str]` - `enabled_entries: List[str]` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: List[Entry]` This field has been deprecated for `enabled_entries`. - `class EntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class EntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class EntryPredefinedEntry: …` - `id: str` - `confidence: EntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[EntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class EntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class EntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class EntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class EntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class EntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class EntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `ai_context_enabled: Optional[bool]` - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) predefined_profile = client.zero_trust.dlp.profiles.predefined.update( profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(predefined_profile.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "allowed_match_count": 0, "confidence_threshold": "confidence_threshold", "enabled_entries": [ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ], "entries": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "name": "name", "ai_context_enabled": true, "ocr_enabled": true, "open_access": true } } ``` ## Delete predefined profile `zero_trust.dlp.profiles.predefined.delete(strprofile_id, PredefinedDeleteParams**kwargs) -> object` **delete** `/accounts/{account_id}/dlp/profiles/predefined/{profile_id}` This is a no-op as predefined profiles can't be deleted but is needed for our generated terraform API. ### Parameters - `account_id: str` - `profile_id: str` ### Returns - `object` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) predefined = client.zero_trust.dlp.profiles.predefined.delete( profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(predefined) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": {} } ``` ## Domain Types ### Predefined Profile - `class PredefinedProfile: …` - `id: str` The id of the predefined profile (uuid). - `allowed_match_count: int` - `confidence_threshold: Optional[str]` - `enabled_entries: List[str]` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `entries: List[Entry]` This field has been deprecated for `enabled_entries`. - `class EntryCustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class EntryCustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class EntryPredefinedEntry: …` - `id: str` - `confidence: EntryPredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[EntryPredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class EntryPredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class EntryPredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class EntryIntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class EntryExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class EntryDocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class EntryWordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `name: str` The name of the predefined profile. - `ai_context_enabled: Optional[bool]` - `ocr_enabled: Optional[bool]` - `open_access: Optional[bool]` Whether this profile can be accessed by anyone. # Limits ## Fetch limits associated with DLP for account `zero_trust.dlp.limits.list(LimitListParams**kwargs) -> LimitListResponse` **get** `/accounts/{account_id}/dlp/limits` 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. ### Parameters - `account_id: str` ### Returns - `class LimitListResponse: …` - `max_custom_regex_entries: int` Maximum number of custom regex entries allowed for the account. - `max_dataset_cells: int` Maximum number of dataset cells allowed for the account, across all EDM and CWL datasets. - `max_document_fingerprints: int` Maximum number of document fingerprints allowed for the account. - `used_custom_regex_entries: int` Number of custom regex entries currently configured for the account. - `used_dataset_cells: int` Number of dataset cells currently configured for the account, across all EDM and CWL datasets. Document fingerprints do not count towards this limit. - `used_document_fingerprints: int` Number of document fingerprints currently configured for the account. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) limits = client.zero_trust.dlp.limits.list( account_id="account_id", ) print(limits.max_custom_regex_entries) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "max_custom_regex_entries": 0, "max_dataset_cells": 0, "max_document_fingerprints": 0, "used_custom_regex_entries": 0, "used_dataset_cells": 0, "used_document_fingerprints": 0 } } ``` ## Domain Types ### Limit List Response - `class LimitListResponse: …` - `max_custom_regex_entries: int` Maximum number of custom regex entries allowed for the account. - `max_dataset_cells: int` Maximum number of dataset cells allowed for the account, across all EDM and CWL datasets. - `max_document_fingerprints: int` Maximum number of document fingerprints allowed for the account. - `used_custom_regex_entries: int` Number of custom regex entries currently configured for the account. - `used_dataset_cells: int` Number of dataset cells currently configured for the account, across all EDM and CWL datasets. Document fingerprints do not count towards this limit. - `used_document_fingerprints: int` Number of document fingerprints currently configured for the account. # Entries ## List all entries `zero_trust.dlp.entries.list(EntryListParams**kwargs) -> SyncSinglePage[EntryListResponse]` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `account_id: str` ### Returns - `EntryListResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dlp.entries.list( account_id="account_id", ) page = page.result[0] print(page) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Get DLP Entry `zero_trust.dlp.entries.get(strentry_id, EntryGetParams**kwargs) -> EntryGetResponse` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `account_id: str` - `entry_id: str` ### Returns - `EntryGetResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember0Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember2Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember4Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember5Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember6Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) entry = client.zero_trust.dlp.entries.get( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(entry) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## Create custom entry `zero_trust.dlp.entries.create(EntryCreateParams**kwargs) -> EntryCreateResponse` **post** `/accounts/{account_id}/dlp/entries` Creates a DLP custom entry. ### Parameters - `account_id: str` - `enabled: bool` - `name: str` - `pattern: PatternParam` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `description: Optional[str]` - `profile_id: Optional[str]` ### Returns - `class EntryCreateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) entry = client.zero_trust.dlp.entries.create( account_id="account_id", enabled=True, name="name", pattern={ "regex": "regex" }, ) print(entry.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update entry `zero_trust.dlp.entries.update(strentry_id, EntryUpdateParams**kwargs) -> EntryUpdateResponse` **put** `/accounts/{account_id}/dlp/entries/{entry_id}` Updates a DLP entry. ### Parameters - `account_id: str` - `entry_id: str` - `name: str` - `pattern: PatternParam` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `description: Optional[str]` - `enabled: Optional[bool]` ### Returns - `EntryUpdateResponse` - `class CustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class PredefinedEntry: …` - `id: str` - `confidence: PredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[PredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class PredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class PredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class ExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class DocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class WordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) entry = client.zero_trust.dlp.entries.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", name="name", pattern={ "regex": "regex" }, type="custom", ) print(entry) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete custom entry `zero_trust.dlp.entries.delete(strentry_id, EntryDeleteParams**kwargs) -> object` **delete** `/accounts/{account_id}/dlp/entries/{entry_id}` Deletes a DLP custom entry. ### Parameters - `account_id: str` - `entry_id: str` ### Returns - `object` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) entry = client.zero_trust.dlp.entries.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(entry) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": {} } ``` ## Domain Types ### Entry List Response - `EntryListResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Entry Get Response - `EntryGetResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember0Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember2Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember4Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember5Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember6Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Entry Create Response - `class EntryCreateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` ### Entry Update Response - `EntryUpdateResponse` - `class CustomEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `class CustomPromptTopicEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `class PredefinedEntry: …` - `id: str` - `confidence: PredefinedEntryConfidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `variant: Optional[PredefinedEntryVariant]` A Predefined AI prompt classification topic entry. - `class PredefinedEntryVariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class PredefinedEntryVariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class IntegrationEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `class ExactDataEntry: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `class DocumentFingerprintEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `class WordListEntry: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` # Custom ## Create custom entry `zero_trust.dlp.entries.custom.create(CustomCreateParams**kwargs) -> CustomCreateResponse` **post** `/accounts/{account_id}/dlp/entries` Creates a DLP custom entry. ### Parameters - `account_id: str` - `enabled: bool` - `name: str` - `pattern: PatternParam` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `description: Optional[str]` - `profile_id: Optional[str]` ### Returns - `class CustomCreateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) custom = client.zero_trust.dlp.entries.custom.create( account_id="account_id", enabled=True, name="name", pattern={ "regex": "regex" }, ) print(custom.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update custom entry `zero_trust.dlp.entries.custom.update(strentry_id, CustomUpdateParams**kwargs) -> CustomUpdateResponse` **put** `/accounts/{account_id}/dlp/entries/custom/{entry_id}` Updates a DLP custom entry. ### Parameters - `account_id: str` - `entry_id: str` - `enabled: bool` - `name: str` - `pattern: PatternParam` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `description: Optional[str]` ### Returns - `class CustomUpdateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) custom = client.zero_trust.dlp.entries.custom.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", enabled=True, name="name", pattern={ "regex": "regex" }, ) print(custom.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete custom entry `zero_trust.dlp.entries.custom.delete(strentry_id, CustomDeleteParams**kwargs) -> object` **delete** `/accounts/{account_id}/dlp/entries/{entry_id}` Deletes a DLP custom entry. ### Parameters - `account_id: str` - `entry_id: str` ### Returns - `object` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) custom = client.zero_trust.dlp.entries.custom.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(custom) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": {} } ``` ## Get DLP Entry `zero_trust.dlp.entries.custom.get(strentry_id, CustomGetParams**kwargs) -> CustomGetResponse` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `account_id: str` - `entry_id: str` ### Returns - `CustomGetResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember0Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember2Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember4Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember5Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember6Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) custom = client.zero_trust.dlp.entries.custom.get( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(custom) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries `zero_trust.dlp.entries.custom.list(CustomListParams**kwargs) -> SyncSinglePage[CustomListResponse]` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `account_id: str` ### Returns - `CustomListResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dlp.entries.custom.list( account_id="account_id", ) page = page.result[0] print(page) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Custom Create Response - `class CustomCreateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` ### Custom Update Response - `class CustomUpdateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` ### Custom Get Response - `CustomGetResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember0Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember2Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember4Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember5Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember6Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Custom List Response - `CustomListResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Predefined ## Create predefined entry `zero_trust.dlp.entries.predefined.create(PredefinedCreateParams**kwargs) -> PredefinedCreateResponse` **post** `/accounts/{account_id}/dlp/entries/predefined` Predefined entries can't be created, this will update an existing predefined entry. This is needed for our generated terraform API. ### Parameters - `account_id: str` - `enabled: bool` - `entry_id: str` - `profile_id: Optional[str]` This field is not used as the owning profile. For predefined entries it is already set to a predefined profile. ### Returns - `class PredefinedCreateResponse: …` - `id: str` - `confidence: Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `profile_id: Optional[str]` - `variant: Optional[Variant]` A Predefined AI prompt classification topic entry. - `class VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) predefined = client.zero_trust.dlp.entries.predefined.create( account_id="account_id", enabled=True, entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(predefined.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "confidence": { "ai_context_available": true, "available": true }, "enabled": true, "name": "name", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "variant": { "topic_type": "Intent", "type": "PromptTopic", "description": "description" } } } ``` ## Update predefined entry `zero_trust.dlp.entries.predefined.update(strentry_id, PredefinedUpdateParams**kwargs) -> PredefinedUpdateResponse` **put** `/accounts/{account_id}/dlp/entries/predefined/{entry_id}` Updates a DLP entry. ### Parameters - `account_id: str` - `entry_id: str` - `enabled: bool` ### Returns - `class PredefinedUpdateResponse: …` - `id: str` - `confidence: Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `profile_id: Optional[str]` - `variant: Optional[Variant]` A Predefined AI prompt classification topic entry. - `class VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) predefined = client.zero_trust.dlp.entries.predefined.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", enabled=True, ) print(predefined.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "confidence": { "ai_context_available": true, "available": true }, "enabled": true, "name": "name", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "variant": { "topic_type": "Intent", "type": "PromptTopic", "description": "description" } } } ``` ## Delete predefined entry `zero_trust.dlp.entries.predefined.delete(strentry_id, PredefinedDeleteParams**kwargs) -> object` **delete** `/accounts/{account_id}/dlp/entries/predefined/{entry_id}` This is a no-op as predefined entires can't be deleted but is needed for our generated terraform API. ### Parameters - `account_id: str` - `entry_id: str` ### Returns - `object` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) predefined = client.zero_trust.dlp.entries.predefined.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(predefined) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": {} } ``` ## Get DLP Entry `zero_trust.dlp.entries.predefined.get(strentry_id, PredefinedGetParams**kwargs) -> PredefinedGetResponse` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `account_id: str` - `entry_id: str` ### Returns - `PredefinedGetResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember0Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember2Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember4Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember5Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember6Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) predefined = client.zero_trust.dlp.entries.predefined.get( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(predefined) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries `zero_trust.dlp.entries.predefined.list(PredefinedListParams**kwargs) -> SyncSinglePage[PredefinedListResponse]` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `account_id: str` ### Returns - `PredefinedListResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dlp.entries.predefined.list( account_id="account_id", ) page = page.result[0] print(page) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Predefined Create Response - `class PredefinedCreateResponse: …` - `id: str` - `confidence: Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `profile_id: Optional[str]` - `variant: Optional[Variant]` A Predefined AI prompt classification topic entry. - `class VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. ### Predefined Update Response - `class PredefinedUpdateResponse: …` - `id: str` - `confidence: Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `profile_id: Optional[str]` - `variant: Optional[Variant]` A Predefined AI prompt classification topic entry. - `class VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. ### Predefined Get Response - `PredefinedGetResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember0Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember2Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember4Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember5Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember6Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Predefined List Response - `PredefinedListResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` # Integration ## Create integration entry `zero_trust.dlp.entries.integration.create(IntegrationCreateParams**kwargs) -> IntegrationCreateResponse` **post** `/accounts/{account_id}/dlp/entries/integration` Integration entries can't be created, this will update an existing integration entry. This is needed for our generated terraform API. ### Parameters - `account_id: str` - `enabled: bool` - `entry_id: str` - `profile_id: Optional[str]` This field is not used as the owning profile. For predefined entries it is already set to a predefined profile. ### Returns - `class IntegrationCreateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `updated_at: datetime` - `profile_id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) integration = client.zero_trust.dlp.entries.integration.create( account_id="account_id", enabled=True, entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(integration.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Update integration entry `zero_trust.dlp.entries.integration.update(strentry_id, IntegrationUpdateParams**kwargs) -> IntegrationUpdateResponse` **put** `/accounts/{account_id}/dlp/entries/integration/{entry_id}` Updates a DLP entry. ### Parameters - `account_id: str` - `entry_id: str` - `enabled: bool` ### Returns - `class IntegrationUpdateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `updated_at: datetime` - `profile_id: Optional[str]` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) integration = client.zero_trust.dlp.entries.integration.update( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", enabled=True, ) print(integration.id) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "updated_at": "2019-12-27T18:11:19.117Z", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Delete integration entry `zero_trust.dlp.entries.integration.delete(strentry_id, IntegrationDeleteParams**kwargs) -> object` **delete** `/accounts/{account_id}/dlp/entries/integration/{entry_id}` This is a no-op as integration entires can't be deleted but is needed for our generated terraform API. ### Parameters - `account_id: str` - `entry_id: str` ### Returns - `object` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) integration = client.zero_trust.dlp.entries.integration.delete( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(integration) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": {} } ``` ## Get DLP Entry `zero_trust.dlp.entries.integration.get(strentry_id, IntegrationGetParams**kwargs) -> IntegrationGetResponse` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `account_id: str` - `entry_id: str` ### Returns - `IntegrationGetResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember0Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember2Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember4Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember5Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember6Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) integration = client.zero_trust.dlp.entries.integration.get( entry_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", account_id="account_id", ) print(integration) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "profiles": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "name" } ], "upload_status": "empty" } } ``` ## List all entries `zero_trust.dlp.entries.integration.list(IntegrationListParams**kwargs) -> SyncSinglePage[IntegrationListResponse]` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `account_id: str` ### Returns - `IntegrationListResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Example ```python import os from cloudflare import Cloudflare client = Cloudflare( api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted ) page = client.zero_trust.dlp.entries.integration.list( account_id="account_id", ) page = page.result[0] print(page) ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "pattern": { "regex": "regex", "validation": "luhn" }, "type": "custom", "updated_at": "2019-12-27T18:11:19.117Z", "description": "description", "profile_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "upload_status": "empty" } ] } ``` ## Domain Types ### Integration Create Response - `class IntegrationCreateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `updated_at: datetime` - `profile_id: Optional[str]` ### Integration Update Response - `class IntegrationUpdateResponse: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `updated_at: datetime` - `profile_id: Optional[str]` ### Integration Get Response - `IntegrationGetResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember0Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember2Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember4Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `profiles: Optional[List[UnionMember5Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember6Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` ### Integration List Response - `IntegrationListResponse` - `class UnionMember0: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `pattern: Pattern` - `regex: str` - `validation: Optional[Literal["luhn"]]` - `"luhn"` - `type: Literal["custom"]` - `"custom"` - `updated_at: datetime` - `description: Optional[str]` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember1: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["custom_prompt_topic"]` - `"custom_prompt_topic"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember2: …` - `id: str` - `confidence: UnionMember2Confidence` - `ai_context_available: bool` Indicates whether this entry has AI remote service validation. - `available: bool` Indicates whether this entry has any form of validation that is not an AI remote service. - `enabled: bool` - `name: str` - `type: Literal["predefined"]` - `"predefined"` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember2Variant]` A Predefined AI prompt classification topic entry. - `class UnionMember2VariantUnionMember0: …` A Predefined AI prompt classification topic entry. - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` A customer-facing explanation of what this predefined AI prompt topic represents. - `class UnionMember2VariantUnionMember1: …` A general predefined entry. - `type: Literal["General"]` - `"General"` - `description: Optional[str]` A customer-facing explanation of what this predefined entry represents. - `class UnionMember3: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `case_sensitive: bool` Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true - `created_at: datetime` - `enabled: bool` - `name: str` - `secret: bool` - `type: Literal["exact_data"]` - `"exact_data"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember5: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `updated_at: datetime` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember6: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"`