# 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. # 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: SequenceNotStr[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[SequenceNotStr[str], str]` - `SequenceNotStr[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[SequenceNotStr[str], str]` - `SequenceNotStr[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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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[List[str]]]` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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": [ [ "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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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[List[str]]]` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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": [ [ "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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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[List[str]]]` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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[List[str]]]` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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": [ [ "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[SequenceNotStr[str]]` Data class IDs to associate with the profile. - `data_tags: Optional[SequenceNotStr[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: SequenceNotStr[str]` - `ocr_enabled: Optional[bool]` - `sensitivity_levels: Optional[Iterable[SequenceNotStr[str]]]` Sensitivity levels to associate with the profile as (group_id, level_id) tuples. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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[List[str]]]` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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": [ [ "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[SequenceNotStr[str]]` Data class IDs to associate with the profile. If omitted, existing associations are unchanged. - `data_tags: Optional[SequenceNotStr[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[SequenceNotStr[str]]]` Sensitivity levels to associate with the profile. If omitted, existing associations are unchanged. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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[List[str]]]` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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": [ [ "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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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[List[str]]]` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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[SequenceNotStr[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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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 dataset limits and scan quotas. ### Parameters - `account_id: str` ### Returns - `class LimitListResponse: …` - `max_dataset_cells: int` ### 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_dataset_cells) ``` #### 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_dataset_cells": 0 } } ``` ## Domain Types ### Limit List Response - `class LimitListResponse: …` - `max_dataset_cells: int` # 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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `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 UnionMember3: …` - `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 UnionMember4: …` - `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 UnionMember5: …` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `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"` - `class UnionMember3: …` - `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[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `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["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember5Profile]]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `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 UnionMember3: …` - `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 UnionMember4: …` - `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 UnionMember5: …` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `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"` - `class UnionMember3: …` - `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[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `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["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember5Profile]]` - `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 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `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"` - `class UnionMember3: …` - `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[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `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["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember5Profile]]` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `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 UnionMember3: …` - `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 UnionMember4: …` - `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 UnionMember5: …` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `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"` - `class UnionMember3: …` - `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[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `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["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember5Profile]]` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `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 UnionMember3: …` - `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 UnionMember4: …` - `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 UnionMember5: …` - `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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `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 ) 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `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 ) 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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `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"` - `class UnionMember3: …` - `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[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `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["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember5Profile]]` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `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 UnionMember3: …` - `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 UnionMember4: …` - `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 UnionMember5: …` - `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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` ### 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]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` ### 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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `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"` - `class UnionMember3: …` - `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[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `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["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember5Profile]]` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `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 UnionMember3: …` - `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 UnionMember4: …` - `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 UnionMember5: …` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `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"` - `class UnionMember3: …` - `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[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `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["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember5Profile]]` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `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 UnionMember3: …` - `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 UnionMember4: …` - `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 UnionMember5: …` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `variant: Optional[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["integration"]` - `"integration"` - `updated_at: datetime` - `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"` - `class UnionMember3: …` - `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[UnionMember3Profile]]` - `id: str` - `name: str` - `upload_status: Optional[Literal["empty", "uploading", "pending", 3 more]]` - `"empty"` - `"uploading"` - `"pending"` - `"processing"` - `"failed"` - `"complete"` - `class UnionMember4: …` - `id: str` - `created_at: datetime` - `enabled: bool` - `name: str` - `type: Literal["document_fingerprint"]` - `"document_fingerprint"` - `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["word_list"]` - `"word_list"` - `updated_at: datetime` - `word_list: object` - `profile_id: Optional[str]` - `profiles: Optional[List[UnionMember5Profile]]` - `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` - `confidence: UnionMember1Confidence` - `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[UnionMember1Variant]` - `topic_type: Literal["Intent", "Content"]` - `"Intent"` - `"Content"` - `type: Literal["PromptTopic"]` - `"PromptTopic"` - `description: Optional[str]` - `class UnionMember2: …` - `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 UnionMember3: …` - `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 UnionMember4: …` - `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 UnionMember5: …` - `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"`