# DLP # Datasets ## Fetch all datasets `client.ZeroTrust.DLP.Datasets.List(ctx, query) (*SinglePage[Dataset], error)` **get** `/accounts/{account_id}/dlp/datasets` Lists all DLP datasets configured for the account, including custom word lists and EDM datasets. ### Parameters - `query DLPDatasetListParams` - `AccountID param.Field[string]` ### Returns - `type Dataset struct{…}` - `ID string` - `Columns []DatasetColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DatasetColumnsUploadStatus` - `const DatasetColumnsUploadStatusEmpty DatasetColumnsUploadStatus = "empty"` - `const DatasetColumnsUploadStatusUploading DatasetColumnsUploadStatus = "uploading"` - `const DatasetColumnsUploadStatusPending DatasetColumnsUploadStatus = "pending"` - `const DatasetColumnsUploadStatusProcessing DatasetColumnsUploadStatus = "processing"` - `const DatasetColumnsUploadStatusFailed DatasetColumnsUploadStatus = "failed"` - `const DatasetColumnsUploadStatusComplete DatasetColumnsUploadStatus = "complete"` - `CreatedAt Time` - `EncodingVersion int64` - `Name string` - `NumCells int64` - `Secret bool` - `Status DatasetStatus` - `const DatasetStatusEmpty DatasetStatus = "empty"` - `const DatasetStatusUploading DatasetStatus = "uploading"` - `const DatasetStatusPending DatasetStatus = "pending"` - `const DatasetStatusProcessing DatasetStatus = "processing"` - `const DatasetStatusFailed DatasetStatus = "failed"` - `const DatasetStatusComplete DatasetStatus = "complete"` - `UpdatedAt Time` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `Uploads []DatasetUpload` - `NumCells int64` - `Status DatasetUploadsStatus` - `const DatasetUploadsStatusEmpty DatasetUploadsStatus = "empty"` - `const DatasetUploadsStatusUploading DatasetUploadsStatus = "uploading"` - `const DatasetUploadsStatusPending DatasetUploadsStatus = "pending"` - `const DatasetUploadsStatusProcessing DatasetUploadsStatus = "processing"` - `const DatasetUploadsStatusFailed DatasetUploadsStatus = "failed"` - `const DatasetUploadsStatusComplete DatasetUploadsStatus = "complete"` - `Version int64` - `CaseSensitive bool` - `Description string` The description of the dataset. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.ZeroTrust.DLP.Datasets.List(context.TODO(), zero_trust.DLPDatasetListParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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", "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 `client.ZeroTrust.DLP.Datasets.Get(ctx, datasetID, query) (*Dataset, error)` **get** `/accounts/{account_id}/dlp/datasets/{dataset_id}` Fetch a specific dataset ### Parameters - `datasetID string` - `query DLPDatasetGetParams` - `AccountID param.Field[string]` ### Returns - `type Dataset struct{…}` - `ID string` - `Columns []DatasetColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DatasetColumnsUploadStatus` - `const DatasetColumnsUploadStatusEmpty DatasetColumnsUploadStatus = "empty"` - `const DatasetColumnsUploadStatusUploading DatasetColumnsUploadStatus = "uploading"` - `const DatasetColumnsUploadStatusPending DatasetColumnsUploadStatus = "pending"` - `const DatasetColumnsUploadStatusProcessing DatasetColumnsUploadStatus = "processing"` - `const DatasetColumnsUploadStatusFailed DatasetColumnsUploadStatus = "failed"` - `const DatasetColumnsUploadStatusComplete DatasetColumnsUploadStatus = "complete"` - `CreatedAt Time` - `EncodingVersion int64` - `Name string` - `NumCells int64` - `Secret bool` - `Status DatasetStatus` - `const DatasetStatusEmpty DatasetStatus = "empty"` - `const DatasetStatusUploading DatasetStatus = "uploading"` - `const DatasetStatusPending DatasetStatus = "pending"` - `const DatasetStatusProcessing DatasetStatus = "processing"` - `const DatasetStatusFailed DatasetStatus = "failed"` - `const DatasetStatusComplete DatasetStatus = "complete"` - `UpdatedAt Time` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `Uploads []DatasetUpload` - `NumCells int64` - `Status DatasetUploadsStatus` - `const DatasetUploadsStatusEmpty DatasetUploadsStatus = "empty"` - `const DatasetUploadsStatusUploading DatasetUploadsStatus = "uploading"` - `const DatasetUploadsStatusPending DatasetUploadsStatus = "pending"` - `const DatasetUploadsStatusProcessing DatasetUploadsStatus = "processing"` - `const DatasetUploadsStatusFailed DatasetUploadsStatus = "failed"` - `const DatasetUploadsStatusComplete DatasetUploadsStatus = "complete"` - `Version int64` - `CaseSensitive bool` - `Description string` The description of the dataset. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) dataset, err := client.ZeroTrust.DLP.Datasets.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPDatasetGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Datasets.New(ctx, params) (*DatasetCreation, error)` **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 - `params DLPDatasetNewParams` - `AccountID param.Field[string]` Path param - `Name param.Field[string]` Body param - `CaseSensitive param.Field[bool]` Body param: 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 param.Field[string]` Body param: The description of the dataset. - `EncodingVersion param.Field[int64]` Body param: 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 param.Field[bool]` Body param: 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 - `type DatasetCreation struct{…}` - `Dataset Dataset` - `ID string` - `Columns []DatasetColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DatasetColumnsUploadStatus` - `const DatasetColumnsUploadStatusEmpty DatasetColumnsUploadStatus = "empty"` - `const DatasetColumnsUploadStatusUploading DatasetColumnsUploadStatus = "uploading"` - `const DatasetColumnsUploadStatusPending DatasetColumnsUploadStatus = "pending"` - `const DatasetColumnsUploadStatusProcessing DatasetColumnsUploadStatus = "processing"` - `const DatasetColumnsUploadStatusFailed DatasetColumnsUploadStatus = "failed"` - `const DatasetColumnsUploadStatusComplete DatasetColumnsUploadStatus = "complete"` - `CreatedAt Time` - `EncodingVersion int64` - `Name string` - `NumCells int64` - `Secret bool` - `Status DatasetStatus` - `const DatasetStatusEmpty DatasetStatus = "empty"` - `const DatasetStatusUploading DatasetStatus = "uploading"` - `const DatasetStatusPending DatasetStatus = "pending"` - `const DatasetStatusProcessing DatasetStatus = "processing"` - `const DatasetStatusFailed DatasetStatus = "failed"` - `const DatasetStatusComplete DatasetStatus = "complete"` - `UpdatedAt Time` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `Uploads []DatasetUpload` - `NumCells int64` - `Status DatasetUploadsStatus` - `const DatasetUploadsStatusEmpty DatasetUploadsStatus = "empty"` - `const DatasetUploadsStatusUploading DatasetUploadsStatus = "uploading"` - `const DatasetUploadsStatusPending DatasetUploadsStatus = "pending"` - `const DatasetUploadsStatusProcessing DatasetUploadsStatus = "processing"` - `const DatasetUploadsStatusFailed DatasetUploadsStatus = "failed"` - `const DatasetUploadsStatusComplete DatasetUploadsStatus = "complete"` - `Version int64` - `CaseSensitive bool` - `Description string` The description of the dataset. - `EncodingVersion int64` Encoding version to use for dataset. - `MaxCells int64` - `Version int64` The version to use when uploading the dataset. - `Secret string` The secret to use for Exact Data Match datasets. This is not present in Custom Wordlists. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) datasetCreation, err := client.ZeroTrust.DLP.Datasets.New(context.TODO(), zero_trust.DLPDatasetNewParams{ AccountID: cloudflare.F("account_id"), Name: cloudflare.F("name"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", datasetCreation.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 `client.ZeroTrust.DLP.Datasets.Update(ctx, datasetID, params) (*Dataset, error)` **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 - `datasetID string` - `params DLPDatasetUpdateParams` - `AccountID param.Field[string]` Path param - `CaseSensitive param.Field[bool]` Body param: Determines if the words should be matched in a case-sensitive manner. Only required for custom word lists. - `Description param.Field[string]` Body param: The description of the dataset. - `Name param.Field[string]` Body param: The name of the dataset, must be unique. ### Returns - `type Dataset struct{…}` - `ID string` - `Columns []DatasetColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DatasetColumnsUploadStatus` - `const DatasetColumnsUploadStatusEmpty DatasetColumnsUploadStatus = "empty"` - `const DatasetColumnsUploadStatusUploading DatasetColumnsUploadStatus = "uploading"` - `const DatasetColumnsUploadStatusPending DatasetColumnsUploadStatus = "pending"` - `const DatasetColumnsUploadStatusProcessing DatasetColumnsUploadStatus = "processing"` - `const DatasetColumnsUploadStatusFailed DatasetColumnsUploadStatus = "failed"` - `const DatasetColumnsUploadStatusComplete DatasetColumnsUploadStatus = "complete"` - `CreatedAt Time` - `EncodingVersion int64` - `Name string` - `NumCells int64` - `Secret bool` - `Status DatasetStatus` - `const DatasetStatusEmpty DatasetStatus = "empty"` - `const DatasetStatusUploading DatasetStatus = "uploading"` - `const DatasetStatusPending DatasetStatus = "pending"` - `const DatasetStatusProcessing DatasetStatus = "processing"` - `const DatasetStatusFailed DatasetStatus = "failed"` - `const DatasetStatusComplete DatasetStatus = "complete"` - `UpdatedAt Time` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `Uploads []DatasetUpload` - `NumCells int64` - `Status DatasetUploadsStatus` - `const DatasetUploadsStatusEmpty DatasetUploadsStatus = "empty"` - `const DatasetUploadsStatusUploading DatasetUploadsStatus = "uploading"` - `const DatasetUploadsStatusPending DatasetUploadsStatus = "pending"` - `const DatasetUploadsStatusProcessing DatasetUploadsStatus = "processing"` - `const DatasetUploadsStatusFailed DatasetUploadsStatus = "failed"` - `const DatasetUploadsStatusComplete DatasetUploadsStatus = "complete"` - `Version int64` - `CaseSensitive bool` - `Description string` The description of the dataset. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) dataset, err := client.ZeroTrust.DLP.Datasets.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPDatasetUpdateParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Datasets.Delete(ctx, datasetID, body) error` **delete** `/accounts/{account_id}/dlp/datasets/{dataset_id}` This deletes all versions of the dataset. ### Parameters - `datasetID string` - `body DLPDatasetDeleteParams` - `AccountID param.Field[string]` ### Example ```go package main import ( "context" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) err := client.ZeroTrust.DLP.Datasets.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPDatasetDeleteParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } } ``` ## Domain Types ### Dataset - `type Dataset struct{…}` - `ID string` - `Columns []DatasetColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DatasetColumnsUploadStatus` - `const DatasetColumnsUploadStatusEmpty DatasetColumnsUploadStatus = "empty"` - `const DatasetColumnsUploadStatusUploading DatasetColumnsUploadStatus = "uploading"` - `const DatasetColumnsUploadStatusPending DatasetColumnsUploadStatus = "pending"` - `const DatasetColumnsUploadStatusProcessing DatasetColumnsUploadStatus = "processing"` - `const DatasetColumnsUploadStatusFailed DatasetColumnsUploadStatus = "failed"` - `const DatasetColumnsUploadStatusComplete DatasetColumnsUploadStatus = "complete"` - `CreatedAt Time` - `EncodingVersion int64` - `Name string` - `NumCells int64` - `Secret bool` - `Status DatasetStatus` - `const DatasetStatusEmpty DatasetStatus = "empty"` - `const DatasetStatusUploading DatasetStatus = "uploading"` - `const DatasetStatusPending DatasetStatus = "pending"` - `const DatasetStatusProcessing DatasetStatus = "processing"` - `const DatasetStatusFailed DatasetStatus = "failed"` - `const DatasetStatusComplete DatasetStatus = "complete"` - `UpdatedAt Time` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `Uploads []DatasetUpload` - `NumCells int64` - `Status DatasetUploadsStatus` - `const DatasetUploadsStatusEmpty DatasetUploadsStatus = "empty"` - `const DatasetUploadsStatusUploading DatasetUploadsStatus = "uploading"` - `const DatasetUploadsStatusPending DatasetUploadsStatus = "pending"` - `const DatasetUploadsStatusProcessing DatasetUploadsStatus = "processing"` - `const DatasetUploadsStatusFailed DatasetUploadsStatus = "failed"` - `const DatasetUploadsStatusComplete DatasetUploadsStatus = "complete"` - `Version int64` - `CaseSensitive bool` - `Description string` The description of the dataset. ### Dataset Array - `type DatasetArray []Dataset` - `ID string` - `Columns []DatasetColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DatasetColumnsUploadStatus` - `const DatasetColumnsUploadStatusEmpty DatasetColumnsUploadStatus = "empty"` - `const DatasetColumnsUploadStatusUploading DatasetColumnsUploadStatus = "uploading"` - `const DatasetColumnsUploadStatusPending DatasetColumnsUploadStatus = "pending"` - `const DatasetColumnsUploadStatusProcessing DatasetColumnsUploadStatus = "processing"` - `const DatasetColumnsUploadStatusFailed DatasetColumnsUploadStatus = "failed"` - `const DatasetColumnsUploadStatusComplete DatasetColumnsUploadStatus = "complete"` - `CreatedAt Time` - `EncodingVersion int64` - `Name string` - `NumCells int64` - `Secret bool` - `Status DatasetStatus` - `const DatasetStatusEmpty DatasetStatus = "empty"` - `const DatasetStatusUploading DatasetStatus = "uploading"` - `const DatasetStatusPending DatasetStatus = "pending"` - `const DatasetStatusProcessing DatasetStatus = "processing"` - `const DatasetStatusFailed DatasetStatus = "failed"` - `const DatasetStatusComplete DatasetStatus = "complete"` - `UpdatedAt Time` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `Uploads []DatasetUpload` - `NumCells int64` - `Status DatasetUploadsStatus` - `const DatasetUploadsStatusEmpty DatasetUploadsStatus = "empty"` - `const DatasetUploadsStatusUploading DatasetUploadsStatus = "uploading"` - `const DatasetUploadsStatusPending DatasetUploadsStatus = "pending"` - `const DatasetUploadsStatusProcessing DatasetUploadsStatus = "processing"` - `const DatasetUploadsStatusFailed DatasetUploadsStatus = "failed"` - `const DatasetUploadsStatusComplete DatasetUploadsStatus = "complete"` - `Version int64` - `CaseSensitive bool` - `Description string` The description of the dataset. ### Dataset Creation - `type DatasetCreation struct{…}` - `Dataset Dataset` - `ID string` - `Columns []DatasetColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DatasetColumnsUploadStatus` - `const DatasetColumnsUploadStatusEmpty DatasetColumnsUploadStatus = "empty"` - `const DatasetColumnsUploadStatusUploading DatasetColumnsUploadStatus = "uploading"` - `const DatasetColumnsUploadStatusPending DatasetColumnsUploadStatus = "pending"` - `const DatasetColumnsUploadStatusProcessing DatasetColumnsUploadStatus = "processing"` - `const DatasetColumnsUploadStatusFailed DatasetColumnsUploadStatus = "failed"` - `const DatasetColumnsUploadStatusComplete DatasetColumnsUploadStatus = "complete"` - `CreatedAt Time` - `EncodingVersion int64` - `Name string` - `NumCells int64` - `Secret bool` - `Status DatasetStatus` - `const DatasetStatusEmpty DatasetStatus = "empty"` - `const DatasetStatusUploading DatasetStatus = "uploading"` - `const DatasetStatusPending DatasetStatus = "pending"` - `const DatasetStatusProcessing DatasetStatus = "processing"` - `const DatasetStatusFailed DatasetStatus = "failed"` - `const DatasetStatusComplete DatasetStatus = "complete"` - `UpdatedAt Time` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `Uploads []DatasetUpload` - `NumCells int64` - `Status DatasetUploadsStatus` - `const DatasetUploadsStatusEmpty DatasetUploadsStatus = "empty"` - `const DatasetUploadsStatusUploading DatasetUploadsStatus = "uploading"` - `const DatasetUploadsStatusPending DatasetUploadsStatus = "pending"` - `const DatasetUploadsStatusProcessing DatasetUploadsStatus = "processing"` - `const DatasetUploadsStatusFailed DatasetUploadsStatus = "failed"` - `const DatasetUploadsStatusComplete DatasetUploadsStatus = "complete"` - `Version int64` - `CaseSensitive bool` - `Description string` The description of the dataset. - `EncodingVersion int64` Encoding version to use for dataset. - `MaxCells int64` - `Version int64` The version to use when uploading the dataset. - `Secret string` 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 `client.ZeroTrust.DLP.Datasets.Upload.New(ctx, datasetID, body) (*NewVersion, error)` **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 - `datasetID string` - `body DLPDatasetUploadNewParams` - `AccountID param.Field[string]` ### Returns - `type NewVersion struct{…}` - `EncodingVersion int64` - `MaxCells int64` - `Version int64` - `CaseSensitive bool` - `Columns []NewVersionColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus NewVersionColumnsUploadStatus` - `const NewVersionColumnsUploadStatusEmpty NewVersionColumnsUploadStatus = "empty"` - `const NewVersionColumnsUploadStatusUploading NewVersionColumnsUploadStatus = "uploading"` - `const NewVersionColumnsUploadStatusPending NewVersionColumnsUploadStatus = "pending"` - `const NewVersionColumnsUploadStatusProcessing NewVersionColumnsUploadStatus = "processing"` - `const NewVersionColumnsUploadStatusFailed NewVersionColumnsUploadStatus = "failed"` - `const NewVersionColumnsUploadStatusComplete NewVersionColumnsUploadStatus = "complete"` - `Secret string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) newVersion, err := client.ZeroTrust.DLP.Datasets.Upload.New( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPDatasetUploadNewParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", newVersion.EncodingVersion) } ``` #### 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 `client.ZeroTrust.DLP.Datasets.Upload.Edit(ctx, datasetID, version, dataset, params) (*Dataset, error)` **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 - `datasetID string` - `version int64` - `dataset Reader` - `params DLPDatasetUploadEditParams` - `AccountID param.Field[string]` Path param ### Returns - `type Dataset struct{…}` - `ID string` - `Columns []DatasetColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DatasetColumnsUploadStatus` - `const DatasetColumnsUploadStatusEmpty DatasetColumnsUploadStatus = "empty"` - `const DatasetColumnsUploadStatusUploading DatasetColumnsUploadStatus = "uploading"` - `const DatasetColumnsUploadStatusPending DatasetColumnsUploadStatus = "pending"` - `const DatasetColumnsUploadStatusProcessing DatasetColumnsUploadStatus = "processing"` - `const DatasetColumnsUploadStatusFailed DatasetColumnsUploadStatus = "failed"` - `const DatasetColumnsUploadStatusComplete DatasetColumnsUploadStatus = "complete"` - `CreatedAt Time` - `EncodingVersion int64` - `Name string` - `NumCells int64` - `Secret bool` - `Status DatasetStatus` - `const DatasetStatusEmpty DatasetStatus = "empty"` - `const DatasetStatusUploading DatasetStatus = "uploading"` - `const DatasetStatusPending DatasetStatus = "pending"` - `const DatasetStatusProcessing DatasetStatus = "processing"` - `const DatasetStatusFailed DatasetStatus = "failed"` - `const DatasetStatusComplete DatasetStatus = "complete"` - `UpdatedAt Time` Stores when the dataset was last updated. This includes name or description changes as well as uploads. - `Uploads []DatasetUpload` - `NumCells int64` - `Status DatasetUploadsStatus` - `const DatasetUploadsStatusEmpty DatasetUploadsStatus = "empty"` - `const DatasetUploadsStatusUploading DatasetUploadsStatus = "uploading"` - `const DatasetUploadsStatusPending DatasetUploadsStatus = "pending"` - `const DatasetUploadsStatusProcessing DatasetUploadsStatus = "processing"` - `const DatasetUploadsStatusFailed DatasetUploadsStatus = "failed"` - `const DatasetUploadsStatusComplete DatasetUploadsStatus = "complete"` - `Version int64` - `CaseSensitive bool` - `Description string` The description of the dataset. ### Example ```go package main import ( "bytes" "context" "fmt" "io" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) dataset, err := client.ZeroTrust.DLP.Datasets.Upload.Edit( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", int64(0), io.Reader(bytes.NewBuffer([]byte("Example data"))), zero_trust.DLPDatasetUploadEditParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 - `type NewVersion struct{…}` - `EncodingVersion int64` - `MaxCells int64` - `Version int64` - `CaseSensitive bool` - `Columns []NewVersionColumn` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus NewVersionColumnsUploadStatus` - `const NewVersionColumnsUploadStatusEmpty NewVersionColumnsUploadStatus = "empty"` - `const NewVersionColumnsUploadStatusUploading NewVersionColumnsUploadStatus = "uploading"` - `const NewVersionColumnsUploadStatusPending NewVersionColumnsUploadStatus = "pending"` - `const NewVersionColumnsUploadStatusProcessing NewVersionColumnsUploadStatus = "processing"` - `const NewVersionColumnsUploadStatusFailed NewVersionColumnsUploadStatus = "failed"` - `const NewVersionColumnsUploadStatusComplete NewVersionColumnsUploadStatus = "complete"` - `Secret string` # Versions ## Sets the column information for a multi-column upload `client.ZeroTrust.DLP.Datasets.Versions.New(ctx, datasetID, version, params) (*SinglePage[DLPDatasetVersionNewResponse], error)` **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 - `datasetID string` - `version int64` - `params DLPDatasetVersionNewParams` - `AccountID param.Field[string]` Path param - `Body param.Field[[]DLPDatasetVersionNewParamsBody]` Body param - `type DLPDatasetVersionNewParamsBodyExistingColumn struct{…}` - `EntryID string` - `HeaderName string` - `NumCells int64` - `type DLPDatasetVersionNewParamsBodyNewColumn struct{…}` - `EntryName string` - `HeaderName string` - `NumCells int64` ### Returns - `type DLPDatasetVersionNewResponse struct{…}` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DLPDatasetVersionNewResponseUploadStatus` - `const DLPDatasetVersionNewResponseUploadStatusEmpty DLPDatasetVersionNewResponseUploadStatus = "empty"` - `const DLPDatasetVersionNewResponseUploadStatusUploading DLPDatasetVersionNewResponseUploadStatus = "uploading"` - `const DLPDatasetVersionNewResponseUploadStatusPending DLPDatasetVersionNewResponseUploadStatus = "pending"` - `const DLPDatasetVersionNewResponseUploadStatusProcessing DLPDatasetVersionNewResponseUploadStatus = "processing"` - `const DLPDatasetVersionNewResponseUploadStatusFailed DLPDatasetVersionNewResponseUploadStatus = "failed"` - `const DLPDatasetVersionNewResponseUploadStatusComplete DLPDatasetVersionNewResponseUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.ZeroTrust.DLP.Datasets.Versions.New( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", int64(0), zero_trust.DLPDatasetVersionNewParams{ AccountID: cloudflare.F("account_id"), Body: []zero_trust.DLPDatasetVersionNewParamsBodyUnion{zero_trust.DLPDatasetVersionNewParamsBodyExistingColumn{ EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }}, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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": [ { "entry_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "header_name": "header_name", "num_cells": 0, "upload_status": "empty" } ] } ``` # Entries ## Upload a new version of a multi-column dataset `client.ZeroTrust.DLP.Datasets.Versions.Entries.New(ctx, datasetID, version, entryID, datasetVersionEntry, params) (*DLPDatasetVersionEntryNewResponse, error)` **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 - `datasetID string` - `version int64` - `entryID string` - `datasetVersionEntry Reader` - `params DLPDatasetVersionEntryNewParams` - `AccountID param.Field[string]` Path param ### Returns - `type DLPDatasetVersionEntryNewResponse struct{…}` - `EntryID string` - `HeaderName string` - `NumCells int64` - `UploadStatus DLPDatasetVersionEntryNewResponseUploadStatus` - `const DLPDatasetVersionEntryNewResponseUploadStatusEmpty DLPDatasetVersionEntryNewResponseUploadStatus = "empty"` - `const DLPDatasetVersionEntryNewResponseUploadStatusUploading DLPDatasetVersionEntryNewResponseUploadStatus = "uploading"` - `const DLPDatasetVersionEntryNewResponseUploadStatusPending DLPDatasetVersionEntryNewResponseUploadStatus = "pending"` - `const DLPDatasetVersionEntryNewResponseUploadStatusProcessing DLPDatasetVersionEntryNewResponseUploadStatus = "processing"` - `const DLPDatasetVersionEntryNewResponseUploadStatusFailed DLPDatasetVersionEntryNewResponseUploadStatus = "failed"` - `const DLPDatasetVersionEntryNewResponseUploadStatusComplete DLPDatasetVersionEntryNewResponseUploadStatus = "complete"` ### Example ```go package main import ( "bytes" "context" "fmt" "io" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) entry, err := client.ZeroTrust.DLP.Datasets.Versions.Entries.New( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", int64(0), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", io.Reader(bytes.NewBuffer([]byte("Example data"))), zero_trust.DLPDatasetVersionEntryNewParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", entry.EntryID) } ``` #### 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" } } ``` # Patterns ## Validate a DLP regex pattern `client.ZeroTrust.DLP.Patterns.Validate(ctx, params) (*DLPPatternValidateResponse, error)` **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 - `params DLPPatternValidateParams` - `AccountID param.Field[string]` Path param: Account ID. - `Regex param.Field[string]` Body param - `MaxMatchBytes param.Field[int64]` Body param: 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 - `type DLPPatternValidateResponse struct{…}` - `Valid bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.ZeroTrust.DLP.Patterns.Validate(context.TODO(), zero_trust.DLPPatternValidateParams{ AccountID: cloudflare.F("account_id"), Regex: cloudflare.F("regex"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 } } ``` # Payload Logs ## Get payload log settings `client.ZeroTrust.DLP.PayloadLogs.Get(ctx, query) (*DLPPayloadLogGetResponse, error)` **get** `/accounts/{account_id}/dlp/payload_log` Gets the current payload logging configuration for DLP, showing whether matched content is being logged. ### Parameters - `query DLPPayloadLogGetParams` - `AccountID param.Field[string]` ### Returns - `type DLPPayloadLogGetResponse struct{…}` - `UpdatedAt Time` - `MaskingLevel DLPPayloadLogGetResponseMaskingLevel` 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. - `const DLPPayloadLogGetResponseMaskingLevelFull DLPPayloadLogGetResponseMaskingLevel = "full"` - `const DLPPayloadLogGetResponseMaskingLevelPartial DLPPayloadLogGetResponseMaskingLevel = "partial"` - `const DLPPayloadLogGetResponseMaskingLevelClear DLPPayloadLogGetResponseMaskingLevel = "clear"` - `const DLPPayloadLogGetResponseMaskingLevelDefault DLPPayloadLogGetResponseMaskingLevel = "default"` - `PublicKey string` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) payloadLog, err := client.ZeroTrust.DLP.PayloadLogs.Get(context.TODO(), zero_trust.DLPPayloadLogGetParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", payloadLog.UpdatedAt) } ``` #### 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 `client.ZeroTrust.DLP.PayloadLogs.Update(ctx, params) (*DLPPayloadLogUpdateResponse, error)` **put** `/accounts/{account_id}/dlp/payload_log` Enables or disables payload logging for DLP matches. When enabled, matched content is stored for review. ### Parameters - `params DLPPayloadLogUpdateParams` - `AccountID param.Field[string]` Path param - `MaskingLevel param.Field[DLPPayloadLogUpdateParamsMaskingLevel]` Body param: 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. - `const DLPPayloadLogUpdateParamsMaskingLevelFull DLPPayloadLogUpdateParamsMaskingLevel = "full"` - `const DLPPayloadLogUpdateParamsMaskingLevelPartial DLPPayloadLogUpdateParamsMaskingLevel = "partial"` - `const DLPPayloadLogUpdateParamsMaskingLevelClear DLPPayloadLogUpdateParamsMaskingLevel = "clear"` - `const DLPPayloadLogUpdateParamsMaskingLevelDefault DLPPayloadLogUpdateParamsMaskingLevel = "default"` - `PublicKey param.Field[string]` Body param: 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 - `type DLPPayloadLogUpdateResponse struct{…}` - `UpdatedAt Time` - `MaskingLevel DLPPayloadLogUpdateResponseMaskingLevel` 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. - `const DLPPayloadLogUpdateResponseMaskingLevelFull DLPPayloadLogUpdateResponseMaskingLevel = "full"` - `const DLPPayloadLogUpdateResponseMaskingLevelPartial DLPPayloadLogUpdateResponseMaskingLevel = "partial"` - `const DLPPayloadLogUpdateResponseMaskingLevelClear DLPPayloadLogUpdateResponseMaskingLevel = "clear"` - `const DLPPayloadLogUpdateResponseMaskingLevelDefault DLPPayloadLogUpdateResponseMaskingLevel = "default"` - `PublicKey string` Base64-encoded public key for encrypting payload logs. Null when payload logging is disabled. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) payloadLog, err := client.ZeroTrust.DLP.PayloadLogs.Update(context.TODO(), zero_trust.DLPPayloadLogUpdateParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", payloadLog.UpdatedAt) } ``` #### 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" } } ``` # Email # Account Mapping ## Get mapping `client.ZeroTrust.DLP.Email.AccountMapping.Get(ctx, query) (*DLPEmailAccountMappingGetResponse, error)` **get** `/accounts/{account_id}/dlp/email/account_mapping` Retrieves the email provider mapping configuration for DLP email scanning. ### Parameters - `query DLPEmailAccountMappingGetParams` - `AccountID param.Field[string]` ### Returns - `type DLPEmailAccountMappingGetResponse struct{…}` - `AddinIdentifierToken string` - `AuthRequirements DLPEmailAccountMappingGetResponseAuthRequirements` - `type DLPEmailAccountMappingGetResponseAuthRequirementsObject struct{…}` - `AllowedMicrosoftOrganizations []string` - `Type DLPEmailAccountMappingGetResponseAuthRequirementsObjectType` - `const DLPEmailAccountMappingGetResponseAuthRequirementsObjectTypeOrg DLPEmailAccountMappingGetResponseAuthRequirementsObjectType = "Org"` - `type DLPEmailAccountMappingGetResponseAuthRequirementsType struct{…}` - `Type DLPEmailAccountMappingGetResponseAuthRequirementsTypeType` - `const DLPEmailAccountMappingGetResponseAuthRequirementsTypeTypeNoAuth DLPEmailAccountMappingGetResponseAuthRequirementsTypeType = "NoAuth"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) accountMapping, err := client.ZeroTrust.DLP.Email.AccountMapping.Get(context.TODO(), zero_trust.DLPEmailAccountMappingGetParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", accountMapping.AddinIdentifierToken) } ``` #### 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 `client.ZeroTrust.DLP.Email.AccountMapping.New(ctx, params) (*DLPEmailAccountMappingNewResponse, error)` **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 - `params DLPEmailAccountMappingNewParams` - `AccountID param.Field[string]` Path param - `AuthRequirements param.Field[DLPEmailAccountMappingNewParamsAuthRequirements]` Body param - `type DLPEmailAccountMappingNewParamsAuthRequirementsObject struct{…}` - `AllowedMicrosoftOrganizations []string` - `Type DLPEmailAccountMappingNewParamsAuthRequirementsObjectType` - `const DLPEmailAccountMappingNewParamsAuthRequirementsObjectTypeOrg DLPEmailAccountMappingNewParamsAuthRequirementsObjectType = "Org"` - `type DLPEmailAccountMappingNewParamsAuthRequirementsType struct{…}` - `Type DLPEmailAccountMappingNewParamsAuthRequirementsTypeType` - `const DLPEmailAccountMappingNewParamsAuthRequirementsTypeTypeNoAuth DLPEmailAccountMappingNewParamsAuthRequirementsTypeType = "NoAuth"` ### Returns - `type DLPEmailAccountMappingNewResponse struct{…}` - `AddinIdentifierToken string` - `AuthRequirements DLPEmailAccountMappingNewResponseAuthRequirements` - `type DLPEmailAccountMappingNewResponseAuthRequirementsObject struct{…}` - `AllowedMicrosoftOrganizations []string` - `Type DLPEmailAccountMappingNewResponseAuthRequirementsObjectType` - `const DLPEmailAccountMappingNewResponseAuthRequirementsObjectTypeOrg DLPEmailAccountMappingNewResponseAuthRequirementsObjectType = "Org"` - `type DLPEmailAccountMappingNewResponseAuthRequirementsType struct{…}` - `Type DLPEmailAccountMappingNewResponseAuthRequirementsTypeType` - `const DLPEmailAccountMappingNewResponseAuthRequirementsTypeTypeNoAuth DLPEmailAccountMappingNewResponseAuthRequirementsTypeType = "NoAuth"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) accountMapping, err := client.ZeroTrust.DLP.Email.AccountMapping.New(context.TODO(), zero_trust.DLPEmailAccountMappingNewParams{ AccountID: cloudflare.F("account_id"), AuthRequirements: cloudflare.F[zero_trust.DLPEmailAccountMappingNewParamsAuthRequirementsUnion](zero_trust.DLPEmailAccountMappingNewParamsAuthRequirementsObject{ AllowedMicrosoftOrganizations: cloudflare.F([]string{"string"}), Type: cloudflare.F(zero_trust.DLPEmailAccountMappingNewParamsAuthRequirementsObjectTypeOrg), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", accountMapping.AddinIdentifierToken) } ``` #### 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" } } } ``` # Rules ## List all email scanner rules `client.ZeroTrust.DLP.Email.Rules.List(ctx, query) (*SinglePage[DLPEmailRuleListResponse], error)` **get** `/accounts/{account_id}/dlp/email/rules` Lists all email scanner rules for an account. ### Parameters - `query DLPEmailRuleListParams` - `AccountID param.Field[string]` ### Returns - `type DLPEmailRuleListResponse struct{…}` - `Action DLPEmailRuleListResponseAction` - `Action DLPEmailRuleListResponseActionAction` - `const DLPEmailRuleListResponseActionActionBlock DLPEmailRuleListResponseActionAction = "Block"` - `Message string` - `Conditions []DLPEmailRuleListResponseCondition` Triggered if all conditions match. - `Operator DLPEmailRuleListResponseConditionsOperator` - `const DLPEmailRuleListResponseConditionsOperatorInList DLPEmailRuleListResponseConditionsOperator = "InList"` - `const DLPEmailRuleListResponseConditionsOperatorNotInList DLPEmailRuleListResponseConditionsOperator = "NotInList"` - `const DLPEmailRuleListResponseConditionsOperatorMatchRegex DLPEmailRuleListResponseConditionsOperator = "MatchRegex"` - `const DLPEmailRuleListResponseConditionsOperatorNotMatchRegex DLPEmailRuleListResponseConditionsOperator = "NotMatchRegex"` - `Selector DLPEmailRuleListResponseConditionsSelector` - `const DLPEmailRuleListResponseConditionsSelectorRecipients DLPEmailRuleListResponseConditionsSelector = "Recipients"` - `const DLPEmailRuleListResponseConditionsSelectorSender DLPEmailRuleListResponseConditionsSelector = "Sender"` - `const DLPEmailRuleListResponseConditionsSelectorDLPProfiles DLPEmailRuleListResponseConditionsSelector = "DLPProfiles"` - `Value DLPEmailRuleListResponseConditionsValueUnion` - `type DLPEmailRuleListResponseConditionsValueArray []string` - `UnionString` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Priority int64` - `RuleID string` - `UpdatedAt Time` - `Description string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.ZeroTrust.DLP.Email.Rules.List(context.TODO(), zero_trust.DLPEmailRuleListParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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": [ { "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 `client.ZeroTrust.DLP.Email.Rules.Get(ctx, ruleID, query) (*DLPEmailRuleGetResponse, error)` **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 - `ruleID string` - `query DLPEmailRuleGetParams` - `AccountID param.Field[string]` ### Returns - `type DLPEmailRuleGetResponse struct{…}` - `Action DLPEmailRuleGetResponseAction` - `Action DLPEmailRuleGetResponseActionAction` - `const DLPEmailRuleGetResponseActionActionBlock DLPEmailRuleGetResponseActionAction = "Block"` - `Message string` - `Conditions []DLPEmailRuleGetResponseCondition` Triggered if all conditions match. - `Operator DLPEmailRuleGetResponseConditionsOperator` - `const DLPEmailRuleGetResponseConditionsOperatorInList DLPEmailRuleGetResponseConditionsOperator = "InList"` - `const DLPEmailRuleGetResponseConditionsOperatorNotInList DLPEmailRuleGetResponseConditionsOperator = "NotInList"` - `const DLPEmailRuleGetResponseConditionsOperatorMatchRegex DLPEmailRuleGetResponseConditionsOperator = "MatchRegex"` - `const DLPEmailRuleGetResponseConditionsOperatorNotMatchRegex DLPEmailRuleGetResponseConditionsOperator = "NotMatchRegex"` - `Selector DLPEmailRuleGetResponseConditionsSelector` - `const DLPEmailRuleGetResponseConditionsSelectorRecipients DLPEmailRuleGetResponseConditionsSelector = "Recipients"` - `const DLPEmailRuleGetResponseConditionsSelectorSender DLPEmailRuleGetResponseConditionsSelector = "Sender"` - `const DLPEmailRuleGetResponseConditionsSelectorDLPProfiles DLPEmailRuleGetResponseConditionsSelector = "DLPProfiles"` - `Value DLPEmailRuleGetResponseConditionsValueUnion` - `type DLPEmailRuleGetResponseConditionsValueArray []string` - `UnionString` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Priority int64` - `RuleID string` - `UpdatedAt Time` - `Description string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) rule, err := client.ZeroTrust.DLP.Email.Rules.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEmailRuleGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", rule.RuleID) } ``` #### 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 `client.ZeroTrust.DLP.Email.Rules.New(ctx, params) (*DLPEmailRuleNewResponse, error)` **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 - `params DLPEmailRuleNewParams` - `AccountID param.Field[string]` Path param - `Action param.Field[DLPEmailRuleNewParamsAction]` Body param - `Action DLPEmailRuleNewParamsActionAction` - `const DLPEmailRuleNewParamsActionActionBlock DLPEmailRuleNewParamsActionAction = "Block"` - `Message string` - `Conditions param.Field[[]DLPEmailRuleNewParamsCondition]` Body param: Triggered if all conditions match. - `Operator DLPEmailRuleNewParamsConditionsOperator` - `const DLPEmailRuleNewParamsConditionsOperatorInList DLPEmailRuleNewParamsConditionsOperator = "InList"` - `const DLPEmailRuleNewParamsConditionsOperatorNotInList DLPEmailRuleNewParamsConditionsOperator = "NotInList"` - `const DLPEmailRuleNewParamsConditionsOperatorMatchRegex DLPEmailRuleNewParamsConditionsOperator = "MatchRegex"` - `const DLPEmailRuleNewParamsConditionsOperatorNotMatchRegex DLPEmailRuleNewParamsConditionsOperator = "NotMatchRegex"` - `Selector DLPEmailRuleNewParamsConditionsSelector` - `const DLPEmailRuleNewParamsConditionsSelectorRecipients DLPEmailRuleNewParamsConditionsSelector = "Recipients"` - `const DLPEmailRuleNewParamsConditionsSelectorSender DLPEmailRuleNewParamsConditionsSelector = "Sender"` - `const DLPEmailRuleNewParamsConditionsSelectorDLPProfiles DLPEmailRuleNewParamsConditionsSelector = "DLPProfiles"` - `Value DLPEmailRuleNewParamsConditionsValueUnion` - `type DLPEmailRuleNewParamsConditionsValueArray []string` - `UnionString` - `Enabled param.Field[bool]` Body param - `Name param.Field[string]` Body param - `Description param.Field[string]` Body param ### Returns - `type DLPEmailRuleNewResponse struct{…}` - `Action DLPEmailRuleNewResponseAction` - `Action DLPEmailRuleNewResponseActionAction` - `const DLPEmailRuleNewResponseActionActionBlock DLPEmailRuleNewResponseActionAction = "Block"` - `Message string` - `Conditions []DLPEmailRuleNewResponseCondition` Triggered if all conditions match. - `Operator DLPEmailRuleNewResponseConditionsOperator` - `const DLPEmailRuleNewResponseConditionsOperatorInList DLPEmailRuleNewResponseConditionsOperator = "InList"` - `const DLPEmailRuleNewResponseConditionsOperatorNotInList DLPEmailRuleNewResponseConditionsOperator = "NotInList"` - `const DLPEmailRuleNewResponseConditionsOperatorMatchRegex DLPEmailRuleNewResponseConditionsOperator = "MatchRegex"` - `const DLPEmailRuleNewResponseConditionsOperatorNotMatchRegex DLPEmailRuleNewResponseConditionsOperator = "NotMatchRegex"` - `Selector DLPEmailRuleNewResponseConditionsSelector` - `const DLPEmailRuleNewResponseConditionsSelectorRecipients DLPEmailRuleNewResponseConditionsSelector = "Recipients"` - `const DLPEmailRuleNewResponseConditionsSelectorSender DLPEmailRuleNewResponseConditionsSelector = "Sender"` - `const DLPEmailRuleNewResponseConditionsSelectorDLPProfiles DLPEmailRuleNewResponseConditionsSelector = "DLPProfiles"` - `Value DLPEmailRuleNewResponseConditionsValueUnion` - `type DLPEmailRuleNewResponseConditionsValueArray []string` - `UnionString` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Priority int64` - `RuleID string` - `UpdatedAt Time` - `Description string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) rule, err := client.ZeroTrust.DLP.Email.Rules.New(context.TODO(), zero_trust.DLPEmailRuleNewParams{ AccountID: cloudflare.F("account_id"), Action: cloudflare.F(zero_trust.DLPEmailRuleNewParamsAction{ Action: cloudflare.F(zero_trust.DLPEmailRuleNewParamsActionActionBlock), }), Conditions: cloudflare.F([]zero_trust.DLPEmailRuleNewParamsCondition{zero_trust.DLPEmailRuleNewParamsCondition{ Operator: cloudflare.F(zero_trust.DLPEmailRuleNewParamsConditionsOperatorInList), Selector: cloudflare.F(zero_trust.DLPEmailRuleNewParamsConditionsSelectorRecipients), Value: cloudflare.F[zero_trust.DLPEmailRuleNewParamsConditionsValueUnion](zero_trust.DLPEmailRuleNewParamsConditionsValueArray([]string{"string"})), }}), Enabled: cloudflare.F(true), Name: cloudflare.F("name"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", rule.RuleID) } ``` #### 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 `client.ZeroTrust.DLP.Email.Rules.Update(ctx, ruleID, params) (*DLPEmailRuleUpdateResponse, error)` **put** `/accounts/{account_id}/dlp/email/rules/{rule_id}` Update email scanner rule ### Parameters - `ruleID string` - `params DLPEmailRuleUpdateParams` - `AccountID param.Field[string]` Path param - `Action param.Field[DLPEmailRuleUpdateParamsAction]` Body param - `Action DLPEmailRuleUpdateParamsActionAction` - `const DLPEmailRuleUpdateParamsActionActionBlock DLPEmailRuleUpdateParamsActionAction = "Block"` - `Message string` - `Conditions param.Field[[]DLPEmailRuleUpdateParamsCondition]` Body param: Triggered if all conditions match. - `Operator DLPEmailRuleUpdateParamsConditionsOperator` - `const DLPEmailRuleUpdateParamsConditionsOperatorInList DLPEmailRuleUpdateParamsConditionsOperator = "InList"` - `const DLPEmailRuleUpdateParamsConditionsOperatorNotInList DLPEmailRuleUpdateParamsConditionsOperator = "NotInList"` - `const DLPEmailRuleUpdateParamsConditionsOperatorMatchRegex DLPEmailRuleUpdateParamsConditionsOperator = "MatchRegex"` - `const DLPEmailRuleUpdateParamsConditionsOperatorNotMatchRegex DLPEmailRuleUpdateParamsConditionsOperator = "NotMatchRegex"` - `Selector DLPEmailRuleUpdateParamsConditionsSelector` - `const DLPEmailRuleUpdateParamsConditionsSelectorRecipients DLPEmailRuleUpdateParamsConditionsSelector = "Recipients"` - `const DLPEmailRuleUpdateParamsConditionsSelectorSender DLPEmailRuleUpdateParamsConditionsSelector = "Sender"` - `const DLPEmailRuleUpdateParamsConditionsSelectorDLPProfiles DLPEmailRuleUpdateParamsConditionsSelector = "DLPProfiles"` - `Value DLPEmailRuleUpdateParamsConditionsValueUnion` - `type DLPEmailRuleUpdateParamsConditionsValueArray []string` - `UnionString` - `Enabled param.Field[bool]` Body param - `Name param.Field[string]` Body param - `Description param.Field[string]` Body param ### Returns - `type DLPEmailRuleUpdateResponse struct{…}` - `Action DLPEmailRuleUpdateResponseAction` - `Action DLPEmailRuleUpdateResponseActionAction` - `const DLPEmailRuleUpdateResponseActionActionBlock DLPEmailRuleUpdateResponseActionAction = "Block"` - `Message string` - `Conditions []DLPEmailRuleUpdateResponseCondition` Triggered if all conditions match. - `Operator DLPEmailRuleUpdateResponseConditionsOperator` - `const DLPEmailRuleUpdateResponseConditionsOperatorInList DLPEmailRuleUpdateResponseConditionsOperator = "InList"` - `const DLPEmailRuleUpdateResponseConditionsOperatorNotInList DLPEmailRuleUpdateResponseConditionsOperator = "NotInList"` - `const DLPEmailRuleUpdateResponseConditionsOperatorMatchRegex DLPEmailRuleUpdateResponseConditionsOperator = "MatchRegex"` - `const DLPEmailRuleUpdateResponseConditionsOperatorNotMatchRegex DLPEmailRuleUpdateResponseConditionsOperator = "NotMatchRegex"` - `Selector DLPEmailRuleUpdateResponseConditionsSelector` - `const DLPEmailRuleUpdateResponseConditionsSelectorRecipients DLPEmailRuleUpdateResponseConditionsSelector = "Recipients"` - `const DLPEmailRuleUpdateResponseConditionsSelectorSender DLPEmailRuleUpdateResponseConditionsSelector = "Sender"` - `const DLPEmailRuleUpdateResponseConditionsSelectorDLPProfiles DLPEmailRuleUpdateResponseConditionsSelector = "DLPProfiles"` - `Value DLPEmailRuleUpdateResponseConditionsValueUnion` - `type DLPEmailRuleUpdateResponseConditionsValueArray []string` - `UnionString` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Priority int64` - `RuleID string` - `UpdatedAt Time` - `Description string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) rule, err := client.ZeroTrust.DLP.Email.Rules.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEmailRuleUpdateParams{ AccountID: cloudflare.F("account_id"), Action: cloudflare.F(zero_trust.DLPEmailRuleUpdateParamsAction{ Action: cloudflare.F(zero_trust.DLPEmailRuleUpdateParamsActionActionBlock), }), Conditions: cloudflare.F([]zero_trust.DLPEmailRuleUpdateParamsCondition{zero_trust.DLPEmailRuleUpdateParamsCondition{ Operator: cloudflare.F(zero_trust.DLPEmailRuleUpdateParamsConditionsOperatorInList), Selector: cloudflare.F(zero_trust.DLPEmailRuleUpdateParamsConditionsSelectorRecipients), Value: cloudflare.F[zero_trust.DLPEmailRuleUpdateParamsConditionsValueUnion](zero_trust.DLPEmailRuleUpdateParamsConditionsValueArray([]string{"string"})), }}), Enabled: cloudflare.F(true), Name: cloudflare.F("name"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", rule.RuleID) } ``` #### 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 `client.ZeroTrust.DLP.Email.Rules.Delete(ctx, ruleID, body) (*DLPEmailRuleDeleteResponse, error)` **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 - `ruleID string` - `body DLPEmailRuleDeleteParams` - `AccountID param.Field[string]` ### Returns - `type DLPEmailRuleDeleteResponse struct{…}` - `Action DLPEmailRuleDeleteResponseAction` - `Action DLPEmailRuleDeleteResponseActionAction` - `const DLPEmailRuleDeleteResponseActionActionBlock DLPEmailRuleDeleteResponseActionAction = "Block"` - `Message string` - `Conditions []DLPEmailRuleDeleteResponseCondition` Triggered if all conditions match. - `Operator DLPEmailRuleDeleteResponseConditionsOperator` - `const DLPEmailRuleDeleteResponseConditionsOperatorInList DLPEmailRuleDeleteResponseConditionsOperator = "InList"` - `const DLPEmailRuleDeleteResponseConditionsOperatorNotInList DLPEmailRuleDeleteResponseConditionsOperator = "NotInList"` - `const DLPEmailRuleDeleteResponseConditionsOperatorMatchRegex DLPEmailRuleDeleteResponseConditionsOperator = "MatchRegex"` - `const DLPEmailRuleDeleteResponseConditionsOperatorNotMatchRegex DLPEmailRuleDeleteResponseConditionsOperator = "NotMatchRegex"` - `Selector DLPEmailRuleDeleteResponseConditionsSelector` - `const DLPEmailRuleDeleteResponseConditionsSelectorRecipients DLPEmailRuleDeleteResponseConditionsSelector = "Recipients"` - `const DLPEmailRuleDeleteResponseConditionsSelectorSender DLPEmailRuleDeleteResponseConditionsSelector = "Sender"` - `const DLPEmailRuleDeleteResponseConditionsSelectorDLPProfiles DLPEmailRuleDeleteResponseConditionsSelector = "DLPProfiles"` - `Value DLPEmailRuleDeleteResponseConditionsValueUnion` - `type DLPEmailRuleDeleteResponseConditionsValueArray []string` - `UnionString` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Priority int64` - `RuleID string` - `UpdatedAt Time` - `Description string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) rule, err := client.ZeroTrust.DLP.Email.Rules.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEmailRuleDeleteParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", rule.RuleID) } ``` #### 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 `client.ZeroTrust.DLP.Email.Rules.BulkEdit(ctx, params) (*DLPEmailRuleBulkEditResponse, error)` **patch** `/accounts/{account_id}/dlp/email/rules` Reorders DLP email scanning rules by updating their priority values. Higher priority rules are evaluated first. ### Parameters - `params DLPEmailRuleBulkEditParams` - `AccountID param.Field[string]` Path param - `NewPriorities param.Field[map[string, int64]]` Body param ### Returns - `type DLPEmailRuleBulkEditResponse struct{…}` - `Action DLPEmailRuleBulkEditResponseAction` - `Action DLPEmailRuleBulkEditResponseActionAction` - `const DLPEmailRuleBulkEditResponseActionActionBlock DLPEmailRuleBulkEditResponseActionAction = "Block"` - `Message string` - `Conditions []DLPEmailRuleBulkEditResponseCondition` Triggered if all conditions match. - `Operator DLPEmailRuleBulkEditResponseConditionsOperator` - `const DLPEmailRuleBulkEditResponseConditionsOperatorInList DLPEmailRuleBulkEditResponseConditionsOperator = "InList"` - `const DLPEmailRuleBulkEditResponseConditionsOperatorNotInList DLPEmailRuleBulkEditResponseConditionsOperator = "NotInList"` - `const DLPEmailRuleBulkEditResponseConditionsOperatorMatchRegex DLPEmailRuleBulkEditResponseConditionsOperator = "MatchRegex"` - `const DLPEmailRuleBulkEditResponseConditionsOperatorNotMatchRegex DLPEmailRuleBulkEditResponseConditionsOperator = "NotMatchRegex"` - `Selector DLPEmailRuleBulkEditResponseConditionsSelector` - `const DLPEmailRuleBulkEditResponseConditionsSelectorRecipients DLPEmailRuleBulkEditResponseConditionsSelector = "Recipients"` - `const DLPEmailRuleBulkEditResponseConditionsSelectorSender DLPEmailRuleBulkEditResponseConditionsSelector = "Sender"` - `const DLPEmailRuleBulkEditResponseConditionsSelectorDLPProfiles DLPEmailRuleBulkEditResponseConditionsSelector = "DLPProfiles"` - `Value DLPEmailRuleBulkEditResponseConditionsValueUnion` - `type DLPEmailRuleBulkEditResponseConditionsValueArray []string` - `UnionString` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Priority int64` - `RuleID string` - `UpdatedAt Time` - `Description string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) response, err := client.ZeroTrust.DLP.Email.Rules.BulkEdit(context.TODO(), zero_trust.DLPEmailRuleBulkEditParams{ AccountID: cloudflare.F("account_id"), NewPriorities: cloudflare.F(map[string]int64{ "foo": int64(0), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.RuleID) } ``` #### 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" } } ``` # Profiles ## List all profiles `client.ZeroTrust.DLP.Profiles.List(ctx, params) (*SinglePage[Profile], error)` **get** `/accounts/{account_id}/dlp/profiles` Lists all DLP profiles in an account. ### Parameters - `params DLPProfileListParams` - `AccountID param.Field[string]` Path param - `All param.Field[bool]` Query param: Return all profiles, including those that current account does not have access to. ### Returns - `type Profile interface{…}` - `type ProfileCustomProfile struct{…}` - `ID string` The id of the profile (uuid). - `AllowedMatchCount int64` Related DLP policies will trigger when the match count exceeds the number set. - `CreatedAt Time` When the profile was created. - `Name string` The name of the profile. - `OCREnabled bool` - `Type ProfileCustomProfileType` - `const ProfileCustomProfileTypeCustom ProfileCustomProfileType = "custom"` - `UpdatedAt Time` When the profile was lasted updated. - `AIContextEnabled bool` - `ConfidenceThreshold ProfileCustomProfileConfidenceThreshold` - `const ProfileCustomProfileConfidenceThresholdLow ProfileCustomProfileConfidenceThreshold = "low"` - `const ProfileCustomProfileConfidenceThresholdMedium ProfileCustomProfileConfidenceThreshold = "medium"` - `const ProfileCustomProfileConfidenceThresholdHigh ProfileCustomProfileConfidenceThreshold = "high"` - `const ProfileCustomProfileConfidenceThresholdVeryHigh ProfileCustomProfileConfidenceThreshold = "very_high"` - `ContextAwareness 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. - `DataClasses []string` Data classes associated with this profile. - `DataTags []string` Data tags associated with this profile. - `Description string` The description of the profile. - `Entries []ProfileCustomProfileEntry` - `type ProfileCustomProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type ProfileCustomProfileEntriesCustomEntryType` - `const ProfileCustomProfileEntriesCustomEntryTypeCustom ProfileCustomProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileEntriesPredefinedEntryType` - `const ProfileCustomProfileEntriesPredefinedEntryTypePredefined ProfileCustomProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesIntegrationEntryType` - `const ProfileCustomProfileEntriesIntegrationEntryTypeIntegration ProfileCustomProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileEntriesExactDataEntryType` - `const ProfileCustomProfileEntriesExactDataEntryTypeExactData ProfileCustomProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesWordListEntryType` - `const ProfileCustomProfileEntriesWordListEntryTypeWordList ProfileCustomProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `SensitivityLevels [][]string` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `SharedEntries []ProfileCustomProfileSharedEntry` - `type ProfileCustomProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileCustomProfileSharedEntriesCustomEntryType` - `const ProfileCustomProfileSharedEntriesCustomEntryTypeCustom ProfileCustomProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryTypePredefined ProfileCustomProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesIntegrationEntryType` - `const ProfileCustomProfileSharedEntriesIntegrationEntryTypeIntegration ProfileCustomProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileSharedEntriesExactDataEntryType` - `const ProfileCustomProfileSharedEntriesExactDataEntryTypeExactData ProfileCustomProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesWordListEntryType` - `const ProfileCustomProfileSharedEntriesWordListEntryTypeWordList ProfileCustomProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `type ProfilePredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `Entries []ProfilePredefinedProfileEntry` - `type ProfilePredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfilePredefinedProfileEntriesCustomEntryType` - `const ProfilePredefinedProfileEntriesCustomEntryTypeCustom ProfilePredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfilePredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfilePredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfilePredefinedProfileEntriesPredefinedEntryType` - `const ProfilePredefinedProfileEntriesPredefinedEntryTypePredefined ProfilePredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfilePredefinedProfileEntriesPredefinedEntryVariant` - `TopicType ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfilePredefinedProfileEntriesPredefinedEntryVariantType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic ProfilePredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfilePredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesIntegrationEntryType` - `const ProfilePredefinedProfileEntriesIntegrationEntryTypeIntegration ProfilePredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfilePredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfilePredefinedProfileEntriesExactDataEntryType` - `const ProfilePredefinedProfileEntriesExactDataEntryTypeExactData ProfilePredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesDocumentFingerprintEntryType` - `const ProfilePredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfilePredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesWordListEntryType` - `const ProfilePredefinedProfileEntriesWordListEntryTypeWordList ProfilePredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `Type ProfilePredefinedProfileType` - `const ProfilePredefinedProfileTypePredefined ProfilePredefinedProfileType = "predefined"` - `AIContextEnabled bool` - `ConfidenceThreshold ProfilePredefinedProfileConfidenceThreshold` - `const ProfilePredefinedProfileConfidenceThresholdLow ProfilePredefinedProfileConfidenceThreshold = "low"` - `const ProfilePredefinedProfileConfidenceThresholdMedium ProfilePredefinedProfileConfidenceThreshold = "medium"` - `const ProfilePredefinedProfileConfidenceThresholdHigh ProfilePredefinedProfileConfidenceThreshold = "high"` - `const ProfilePredefinedProfileConfidenceThresholdVeryHigh ProfilePredefinedProfileConfidenceThreshold = "very_high"` - `ContextAwareness ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. - `type ProfileIntegrationProfile struct{…}` - `ID string` - `CreatedAt Time` - `Entries []ProfileIntegrationProfileEntry` - `type ProfileIntegrationProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileEntriesCustomEntryType` - `const ProfileIntegrationProfileEntriesCustomEntryTypeCustom ProfileIntegrationProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileEntriesPredefinedEntryType` - `const ProfileIntegrationProfileEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesIntegrationEntryType` - `const ProfileIntegrationProfileEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileEntriesExactDataEntryType` - `const ProfileIntegrationProfileEntriesExactDataEntryTypeExactData ProfileIntegrationProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesWordListEntryType` - `const ProfileIntegrationProfileEntriesWordListEntryTypeWordList ProfileIntegrationProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` - `SharedEntries []ProfileIntegrationProfileSharedEntry` - `type ProfileIntegrationProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileSharedEntriesCustomEntryType` - `const ProfileIntegrationProfileSharedEntriesCustomEntryTypeCustom ProfileIntegrationProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesIntegrationEntryType` - `const ProfileIntegrationProfileSharedEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileSharedEntriesExactDataEntryType` - `const ProfileIntegrationProfileSharedEntriesExactDataEntryTypeExactData ProfileIntegrationProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesWordListEntryType` - `const ProfileIntegrationProfileSharedEntriesWordListEntryTypeWordList ProfileIntegrationProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Type ProfileIntegrationProfileType` - `const ProfileIntegrationProfileTypeIntegration ProfileIntegrationProfileType = "integration"` - `UpdatedAt Time` - `Description string` The description of the profile. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.ZeroTrust.DLP.Profiles.List(context.TODO(), zero_trust.DLPProfileListParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Profiles.Get(ctx, profileID, query) (*Profile, error)` **get** `/accounts/{account_id}/dlp/profiles/{profile_id}` Fetches a DLP profile by ID. ### Parameters - `profileID string` - `query DLPProfileGetParams` - `AccountID param.Field[string]` ### Returns - `type Profile interface{…}` - `type ProfileCustomProfile struct{…}` - `ID string` The id of the profile (uuid). - `AllowedMatchCount int64` Related DLP policies will trigger when the match count exceeds the number set. - `CreatedAt Time` When the profile was created. - `Name string` The name of the profile. - `OCREnabled bool` - `Type ProfileCustomProfileType` - `const ProfileCustomProfileTypeCustom ProfileCustomProfileType = "custom"` - `UpdatedAt Time` When the profile was lasted updated. - `AIContextEnabled bool` - `ConfidenceThreshold ProfileCustomProfileConfidenceThreshold` - `const ProfileCustomProfileConfidenceThresholdLow ProfileCustomProfileConfidenceThreshold = "low"` - `const ProfileCustomProfileConfidenceThresholdMedium ProfileCustomProfileConfidenceThreshold = "medium"` - `const ProfileCustomProfileConfidenceThresholdHigh ProfileCustomProfileConfidenceThreshold = "high"` - `const ProfileCustomProfileConfidenceThresholdVeryHigh ProfileCustomProfileConfidenceThreshold = "very_high"` - `ContextAwareness 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. - `DataClasses []string` Data classes associated with this profile. - `DataTags []string` Data tags associated with this profile. - `Description string` The description of the profile. - `Entries []ProfileCustomProfileEntry` - `type ProfileCustomProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type ProfileCustomProfileEntriesCustomEntryType` - `const ProfileCustomProfileEntriesCustomEntryTypeCustom ProfileCustomProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileEntriesPredefinedEntryType` - `const ProfileCustomProfileEntriesPredefinedEntryTypePredefined ProfileCustomProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesIntegrationEntryType` - `const ProfileCustomProfileEntriesIntegrationEntryTypeIntegration ProfileCustomProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileEntriesExactDataEntryType` - `const ProfileCustomProfileEntriesExactDataEntryTypeExactData ProfileCustomProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesWordListEntryType` - `const ProfileCustomProfileEntriesWordListEntryTypeWordList ProfileCustomProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `SensitivityLevels [][]string` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `SharedEntries []ProfileCustomProfileSharedEntry` - `type ProfileCustomProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileCustomProfileSharedEntriesCustomEntryType` - `const ProfileCustomProfileSharedEntriesCustomEntryTypeCustom ProfileCustomProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryTypePredefined ProfileCustomProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesIntegrationEntryType` - `const ProfileCustomProfileSharedEntriesIntegrationEntryTypeIntegration ProfileCustomProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileSharedEntriesExactDataEntryType` - `const ProfileCustomProfileSharedEntriesExactDataEntryTypeExactData ProfileCustomProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesWordListEntryType` - `const ProfileCustomProfileSharedEntriesWordListEntryTypeWordList ProfileCustomProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `type ProfilePredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `Entries []ProfilePredefinedProfileEntry` - `type ProfilePredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfilePredefinedProfileEntriesCustomEntryType` - `const ProfilePredefinedProfileEntriesCustomEntryTypeCustom ProfilePredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfilePredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfilePredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfilePredefinedProfileEntriesPredefinedEntryType` - `const ProfilePredefinedProfileEntriesPredefinedEntryTypePredefined ProfilePredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfilePredefinedProfileEntriesPredefinedEntryVariant` - `TopicType ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfilePredefinedProfileEntriesPredefinedEntryVariantType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic ProfilePredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfilePredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesIntegrationEntryType` - `const ProfilePredefinedProfileEntriesIntegrationEntryTypeIntegration ProfilePredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfilePredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfilePredefinedProfileEntriesExactDataEntryType` - `const ProfilePredefinedProfileEntriesExactDataEntryTypeExactData ProfilePredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesDocumentFingerprintEntryType` - `const ProfilePredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfilePredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesWordListEntryType` - `const ProfilePredefinedProfileEntriesWordListEntryTypeWordList ProfilePredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `Type ProfilePredefinedProfileType` - `const ProfilePredefinedProfileTypePredefined ProfilePredefinedProfileType = "predefined"` - `AIContextEnabled bool` - `ConfidenceThreshold ProfilePredefinedProfileConfidenceThreshold` - `const ProfilePredefinedProfileConfidenceThresholdLow ProfilePredefinedProfileConfidenceThreshold = "low"` - `const ProfilePredefinedProfileConfidenceThresholdMedium ProfilePredefinedProfileConfidenceThreshold = "medium"` - `const ProfilePredefinedProfileConfidenceThresholdHigh ProfilePredefinedProfileConfidenceThreshold = "high"` - `const ProfilePredefinedProfileConfidenceThresholdVeryHigh ProfilePredefinedProfileConfidenceThreshold = "very_high"` - `ContextAwareness ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. - `type ProfileIntegrationProfile struct{…}` - `ID string` - `CreatedAt Time` - `Entries []ProfileIntegrationProfileEntry` - `type ProfileIntegrationProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileEntriesCustomEntryType` - `const ProfileIntegrationProfileEntriesCustomEntryTypeCustom ProfileIntegrationProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileEntriesPredefinedEntryType` - `const ProfileIntegrationProfileEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesIntegrationEntryType` - `const ProfileIntegrationProfileEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileEntriesExactDataEntryType` - `const ProfileIntegrationProfileEntriesExactDataEntryTypeExactData ProfileIntegrationProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesWordListEntryType` - `const ProfileIntegrationProfileEntriesWordListEntryTypeWordList ProfileIntegrationProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` - `SharedEntries []ProfileIntegrationProfileSharedEntry` - `type ProfileIntegrationProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileSharedEntriesCustomEntryType` - `const ProfileIntegrationProfileSharedEntriesCustomEntryTypeCustom ProfileIntegrationProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesIntegrationEntryType` - `const ProfileIntegrationProfileSharedEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileSharedEntriesExactDataEntryType` - `const ProfileIntegrationProfileSharedEntriesExactDataEntryTypeExactData ProfileIntegrationProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesWordListEntryType` - `const ProfileIntegrationProfileSharedEntriesWordListEntryTypeWordList ProfileIntegrationProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Type ProfileIntegrationProfileType` - `const ProfileIntegrationProfileTypeIntegration ProfileIntegrationProfileType = "integration"` - `UpdatedAt Time` - `Description string` The description of the profile. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) profile, err := client.ZeroTrust.DLP.Profiles.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPProfileGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 - `type ContextAwareness struct{…}` 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 - `type Profile interface{…}` - `type ProfileCustomProfile struct{…}` - `ID string` The id of the profile (uuid). - `AllowedMatchCount int64` Related DLP policies will trigger when the match count exceeds the number set. - `CreatedAt Time` When the profile was created. - `Name string` The name of the profile. - `OCREnabled bool` - `Type ProfileCustomProfileType` - `const ProfileCustomProfileTypeCustom ProfileCustomProfileType = "custom"` - `UpdatedAt Time` When the profile was lasted updated. - `AIContextEnabled bool` - `ConfidenceThreshold ProfileCustomProfileConfidenceThreshold` - `const ProfileCustomProfileConfidenceThresholdLow ProfileCustomProfileConfidenceThreshold = "low"` - `const ProfileCustomProfileConfidenceThresholdMedium ProfileCustomProfileConfidenceThreshold = "medium"` - `const ProfileCustomProfileConfidenceThresholdHigh ProfileCustomProfileConfidenceThreshold = "high"` - `const ProfileCustomProfileConfidenceThresholdVeryHigh ProfileCustomProfileConfidenceThreshold = "very_high"` - `ContextAwareness 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. - `DataClasses []string` Data classes associated with this profile. - `DataTags []string` Data tags associated with this profile. - `Description string` The description of the profile. - `Entries []ProfileCustomProfileEntry` - `type ProfileCustomProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type ProfileCustomProfileEntriesCustomEntryType` - `const ProfileCustomProfileEntriesCustomEntryTypeCustom ProfileCustomProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileEntriesPredefinedEntryType` - `const ProfileCustomProfileEntriesPredefinedEntryTypePredefined ProfileCustomProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesIntegrationEntryType` - `const ProfileCustomProfileEntriesIntegrationEntryTypeIntegration ProfileCustomProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileEntriesExactDataEntryType` - `const ProfileCustomProfileEntriesExactDataEntryTypeExactData ProfileCustomProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesWordListEntryType` - `const ProfileCustomProfileEntriesWordListEntryTypeWordList ProfileCustomProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `SensitivityLevels [][]string` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `SharedEntries []ProfileCustomProfileSharedEntry` - `type ProfileCustomProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileCustomProfileSharedEntriesCustomEntryType` - `const ProfileCustomProfileSharedEntriesCustomEntryTypeCustom ProfileCustomProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryTypePredefined ProfileCustomProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesIntegrationEntryType` - `const ProfileCustomProfileSharedEntriesIntegrationEntryTypeIntegration ProfileCustomProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileSharedEntriesExactDataEntryType` - `const ProfileCustomProfileSharedEntriesExactDataEntryTypeExactData ProfileCustomProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesWordListEntryType` - `const ProfileCustomProfileSharedEntriesWordListEntryTypeWordList ProfileCustomProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `type ProfilePredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `Entries []ProfilePredefinedProfileEntry` - `type ProfilePredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfilePredefinedProfileEntriesCustomEntryType` - `const ProfilePredefinedProfileEntriesCustomEntryTypeCustom ProfilePredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfilePredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfilePredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfilePredefinedProfileEntriesPredefinedEntryType` - `const ProfilePredefinedProfileEntriesPredefinedEntryTypePredefined ProfilePredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfilePredefinedProfileEntriesPredefinedEntryVariant` - `TopicType ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfilePredefinedProfileEntriesPredefinedEntryVariantType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic ProfilePredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfilePredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesIntegrationEntryType` - `const ProfilePredefinedProfileEntriesIntegrationEntryTypeIntegration ProfilePredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfilePredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfilePredefinedProfileEntriesExactDataEntryType` - `const ProfilePredefinedProfileEntriesExactDataEntryTypeExactData ProfilePredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesDocumentFingerprintEntryType` - `const ProfilePredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfilePredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesWordListEntryType` - `const ProfilePredefinedProfileEntriesWordListEntryTypeWordList ProfilePredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `Type ProfilePredefinedProfileType` - `const ProfilePredefinedProfileTypePredefined ProfilePredefinedProfileType = "predefined"` - `AIContextEnabled bool` - `ConfidenceThreshold ProfilePredefinedProfileConfidenceThreshold` - `const ProfilePredefinedProfileConfidenceThresholdLow ProfilePredefinedProfileConfidenceThreshold = "low"` - `const ProfilePredefinedProfileConfidenceThresholdMedium ProfilePredefinedProfileConfidenceThreshold = "medium"` - `const ProfilePredefinedProfileConfidenceThresholdHigh ProfilePredefinedProfileConfidenceThreshold = "high"` - `const ProfilePredefinedProfileConfidenceThresholdVeryHigh ProfilePredefinedProfileConfidenceThreshold = "very_high"` - `ContextAwareness ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. - `type ProfileIntegrationProfile struct{…}` - `ID string` - `CreatedAt Time` - `Entries []ProfileIntegrationProfileEntry` - `type ProfileIntegrationProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileEntriesCustomEntryType` - `const ProfileIntegrationProfileEntriesCustomEntryTypeCustom ProfileIntegrationProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileEntriesPredefinedEntryType` - `const ProfileIntegrationProfileEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesIntegrationEntryType` - `const ProfileIntegrationProfileEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileEntriesExactDataEntryType` - `const ProfileIntegrationProfileEntriesExactDataEntryTypeExactData ProfileIntegrationProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesWordListEntryType` - `const ProfileIntegrationProfileEntriesWordListEntryTypeWordList ProfileIntegrationProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` - `SharedEntries []ProfileIntegrationProfileSharedEntry` - `type ProfileIntegrationProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileSharedEntriesCustomEntryType` - `const ProfileIntegrationProfileSharedEntriesCustomEntryTypeCustom ProfileIntegrationProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesIntegrationEntryType` - `const ProfileIntegrationProfileSharedEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileSharedEntriesExactDataEntryType` - `const ProfileIntegrationProfileSharedEntriesExactDataEntryTypeExactData ProfileIntegrationProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesWordListEntryType` - `const ProfileIntegrationProfileSharedEntriesWordListEntryTypeWordList ProfileIntegrationProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Type ProfileIntegrationProfileType` - `const ProfileIntegrationProfileTypeIntegration ProfileIntegrationProfileType = "integration"` - `UpdatedAt Time` - `Description string` The description of the profile. ### Skip Configuration - `type SkipConfiguration struct{…}` 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 `client.ZeroTrust.DLP.Profiles.Custom.Get(ctx, profileID, query) (*Profile, error)` **get** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Fetches a custom DLP profile by id. ### Parameters - `profileID string` - `query DLPProfileCustomGetParams` - `AccountID param.Field[string]` ### Returns - `type Profile interface{…}` - `type ProfileCustomProfile struct{…}` - `ID string` The id of the profile (uuid). - `AllowedMatchCount int64` Related DLP policies will trigger when the match count exceeds the number set. - `CreatedAt Time` When the profile was created. - `Name string` The name of the profile. - `OCREnabled bool` - `Type ProfileCustomProfileType` - `const ProfileCustomProfileTypeCustom ProfileCustomProfileType = "custom"` - `UpdatedAt Time` When the profile was lasted updated. - `AIContextEnabled bool` - `ConfidenceThreshold ProfileCustomProfileConfidenceThreshold` - `const ProfileCustomProfileConfidenceThresholdLow ProfileCustomProfileConfidenceThreshold = "low"` - `const ProfileCustomProfileConfidenceThresholdMedium ProfileCustomProfileConfidenceThreshold = "medium"` - `const ProfileCustomProfileConfidenceThresholdHigh ProfileCustomProfileConfidenceThreshold = "high"` - `const ProfileCustomProfileConfidenceThresholdVeryHigh ProfileCustomProfileConfidenceThreshold = "very_high"` - `ContextAwareness 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. - `DataClasses []string` Data classes associated with this profile. - `DataTags []string` Data tags associated with this profile. - `Description string` The description of the profile. - `Entries []ProfileCustomProfileEntry` - `type ProfileCustomProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type ProfileCustomProfileEntriesCustomEntryType` - `const ProfileCustomProfileEntriesCustomEntryTypeCustom ProfileCustomProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileEntriesPredefinedEntryType` - `const ProfileCustomProfileEntriesPredefinedEntryTypePredefined ProfileCustomProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesIntegrationEntryType` - `const ProfileCustomProfileEntriesIntegrationEntryTypeIntegration ProfileCustomProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileEntriesExactDataEntryType` - `const ProfileCustomProfileEntriesExactDataEntryTypeExactData ProfileCustomProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesWordListEntryType` - `const ProfileCustomProfileEntriesWordListEntryTypeWordList ProfileCustomProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `SensitivityLevels [][]string` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `SharedEntries []ProfileCustomProfileSharedEntry` - `type ProfileCustomProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileCustomProfileSharedEntriesCustomEntryType` - `const ProfileCustomProfileSharedEntriesCustomEntryTypeCustom ProfileCustomProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryTypePredefined ProfileCustomProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesIntegrationEntryType` - `const ProfileCustomProfileSharedEntriesIntegrationEntryTypeIntegration ProfileCustomProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileSharedEntriesExactDataEntryType` - `const ProfileCustomProfileSharedEntriesExactDataEntryTypeExactData ProfileCustomProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesWordListEntryType` - `const ProfileCustomProfileSharedEntriesWordListEntryTypeWordList ProfileCustomProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `type ProfilePredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `Entries []ProfilePredefinedProfileEntry` - `type ProfilePredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfilePredefinedProfileEntriesCustomEntryType` - `const ProfilePredefinedProfileEntriesCustomEntryTypeCustom ProfilePredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfilePredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfilePredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfilePredefinedProfileEntriesPredefinedEntryType` - `const ProfilePredefinedProfileEntriesPredefinedEntryTypePredefined ProfilePredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfilePredefinedProfileEntriesPredefinedEntryVariant` - `TopicType ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfilePredefinedProfileEntriesPredefinedEntryVariantType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic ProfilePredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfilePredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesIntegrationEntryType` - `const ProfilePredefinedProfileEntriesIntegrationEntryTypeIntegration ProfilePredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfilePredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfilePredefinedProfileEntriesExactDataEntryType` - `const ProfilePredefinedProfileEntriesExactDataEntryTypeExactData ProfilePredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesDocumentFingerprintEntryType` - `const ProfilePredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfilePredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesWordListEntryType` - `const ProfilePredefinedProfileEntriesWordListEntryTypeWordList ProfilePredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `Type ProfilePredefinedProfileType` - `const ProfilePredefinedProfileTypePredefined ProfilePredefinedProfileType = "predefined"` - `AIContextEnabled bool` - `ConfidenceThreshold ProfilePredefinedProfileConfidenceThreshold` - `const ProfilePredefinedProfileConfidenceThresholdLow ProfilePredefinedProfileConfidenceThreshold = "low"` - `const ProfilePredefinedProfileConfidenceThresholdMedium ProfilePredefinedProfileConfidenceThreshold = "medium"` - `const ProfilePredefinedProfileConfidenceThresholdHigh ProfilePredefinedProfileConfidenceThreshold = "high"` - `const ProfilePredefinedProfileConfidenceThresholdVeryHigh ProfilePredefinedProfileConfidenceThreshold = "very_high"` - `ContextAwareness ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. - `type ProfileIntegrationProfile struct{…}` - `ID string` - `CreatedAt Time` - `Entries []ProfileIntegrationProfileEntry` - `type ProfileIntegrationProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileEntriesCustomEntryType` - `const ProfileIntegrationProfileEntriesCustomEntryTypeCustom ProfileIntegrationProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileEntriesPredefinedEntryType` - `const ProfileIntegrationProfileEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesIntegrationEntryType` - `const ProfileIntegrationProfileEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileEntriesExactDataEntryType` - `const ProfileIntegrationProfileEntriesExactDataEntryTypeExactData ProfileIntegrationProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesWordListEntryType` - `const ProfileIntegrationProfileEntriesWordListEntryTypeWordList ProfileIntegrationProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` - `SharedEntries []ProfileIntegrationProfileSharedEntry` - `type ProfileIntegrationProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileSharedEntriesCustomEntryType` - `const ProfileIntegrationProfileSharedEntriesCustomEntryTypeCustom ProfileIntegrationProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesIntegrationEntryType` - `const ProfileIntegrationProfileSharedEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileSharedEntriesExactDataEntryType` - `const ProfileIntegrationProfileSharedEntriesExactDataEntryTypeExactData ProfileIntegrationProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesWordListEntryType` - `const ProfileIntegrationProfileSharedEntriesWordListEntryTypeWordList ProfileIntegrationProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Type ProfileIntegrationProfileType` - `const ProfileIntegrationProfileTypeIntegration ProfileIntegrationProfileType = "integration"` - `UpdatedAt Time` - `Description string` The description of the profile. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) profile, err := client.ZeroTrust.DLP.Profiles.Custom.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPProfileCustomGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Profiles.Custom.New(ctx, params) (*Profile, error)` **post** `/accounts/{account_id}/dlp/profiles/custom` Creates a DLP custom profile. ### Parameters - `params DLPProfileCustomNewParams` - `AccountID param.Field[string]` Path param - `Name param.Field[string]` Body param - `AIContextEnabled param.Field[bool]` Body param - `AllowedMatchCount param.Field[int64]` Body param: Related DLP policies will trigger when the match count exceeds the number set. - `ConfidenceThreshold param.Field[string]` Body param - `ContextAwareness param.Field[ContextAwareness]` Body param: Scan the context of predefined entries to only return matches surrounded by keywords. - `DataClasses param.Field[[]string]` Body param: Data class IDs to associate with the profile. - `DataTags param.Field[[]string]` Body param: Data tag IDs to associate with the profile. - `Description param.Field[string]` Body param: The description of the profile. - `Entries param.Field[[]DLPProfileCustomNewParamsEntry]` Body param - `type DLPProfileCustomNewParamsEntriesDLPNewCustomEntry struct{…}` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Description string` - `type DLPProfileCustomNewParamsEntriesDLPNewWordListEntry struct{…}` - `Enabled bool` - `Name string` - `Words []string` - `OCREnabled param.Field[bool]` Body param - `SensitivityLevels param.Field[[][]string]` Body param: Sensitivity levels to associate with the profile as (group_id, level_id) tuples. - `SharedEntries param.Field[[]DLPProfileCustomNewParamsSharedEntry]` Body param: Entries from other profiles (e.g. pre-defined Cloudflare profiles, or your Microsoft Information Protection profiles). - `Enabled bool` - `EntryID string` ### Returns - `type Profile interface{…}` - `type ProfileCustomProfile struct{…}` - `ID string` The id of the profile (uuid). - `AllowedMatchCount int64` Related DLP policies will trigger when the match count exceeds the number set. - `CreatedAt Time` When the profile was created. - `Name string` The name of the profile. - `OCREnabled bool` - `Type ProfileCustomProfileType` - `const ProfileCustomProfileTypeCustom ProfileCustomProfileType = "custom"` - `UpdatedAt Time` When the profile was lasted updated. - `AIContextEnabled bool` - `ConfidenceThreshold ProfileCustomProfileConfidenceThreshold` - `const ProfileCustomProfileConfidenceThresholdLow ProfileCustomProfileConfidenceThreshold = "low"` - `const ProfileCustomProfileConfidenceThresholdMedium ProfileCustomProfileConfidenceThreshold = "medium"` - `const ProfileCustomProfileConfidenceThresholdHigh ProfileCustomProfileConfidenceThreshold = "high"` - `const ProfileCustomProfileConfidenceThresholdVeryHigh ProfileCustomProfileConfidenceThreshold = "very_high"` - `ContextAwareness 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. - `DataClasses []string` Data classes associated with this profile. - `DataTags []string` Data tags associated with this profile. - `Description string` The description of the profile. - `Entries []ProfileCustomProfileEntry` - `type ProfileCustomProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type ProfileCustomProfileEntriesCustomEntryType` - `const ProfileCustomProfileEntriesCustomEntryTypeCustom ProfileCustomProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileEntriesPredefinedEntryType` - `const ProfileCustomProfileEntriesPredefinedEntryTypePredefined ProfileCustomProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesIntegrationEntryType` - `const ProfileCustomProfileEntriesIntegrationEntryTypeIntegration ProfileCustomProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileEntriesExactDataEntryType` - `const ProfileCustomProfileEntriesExactDataEntryTypeExactData ProfileCustomProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesWordListEntryType` - `const ProfileCustomProfileEntriesWordListEntryTypeWordList ProfileCustomProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `SensitivityLevels [][]string` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `SharedEntries []ProfileCustomProfileSharedEntry` - `type ProfileCustomProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileCustomProfileSharedEntriesCustomEntryType` - `const ProfileCustomProfileSharedEntriesCustomEntryTypeCustom ProfileCustomProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryTypePredefined ProfileCustomProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesIntegrationEntryType` - `const ProfileCustomProfileSharedEntriesIntegrationEntryTypeIntegration ProfileCustomProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileSharedEntriesExactDataEntryType` - `const ProfileCustomProfileSharedEntriesExactDataEntryTypeExactData ProfileCustomProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesWordListEntryType` - `const ProfileCustomProfileSharedEntriesWordListEntryTypeWordList ProfileCustomProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `type ProfilePredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `Entries []ProfilePredefinedProfileEntry` - `type ProfilePredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfilePredefinedProfileEntriesCustomEntryType` - `const ProfilePredefinedProfileEntriesCustomEntryTypeCustom ProfilePredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfilePredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfilePredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfilePredefinedProfileEntriesPredefinedEntryType` - `const ProfilePredefinedProfileEntriesPredefinedEntryTypePredefined ProfilePredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfilePredefinedProfileEntriesPredefinedEntryVariant` - `TopicType ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfilePredefinedProfileEntriesPredefinedEntryVariantType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic ProfilePredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfilePredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesIntegrationEntryType` - `const ProfilePredefinedProfileEntriesIntegrationEntryTypeIntegration ProfilePredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfilePredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfilePredefinedProfileEntriesExactDataEntryType` - `const ProfilePredefinedProfileEntriesExactDataEntryTypeExactData ProfilePredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesDocumentFingerprintEntryType` - `const ProfilePredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfilePredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesWordListEntryType` - `const ProfilePredefinedProfileEntriesWordListEntryTypeWordList ProfilePredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `Type ProfilePredefinedProfileType` - `const ProfilePredefinedProfileTypePredefined ProfilePredefinedProfileType = "predefined"` - `AIContextEnabled bool` - `ConfidenceThreshold ProfilePredefinedProfileConfidenceThreshold` - `const ProfilePredefinedProfileConfidenceThresholdLow ProfilePredefinedProfileConfidenceThreshold = "low"` - `const ProfilePredefinedProfileConfidenceThresholdMedium ProfilePredefinedProfileConfidenceThreshold = "medium"` - `const ProfilePredefinedProfileConfidenceThresholdHigh ProfilePredefinedProfileConfidenceThreshold = "high"` - `const ProfilePredefinedProfileConfidenceThresholdVeryHigh ProfilePredefinedProfileConfidenceThreshold = "very_high"` - `ContextAwareness ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. - `type ProfileIntegrationProfile struct{…}` - `ID string` - `CreatedAt Time` - `Entries []ProfileIntegrationProfileEntry` - `type ProfileIntegrationProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileEntriesCustomEntryType` - `const ProfileIntegrationProfileEntriesCustomEntryTypeCustom ProfileIntegrationProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileEntriesPredefinedEntryType` - `const ProfileIntegrationProfileEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesIntegrationEntryType` - `const ProfileIntegrationProfileEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileEntriesExactDataEntryType` - `const ProfileIntegrationProfileEntriesExactDataEntryTypeExactData ProfileIntegrationProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesWordListEntryType` - `const ProfileIntegrationProfileEntriesWordListEntryTypeWordList ProfileIntegrationProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` - `SharedEntries []ProfileIntegrationProfileSharedEntry` - `type ProfileIntegrationProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileSharedEntriesCustomEntryType` - `const ProfileIntegrationProfileSharedEntriesCustomEntryTypeCustom ProfileIntegrationProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesIntegrationEntryType` - `const ProfileIntegrationProfileSharedEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileSharedEntriesExactDataEntryType` - `const ProfileIntegrationProfileSharedEntriesExactDataEntryTypeExactData ProfileIntegrationProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesWordListEntryType` - `const ProfileIntegrationProfileSharedEntriesWordListEntryTypeWordList ProfileIntegrationProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Type ProfileIntegrationProfileType` - `const ProfileIntegrationProfileTypeIntegration ProfileIntegrationProfileType = "integration"` - `UpdatedAt Time` - `Description string` The description of the profile. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) profile, err := client.ZeroTrust.DLP.Profiles.Custom.New(context.TODO(), zero_trust.DLPProfileCustomNewParams{ AccountID: cloudflare.F("account_id"), Name: cloudflare.F("name"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Profiles.Custom.Update(ctx, profileID, params) (*Profile, error)` **put** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Updates a DLP custom profile. ### Parameters - `profileID string` - `params DLPProfileCustomUpdateParams` - `AccountID param.Field[string]` Path param - `Name param.Field[string]` Body param - `AIContextEnabled param.Field[bool]` Body param - `AllowedMatchCount param.Field[int64]` Body param - `ConfidenceThreshold param.Field[string]` Body param - `ContextAwareness param.Field[ContextAwareness]` Body param: Scan the context of predefined entries to only return matches surrounded by keywords. - `DataClasses param.Field[[]string]` Body param: Data class IDs to associate with the profile. If omitted, existing associations are unchanged. - `DataTags param.Field[[]string]` Body param: Data tag IDs to associate with the profile. If omitted, existing associations are unchanged. - `Description param.Field[string]` Body param: The description of the profile. - `Entries param.Field[[]DLPProfileCustomUpdateParamsEntry]` Body param: Custom entries from this profile. If this field is omitted, entries owned by this profile will not be changed. - `type DLPProfileCustomUpdateParamsEntriesDLPNewCustomEntryWithID struct{…}` - `Enabled bool` - `EntryID string` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Description string` - `type DLPProfileCustomUpdateParamsEntriesDLPNewCustomEntry struct{…}` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Description string` - `OCREnabled param.Field[bool]` Body param - `SensitivityLevels param.Field[[][]string]` Body param: Sensitivity levels to associate with the profile. If omitted, existing associations are unchanged. - `SharedEntries param.Field[[]DLPProfileCustomUpdateParamsSharedEntry]` Body param: Other entries, e.g. predefined or integration. - `Enabled bool` - `EntryID string` ### Returns - `type Profile interface{…}` - `type ProfileCustomProfile struct{…}` - `ID string` The id of the profile (uuid). - `AllowedMatchCount int64` Related DLP policies will trigger when the match count exceeds the number set. - `CreatedAt Time` When the profile was created. - `Name string` The name of the profile. - `OCREnabled bool` - `Type ProfileCustomProfileType` - `const ProfileCustomProfileTypeCustom ProfileCustomProfileType = "custom"` - `UpdatedAt Time` When the profile was lasted updated. - `AIContextEnabled bool` - `ConfidenceThreshold ProfileCustomProfileConfidenceThreshold` - `const ProfileCustomProfileConfidenceThresholdLow ProfileCustomProfileConfidenceThreshold = "low"` - `const ProfileCustomProfileConfidenceThresholdMedium ProfileCustomProfileConfidenceThreshold = "medium"` - `const ProfileCustomProfileConfidenceThresholdHigh ProfileCustomProfileConfidenceThreshold = "high"` - `const ProfileCustomProfileConfidenceThresholdVeryHigh ProfileCustomProfileConfidenceThreshold = "very_high"` - `ContextAwareness 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. - `DataClasses []string` Data classes associated with this profile. - `DataTags []string` Data tags associated with this profile. - `Description string` The description of the profile. - `Entries []ProfileCustomProfileEntry` - `type ProfileCustomProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type ProfileCustomProfileEntriesCustomEntryType` - `const ProfileCustomProfileEntriesCustomEntryTypeCustom ProfileCustomProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileEntriesPredefinedEntryType` - `const ProfileCustomProfileEntriesPredefinedEntryTypePredefined ProfileCustomProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesIntegrationEntryType` - `const ProfileCustomProfileEntriesIntegrationEntryTypeIntegration ProfileCustomProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileEntriesExactDataEntryType` - `const ProfileCustomProfileEntriesExactDataEntryTypeExactData ProfileCustomProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileEntriesWordListEntryType` - `const ProfileCustomProfileEntriesWordListEntryTypeWordList ProfileCustomProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `SensitivityLevels [][]string` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `SharedEntries []ProfileCustomProfileSharedEntry` - `type ProfileCustomProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileCustomProfileSharedEntriesCustomEntryType` - `const ProfileCustomProfileSharedEntriesCustomEntryTypeCustom ProfileCustomProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileCustomProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryTypePredefined ProfileCustomProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileCustomProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileCustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileCustomProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileCustomProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileCustomProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileCustomProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesIntegrationEntryType` - `const ProfileCustomProfileSharedEntriesIntegrationEntryTypeIntegration ProfileCustomProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileCustomProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileCustomProfileSharedEntriesExactDataEntryType` - `const ProfileCustomProfileSharedEntriesExactDataEntryTypeExactData ProfileCustomProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileCustomProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileCustomProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileCustomProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileCustomProfileSharedEntriesWordListEntryType` - `const ProfileCustomProfileSharedEntriesWordListEntryTypeWordList ProfileCustomProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `type ProfilePredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `Entries []ProfilePredefinedProfileEntry` - `type ProfilePredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfilePredefinedProfileEntriesCustomEntryType` - `const ProfilePredefinedProfileEntriesCustomEntryTypeCustom ProfilePredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfilePredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfilePredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfilePredefinedProfileEntriesPredefinedEntryType` - `const ProfilePredefinedProfileEntriesPredefinedEntryTypePredefined ProfilePredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfilePredefinedProfileEntriesPredefinedEntryVariant` - `TopicType ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent ProfilePredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfilePredefinedProfileEntriesPredefinedEntryVariantType` - `const ProfilePredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic ProfilePredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfilePredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesIntegrationEntryType` - `const ProfilePredefinedProfileEntriesIntegrationEntryTypeIntegration ProfilePredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfilePredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfilePredefinedProfileEntriesExactDataEntryType` - `const ProfilePredefinedProfileEntriesExactDataEntryTypeExactData ProfilePredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesDocumentFingerprintEntryType` - `const ProfilePredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfilePredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfilePredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfilePredefinedProfileEntriesWordListEntryType` - `const ProfilePredefinedProfileEntriesWordListEntryTypeWordList ProfilePredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `Type ProfilePredefinedProfileType` - `const ProfilePredefinedProfileTypePredefined ProfilePredefinedProfileType = "predefined"` - `AIContextEnabled bool` - `ConfidenceThreshold ProfilePredefinedProfileConfidenceThreshold` - `const ProfilePredefinedProfileConfidenceThresholdLow ProfilePredefinedProfileConfidenceThreshold = "low"` - `const ProfilePredefinedProfileConfidenceThresholdMedium ProfilePredefinedProfileConfidenceThreshold = "medium"` - `const ProfilePredefinedProfileConfidenceThresholdHigh ProfilePredefinedProfileConfidenceThreshold = "high"` - `const ProfilePredefinedProfileConfidenceThresholdVeryHigh ProfilePredefinedProfileConfidenceThreshold = "very_high"` - `ContextAwareness ContextAwareness` Scan the context of predefined entries to only return matches surrounded by keywords. - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. - `type ProfileIntegrationProfile struct{…}` - `ID string` - `CreatedAt Time` - `Entries []ProfileIntegrationProfileEntry` - `type ProfileIntegrationProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileEntriesCustomEntryType` - `const ProfileIntegrationProfileEntriesCustomEntryTypeCustom ProfileIntegrationProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileEntriesPredefinedEntryType` - `const ProfileIntegrationProfileEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesIntegrationEntryType` - `const ProfileIntegrationProfileEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileEntriesExactDataEntryType` - `const ProfileIntegrationProfileEntriesExactDataEntryTypeExactData ProfileIntegrationProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileEntriesWordListEntryType` - `const ProfileIntegrationProfileEntriesWordListEntryTypeWordList ProfileIntegrationProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` - `SharedEntries []ProfileIntegrationProfileSharedEntry` - `type ProfileIntegrationProfileSharedEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type ProfileIntegrationProfileSharedEntriesCustomEntryType` - `const ProfileIntegrationProfileSharedEntriesCustomEntryTypeCustom ProfileIntegrationProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence ProfileIntegrationProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryTypePredefined ProfileIntegrationProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant ProfileIntegrationProfileSharedEntriesPredefinedEntryVariant` - `TopicType ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicTypeContent ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType` - `const ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantTypePromptTopic ProfileIntegrationProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type ProfileIntegrationProfileSharedEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesIntegrationEntryType` - `const ProfileIntegrationProfileSharedEntriesIntegrationEntryTypeIntegration ProfileIntegrationProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type ProfileIntegrationProfileSharedEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type ProfileIntegrationProfileSharedEntriesExactDataEntryType` - `const ProfileIntegrationProfileSharedEntriesExactDataEntryTypeExactData ProfileIntegrationProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType` - `const ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint ProfileIntegrationProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type ProfileIntegrationProfileSharedEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type ProfileIntegrationProfileSharedEntriesWordListEntryType` - `const ProfileIntegrationProfileSharedEntriesWordListEntryTypeWordList ProfileIntegrationProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Type ProfileIntegrationProfileType` - `const ProfileIntegrationProfileTypeIntegration ProfileIntegrationProfileType = "integration"` - `UpdatedAt Time` - `Description string` The description of the profile. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) profile, err := client.ZeroTrust.DLP.Profiles.Custom.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPProfileCustomUpdateParams{ AccountID: cloudflare.F("account_id"), Name: cloudflare.F("name"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Profiles.Custom.Delete(ctx, profileID, body) (*DLPProfileCustomDeleteResponse, error)` **delete** `/accounts/{account_id}/dlp/profiles/custom/{profile_id}` Deletes a DLP custom profile. ### Parameters - `profileID string` - `body DLPProfileCustomDeleteParams` - `AccountID param.Field[string]` ### Returns - `type DLPProfileCustomDeleteResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) custom, err := client.ZeroTrust.DLP.Profiles.Custom.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPProfileCustomDeleteParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 - `type CustomProfile struct{…}` - `ID string` The id of the profile (uuid). - `AllowedMatchCount int64` Related DLP policies will trigger when the match count exceeds the number set. - `CreatedAt Time` When the profile was created. - `Name string` The name of the profile. - `OCREnabled bool` - `UpdatedAt Time` When the profile was lasted updated. - `AIContextEnabled bool` - `ConfidenceThreshold CustomProfileConfidenceThreshold` - `const CustomProfileConfidenceThresholdLow CustomProfileConfidenceThreshold = "low"` - `const CustomProfileConfidenceThresholdMedium CustomProfileConfidenceThreshold = "medium"` - `const CustomProfileConfidenceThresholdHigh CustomProfileConfidenceThreshold = "high"` - `const CustomProfileConfidenceThresholdVeryHigh CustomProfileConfidenceThreshold = "very_high"` - `ContextAwareness 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. - `DataClasses []string` Data classes associated with this profile. - `DataTags []string` Data tags associated with this profile. - `Description string` The description of the profile. - `Entries []CustomProfileEntry` - `CustomProfileEntriesCustomEntry` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type CustomProfileEntriesCustomEntryType` - `const CustomProfileEntriesCustomEntryTypeCustom CustomProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `CustomProfileEntriesPredefinedEntry` - `ID string` - `Confidence CustomProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type CustomProfileEntriesPredefinedEntryType` - `const CustomProfileEntriesPredefinedEntryTypePredefined CustomProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant CustomProfileEntriesPredefinedEntryVariant` - `TopicType CustomProfileEntriesPredefinedEntryVariantTopicType` - `const CustomProfileEntriesPredefinedEntryVariantTopicTypeIntent CustomProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const CustomProfileEntriesPredefinedEntryVariantTopicTypeContent CustomProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type CustomProfileEntriesPredefinedEntryVariantType` - `const CustomProfileEntriesPredefinedEntryVariantTypePromptTopic CustomProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `CustomProfileEntriesIntegrationEntry` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type CustomProfileEntriesIntegrationEntryType` - `const CustomProfileEntriesIntegrationEntryTypeIntegration CustomProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `CustomProfileEntriesExactDataEntry` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type CustomProfileEntriesExactDataEntryType` - `const CustomProfileEntriesExactDataEntryTypeExactData CustomProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `CustomProfileEntriesDocumentFingerprintEntry` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type CustomProfileEntriesDocumentFingerprintEntryType` - `const CustomProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint CustomProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `CustomProfileEntriesWordListEntry` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type CustomProfileEntriesWordListEntryType` - `const CustomProfileEntriesWordListEntryTypeWordList CustomProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `SensitivityLevels [][]string` Sensitivity levels associated with this profile as (group_id, level_id) tuples. - `SharedEntries []CustomProfileSharedEntry` - `CustomProfileSharedEntriesCustomEntry` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Type CustomProfileSharedEntriesCustomEntryType` - `const CustomProfileSharedEntriesCustomEntryTypeCustom CustomProfileSharedEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `CustomProfileSharedEntriesPredefinedEntry` - `ID string` - `Confidence CustomProfileSharedEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type CustomProfileSharedEntriesPredefinedEntryType` - `const CustomProfileSharedEntriesPredefinedEntryTypePredefined CustomProfileSharedEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant CustomProfileSharedEntriesPredefinedEntryVariant` - `TopicType CustomProfileSharedEntriesPredefinedEntryVariantTopicType` - `const CustomProfileSharedEntriesPredefinedEntryVariantTopicTypeIntent CustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Intent"` - `const CustomProfileSharedEntriesPredefinedEntryVariantTopicTypeContent CustomProfileSharedEntriesPredefinedEntryVariantTopicType = "Content"` - `Type CustomProfileSharedEntriesPredefinedEntryVariantType` - `const CustomProfileSharedEntriesPredefinedEntryVariantTypePromptTopic CustomProfileSharedEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `CustomProfileSharedEntriesIntegrationEntry` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type CustomProfileSharedEntriesIntegrationEntryType` - `const CustomProfileSharedEntriesIntegrationEntryTypeIntegration CustomProfileSharedEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `CustomProfileSharedEntriesExactDataEntry` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type CustomProfileSharedEntriesExactDataEntryType` - `const CustomProfileSharedEntriesExactDataEntryTypeExactData CustomProfileSharedEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `CustomProfileSharedEntriesDocumentFingerprintEntry` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type CustomProfileSharedEntriesDocumentFingerprintEntryType` - `const CustomProfileSharedEntriesDocumentFingerprintEntryTypeDocumentFingerprint CustomProfileSharedEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `CustomProfileSharedEntriesWordListEntry` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type CustomProfileSharedEntriesWordListEntryType` - `const CustomProfileSharedEntriesWordListEntryTypeWordList CustomProfileSharedEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` ### Pattern - `type Pattern struct{…}` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` # Predefined ## Get predefined profile config `client.ZeroTrust.DLP.Profiles.Predefined.Get(ctx, profileID, query) (*PredefinedProfile, error)` **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 - `profileID string` - `query DLPProfilePredefinedGetParams` - `AccountID param.Field[string]` ### Returns - `type PredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `ConfidenceThreshold string` - `EnabledEntries []string` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `Entries []PredefinedProfileEntry` This field has been deprecated for `enabled_entries`. - `type PredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type PredefinedProfileEntriesCustomEntryType` - `const PredefinedProfileEntriesCustomEntryTypeCustom PredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type PredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence PredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type PredefinedProfileEntriesPredefinedEntryType` - `const PredefinedProfileEntriesPredefinedEntryTypePredefined PredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant PredefinedProfileEntriesPredefinedEntryVariant` - `TopicType PredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const PredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent PredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const PredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent PredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type PredefinedProfileEntriesPredefinedEntryVariantType` - `const PredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic PredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type PredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesIntegrationEntryType` - `const PredefinedProfileEntriesIntegrationEntryTypeIntegration PredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type PredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type PredefinedProfileEntriesExactDataEntryType` - `const PredefinedProfileEntriesExactDataEntryTypeExactData PredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type PredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesDocumentFingerprintEntryType` - `const PredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint PredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type PredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesWordListEntryType` - `const PredefinedProfileEntriesWordListEntryTypeWordList PredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `AIContextEnabled bool` - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) predefinedProfile, err := client.ZeroTrust.DLP.Profiles.Predefined.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPProfilePredefinedGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", predefinedProfile.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 `client.ZeroTrust.DLP.Profiles.Predefined.Update(ctx, profileID, params) (*PredefinedProfile, error)` **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 - `profileID string` - `params DLPProfilePredefinedUpdateParams` - `AccountID param.Field[string]` Path param - `AIContextEnabled param.Field[bool]` Body param - `AllowedMatchCount param.Field[int64]` Body param - `ConfidenceThreshold param.Field[string]` Body param - `EnabledEntries param.Field[[]string]` Body param - `Entries param.Field[[]DLPProfilePredefinedUpdateParamsEntry]` Body param - `ID string` - `Enabled bool` - `OCREnabled param.Field[bool]` Body param ### Returns - `type PredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `ConfidenceThreshold string` - `EnabledEntries []string` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `Entries []PredefinedProfileEntry` This field has been deprecated for `enabled_entries`. - `type PredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type PredefinedProfileEntriesCustomEntryType` - `const PredefinedProfileEntriesCustomEntryTypeCustom PredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type PredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence PredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type PredefinedProfileEntriesPredefinedEntryType` - `const PredefinedProfileEntriesPredefinedEntryTypePredefined PredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant PredefinedProfileEntriesPredefinedEntryVariant` - `TopicType PredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const PredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent PredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const PredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent PredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type PredefinedProfileEntriesPredefinedEntryVariantType` - `const PredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic PredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type PredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesIntegrationEntryType` - `const PredefinedProfileEntriesIntegrationEntryTypeIntegration PredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type PredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type PredefinedProfileEntriesExactDataEntryType` - `const PredefinedProfileEntriesExactDataEntryTypeExactData PredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type PredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesDocumentFingerprintEntryType` - `const PredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint PredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type PredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesWordListEntryType` - `const PredefinedProfileEntriesWordListEntryTypeWordList PredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `AIContextEnabled bool` - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) predefinedProfile, err := client.ZeroTrust.DLP.Profiles.Predefined.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPProfilePredefinedUpdateParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", predefinedProfile.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 `client.ZeroTrust.DLP.Profiles.Predefined.Delete(ctx, profileID, body) (*DLPProfilePredefinedDeleteResponse, error)` **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 - `profileID string` - `body DLPProfilePredefinedDeleteParams` - `AccountID param.Field[string]` ### Returns - `type DLPProfilePredefinedDeleteResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) predefined, err := client.ZeroTrust.DLP.Profiles.Predefined.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPProfilePredefinedDeleteParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 - `type PredefinedProfile struct{…}` - `ID string` The id of the predefined profile (uuid). - `AllowedMatchCount int64` - `ConfidenceThreshold string` - `EnabledEntries []string` Entries to enable for this predefined profile. Any entries not provided will be disabled. - `Entries []PredefinedProfileEntry` This field has been deprecated for `enabled_entries`. - `type PredefinedProfileEntriesCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type PredefinedProfileEntriesCustomEntryType` - `const PredefinedProfileEntriesCustomEntryTypeCustom PredefinedProfileEntriesCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type PredefinedProfileEntriesPredefinedEntry struct{…}` - `ID string` - `Confidence PredefinedProfileEntriesPredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type PredefinedProfileEntriesPredefinedEntryType` - `const PredefinedProfileEntriesPredefinedEntryTypePredefined PredefinedProfileEntriesPredefinedEntryType = "predefined"` - `ProfileID string` - `Variant PredefinedProfileEntriesPredefinedEntryVariant` - `TopicType PredefinedProfileEntriesPredefinedEntryVariantTopicType` - `const PredefinedProfileEntriesPredefinedEntryVariantTopicTypeIntent PredefinedProfileEntriesPredefinedEntryVariantTopicType = "Intent"` - `const PredefinedProfileEntriesPredefinedEntryVariantTopicTypeContent PredefinedProfileEntriesPredefinedEntryVariantTopicType = "Content"` - `Type PredefinedProfileEntriesPredefinedEntryVariantType` - `const PredefinedProfileEntriesPredefinedEntryVariantTypePromptTopic PredefinedProfileEntriesPredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type PredefinedProfileEntriesIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesIntegrationEntryType` - `const PredefinedProfileEntriesIntegrationEntryTypeIntegration PredefinedProfileEntriesIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type PredefinedProfileEntriesExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type PredefinedProfileEntriesExactDataEntryType` - `const PredefinedProfileEntriesExactDataEntryTypeExactData PredefinedProfileEntriesExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type PredefinedProfileEntriesDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesDocumentFingerprintEntryType` - `const PredefinedProfileEntriesDocumentFingerprintEntryTypeDocumentFingerprint PredefinedProfileEntriesDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type PredefinedProfileEntriesWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type PredefinedProfileEntriesWordListEntryType` - `const PredefinedProfileEntriesWordListEntryTypeWordList PredefinedProfileEntriesWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Name string` The name of the predefined profile. - `AIContextEnabled bool` - `OCREnabled bool` - `OpenAccess bool` Whether this profile can be accessed by anyone. # Limits ## Fetch limits associated with DLP for account `client.ZeroTrust.DLP.Limits.List(ctx, query) (*DLPLimitListResponse, error)` **get** `/accounts/{account_id}/dlp/limits` Retrieves current DLP usage limits and quotas for the account, including dataset limits and scan quotas. ### Parameters - `query DLPLimitListParams` - `AccountID param.Field[string]` ### Returns - `type DLPLimitListResponse struct{…}` - `MaxDatasetCells int64` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) limits, err := client.ZeroTrust.DLP.Limits.List(context.TODO(), zero_trust.DLPLimitListParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", limits.MaxDatasetCells) } ``` #### 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 } } ``` # Entries ## List all entries `client.ZeroTrust.DLP.Entries.List(ctx, query) (*SinglePage[DLPEntryListResponse], error)` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `query DLPEntryListParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryListResponse interface{…}` - `type DLPEntryListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryListResponseObjectType` - `const DLPEntryListResponseObjectTypeCustom DLPEntryListResponseObjectType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `UploadStatus DLPEntryListResponseObjectUploadStatus` - `const DLPEntryListResponseObjectUploadStatusEmpty DLPEntryListResponseObjectUploadStatus = "empty"` - `const DLPEntryListResponseObjectUploadStatusUploading DLPEntryListResponseObjectUploadStatus = "uploading"` - `const DLPEntryListResponseObjectUploadStatusPending DLPEntryListResponseObjectUploadStatus = "pending"` - `const DLPEntryListResponseObjectUploadStatusProcessing DLPEntryListResponseObjectUploadStatus = "processing"` - `const DLPEntryListResponseObjectUploadStatusFailed DLPEntryListResponseObjectUploadStatus = "failed"` - `const DLPEntryListResponseObjectUploadStatusComplete DLPEntryListResponseObjectUploadStatus = "complete"` - `type DLPEntryListResponseObject struct{…}` - `ID string` - `Confidence DLPEntryListResponseObjectConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryListResponseObjectType` - `const DLPEntryListResponseObjectTypePredefined DLPEntryListResponseObjectType = "predefined"` - `ProfileID string` - `UploadStatus DLPEntryListResponseObjectUploadStatus` - `const DLPEntryListResponseObjectUploadStatusEmpty DLPEntryListResponseObjectUploadStatus = "empty"` - `const DLPEntryListResponseObjectUploadStatusUploading DLPEntryListResponseObjectUploadStatus = "uploading"` - `const DLPEntryListResponseObjectUploadStatusPending DLPEntryListResponseObjectUploadStatus = "pending"` - `const DLPEntryListResponseObjectUploadStatusProcessing DLPEntryListResponseObjectUploadStatus = "processing"` - `const DLPEntryListResponseObjectUploadStatusFailed DLPEntryListResponseObjectUploadStatus = "failed"` - `const DLPEntryListResponseObjectUploadStatusComplete DLPEntryListResponseObjectUploadStatus = "complete"` - `Variant DLPEntryListResponseObjectVariant` - `TopicType DLPEntryListResponseObjectVariantTopicType` - `const DLPEntryListResponseObjectVariantTopicTypeIntent DLPEntryListResponseObjectVariantTopicType = "Intent"` - `const DLPEntryListResponseObjectVariantTopicTypeContent DLPEntryListResponseObjectVariantTopicType = "Content"` - `Type DLPEntryListResponseObjectVariantType` - `const DLPEntryListResponseObjectVariantTypePromptTopic DLPEntryListResponseObjectVariantType = "PromptTopic"` - `Description string` - `type DLPEntryListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryListResponseObjectType` - `const DLPEntryListResponseObjectTypeIntegration DLPEntryListResponseObjectType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `UploadStatus DLPEntryListResponseObjectUploadStatus` - `const DLPEntryListResponseObjectUploadStatusEmpty DLPEntryListResponseObjectUploadStatus = "empty"` - `const DLPEntryListResponseObjectUploadStatusUploading DLPEntryListResponseObjectUploadStatus = "uploading"` - `const DLPEntryListResponseObjectUploadStatusPending DLPEntryListResponseObjectUploadStatus = "pending"` - `const DLPEntryListResponseObjectUploadStatusProcessing DLPEntryListResponseObjectUploadStatus = "processing"` - `const DLPEntryListResponseObjectUploadStatusFailed DLPEntryListResponseObjectUploadStatus = "failed"` - `const DLPEntryListResponseObjectUploadStatusComplete DLPEntryListResponseObjectUploadStatus = "complete"` - `type DLPEntryListResponseObject struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryListResponseObjectType` - `const DLPEntryListResponseObjectTypeExactData DLPEntryListResponseObjectType = "exact_data"` - `UpdatedAt Time` - `UploadStatus DLPEntryListResponseObjectUploadStatus` - `const DLPEntryListResponseObjectUploadStatusEmpty DLPEntryListResponseObjectUploadStatus = "empty"` - `const DLPEntryListResponseObjectUploadStatusUploading DLPEntryListResponseObjectUploadStatus = "uploading"` - `const DLPEntryListResponseObjectUploadStatusPending DLPEntryListResponseObjectUploadStatus = "pending"` - `const DLPEntryListResponseObjectUploadStatusProcessing DLPEntryListResponseObjectUploadStatus = "processing"` - `const DLPEntryListResponseObjectUploadStatusFailed DLPEntryListResponseObjectUploadStatus = "failed"` - `const DLPEntryListResponseObjectUploadStatusComplete DLPEntryListResponseObjectUploadStatus = "complete"` - `type DLPEntryListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryListResponseObjectType` - `const DLPEntryListResponseObjectTypeDocumentFingerprint DLPEntryListResponseObjectType = "document_fingerprint"` - `UpdatedAt Time` - `UploadStatus DLPEntryListResponseObjectUploadStatus` - `const DLPEntryListResponseObjectUploadStatusEmpty DLPEntryListResponseObjectUploadStatus = "empty"` - `const DLPEntryListResponseObjectUploadStatusUploading DLPEntryListResponseObjectUploadStatus = "uploading"` - `const DLPEntryListResponseObjectUploadStatusPending DLPEntryListResponseObjectUploadStatus = "pending"` - `const DLPEntryListResponseObjectUploadStatusProcessing DLPEntryListResponseObjectUploadStatus = "processing"` - `const DLPEntryListResponseObjectUploadStatusFailed DLPEntryListResponseObjectUploadStatus = "failed"` - `const DLPEntryListResponseObjectUploadStatusComplete DLPEntryListResponseObjectUploadStatus = "complete"` - `type DLPEntryListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryListResponseObjectType` - `const DLPEntryListResponseObjectTypeWordList DLPEntryListResponseObjectType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `UploadStatus DLPEntryListResponseObjectUploadStatus` - `const DLPEntryListResponseObjectUploadStatusEmpty DLPEntryListResponseObjectUploadStatus = "empty"` - `const DLPEntryListResponseObjectUploadStatusUploading DLPEntryListResponseObjectUploadStatus = "uploading"` - `const DLPEntryListResponseObjectUploadStatusPending DLPEntryListResponseObjectUploadStatus = "pending"` - `const DLPEntryListResponseObjectUploadStatusProcessing DLPEntryListResponseObjectUploadStatus = "processing"` - `const DLPEntryListResponseObjectUploadStatusFailed DLPEntryListResponseObjectUploadStatus = "failed"` - `const DLPEntryListResponseObjectUploadStatusComplete DLPEntryListResponseObjectUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.ZeroTrust.DLP.Entries.List(context.TODO(), zero_trust.DLPEntryListParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Get(ctx, entryID, query) (*DLPEntryGetResponse, error)` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `entryID string` - `query DLPEntryGetParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryGetResponse interface{…}` - `type DLPEntryGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryGetResponseObjectType` - `const DLPEntryGetResponseObjectTypeCustom DLPEntryGetResponseObjectType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `Profiles []DLPEntryGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryGetResponseObjectUploadStatus` - `const DLPEntryGetResponseObjectUploadStatusEmpty DLPEntryGetResponseObjectUploadStatus = "empty"` - `const DLPEntryGetResponseObjectUploadStatusUploading DLPEntryGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryGetResponseObjectUploadStatusPending DLPEntryGetResponseObjectUploadStatus = "pending"` - `const DLPEntryGetResponseObjectUploadStatusProcessing DLPEntryGetResponseObjectUploadStatus = "processing"` - `const DLPEntryGetResponseObjectUploadStatusFailed DLPEntryGetResponseObjectUploadStatus = "failed"` - `const DLPEntryGetResponseObjectUploadStatusComplete DLPEntryGetResponseObjectUploadStatus = "complete"` - `type DLPEntryGetResponseObject struct{…}` - `ID string` - `Confidence DLPEntryGetResponseObjectConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryGetResponseObjectType` - `const DLPEntryGetResponseObjectTypePredefined DLPEntryGetResponseObjectType = "predefined"` - `ProfileID string` - `Profiles []DLPEntryGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryGetResponseObjectUploadStatus` - `const DLPEntryGetResponseObjectUploadStatusEmpty DLPEntryGetResponseObjectUploadStatus = "empty"` - `const DLPEntryGetResponseObjectUploadStatusUploading DLPEntryGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryGetResponseObjectUploadStatusPending DLPEntryGetResponseObjectUploadStatus = "pending"` - `const DLPEntryGetResponseObjectUploadStatusProcessing DLPEntryGetResponseObjectUploadStatus = "processing"` - `const DLPEntryGetResponseObjectUploadStatusFailed DLPEntryGetResponseObjectUploadStatus = "failed"` - `const DLPEntryGetResponseObjectUploadStatusComplete DLPEntryGetResponseObjectUploadStatus = "complete"` - `Variant DLPEntryGetResponseObjectVariant` - `TopicType DLPEntryGetResponseObjectVariantTopicType` - `const DLPEntryGetResponseObjectVariantTopicTypeIntent DLPEntryGetResponseObjectVariantTopicType = "Intent"` - `const DLPEntryGetResponseObjectVariantTopicTypeContent DLPEntryGetResponseObjectVariantTopicType = "Content"` - `Type DLPEntryGetResponseObjectVariantType` - `const DLPEntryGetResponseObjectVariantTypePromptTopic DLPEntryGetResponseObjectVariantType = "PromptTopic"` - `Description string` - `type DLPEntryGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryGetResponseObjectType` - `const DLPEntryGetResponseObjectTypeIntegration DLPEntryGetResponseObjectType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `Profiles []DLPEntryGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryGetResponseObjectUploadStatus` - `const DLPEntryGetResponseObjectUploadStatusEmpty DLPEntryGetResponseObjectUploadStatus = "empty"` - `const DLPEntryGetResponseObjectUploadStatusUploading DLPEntryGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryGetResponseObjectUploadStatusPending DLPEntryGetResponseObjectUploadStatus = "pending"` - `const DLPEntryGetResponseObjectUploadStatusProcessing DLPEntryGetResponseObjectUploadStatus = "processing"` - `const DLPEntryGetResponseObjectUploadStatusFailed DLPEntryGetResponseObjectUploadStatus = "failed"` - `const DLPEntryGetResponseObjectUploadStatusComplete DLPEntryGetResponseObjectUploadStatus = "complete"` - `type DLPEntryGetResponseObject struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryGetResponseObjectType` - `const DLPEntryGetResponseObjectTypeExactData DLPEntryGetResponseObjectType = "exact_data"` - `UpdatedAt Time` - `Profiles []DLPEntryGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryGetResponseObjectUploadStatus` - `const DLPEntryGetResponseObjectUploadStatusEmpty DLPEntryGetResponseObjectUploadStatus = "empty"` - `const DLPEntryGetResponseObjectUploadStatusUploading DLPEntryGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryGetResponseObjectUploadStatusPending DLPEntryGetResponseObjectUploadStatus = "pending"` - `const DLPEntryGetResponseObjectUploadStatusProcessing DLPEntryGetResponseObjectUploadStatus = "processing"` - `const DLPEntryGetResponseObjectUploadStatusFailed DLPEntryGetResponseObjectUploadStatus = "failed"` - `const DLPEntryGetResponseObjectUploadStatusComplete DLPEntryGetResponseObjectUploadStatus = "complete"` - `type DLPEntryGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryGetResponseObjectType` - `const DLPEntryGetResponseObjectTypeDocumentFingerprint DLPEntryGetResponseObjectType = "document_fingerprint"` - `UpdatedAt Time` - `Profiles []DLPEntryGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryGetResponseObjectUploadStatus` - `const DLPEntryGetResponseObjectUploadStatusEmpty DLPEntryGetResponseObjectUploadStatus = "empty"` - `const DLPEntryGetResponseObjectUploadStatusUploading DLPEntryGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryGetResponseObjectUploadStatusPending DLPEntryGetResponseObjectUploadStatus = "pending"` - `const DLPEntryGetResponseObjectUploadStatusProcessing DLPEntryGetResponseObjectUploadStatus = "processing"` - `const DLPEntryGetResponseObjectUploadStatusFailed DLPEntryGetResponseObjectUploadStatus = "failed"` - `const DLPEntryGetResponseObjectUploadStatusComplete DLPEntryGetResponseObjectUploadStatus = "complete"` - `type DLPEntryGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryGetResponseObjectType` - `const DLPEntryGetResponseObjectTypeWordList DLPEntryGetResponseObjectType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Profiles []DLPEntryGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryGetResponseObjectUploadStatus` - `const DLPEntryGetResponseObjectUploadStatusEmpty DLPEntryGetResponseObjectUploadStatus = "empty"` - `const DLPEntryGetResponseObjectUploadStatusUploading DLPEntryGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryGetResponseObjectUploadStatusPending DLPEntryGetResponseObjectUploadStatus = "pending"` - `const DLPEntryGetResponseObjectUploadStatusProcessing DLPEntryGetResponseObjectUploadStatus = "processing"` - `const DLPEntryGetResponseObjectUploadStatusFailed DLPEntryGetResponseObjectUploadStatus = "failed"` - `const DLPEntryGetResponseObjectUploadStatusComplete DLPEntryGetResponseObjectUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) entry, err := client.ZeroTrust.DLP.Entries.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.New(ctx, params) (*DLPEntryNewResponse, error)` **post** `/accounts/{account_id}/dlp/entries` Creates a DLP custom entry. ### Parameters - `params DLPEntryNewParams` - `AccountID param.Field[string]` Path param - `Enabled param.Field[bool]` Body param - `Name param.Field[string]` Body param - `Pattern param.Field[Pattern]` Body param - `Description param.Field[string]` Body param - `ProfileID param.Field[string]` Body param ### Returns - `type DLPEntryNewResponse struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `UpdatedAt Time` - `Description string` - `ProfileID string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) entry, err := client.ZeroTrust.DLP.Entries.New(context.TODO(), zero_trust.DLPEntryNewParams{ AccountID: cloudflare.F("account_id"), Enabled: cloudflare.F(true), Name: cloudflare.F("name"), Pattern: cloudflare.F(zero_trust.PatternParam{ Regex: cloudflare.F("regex"), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Update(ctx, entryID, params) (*DLPEntryUpdateResponse, error)` **put** `/accounts/{account_id}/dlp/entries/{entry_id}` Updates a DLP entry. ### Parameters - `entryID string` - `params DLPEntryUpdateParams` - `AccountID param.Field[string]` Path param - `Name param.Field[string]` Body param - `Pattern param.Field[Pattern]` Body param - `Type param.Field[DLPEntryUpdateParamsVariant0Type]` Body param - `const DLPEntryUpdateParamsVariant0TypeCustom DLPEntryUpdateParamsVariant0Type = "custom"` - `Description param.Field[string]` Body param - `Enabled param.Field[bool]` Body param ### Returns - `type DLPEntryUpdateResponse interface{…}` - `type DLPEntryUpdateResponseCustomEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryUpdateResponseCustomEntryType` - `const DLPEntryUpdateResponseCustomEntryTypeCustom DLPEntryUpdateResponseCustomEntryType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `type DLPEntryUpdateResponsePredefinedEntry struct{…}` - `ID string` - `Confidence DLPEntryUpdateResponsePredefinedEntryConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryUpdateResponsePredefinedEntryType` - `const DLPEntryUpdateResponsePredefinedEntryTypePredefined DLPEntryUpdateResponsePredefinedEntryType = "predefined"` - `ProfileID string` - `Variant DLPEntryUpdateResponsePredefinedEntryVariant` - `TopicType DLPEntryUpdateResponsePredefinedEntryVariantTopicType` - `const DLPEntryUpdateResponsePredefinedEntryVariantTopicTypeIntent DLPEntryUpdateResponsePredefinedEntryVariantTopicType = "Intent"` - `const DLPEntryUpdateResponsePredefinedEntryVariantTopicTypeContent DLPEntryUpdateResponsePredefinedEntryVariantTopicType = "Content"` - `Type DLPEntryUpdateResponsePredefinedEntryVariantType` - `const DLPEntryUpdateResponsePredefinedEntryVariantTypePromptTopic DLPEntryUpdateResponsePredefinedEntryVariantType = "PromptTopic"` - `Description string` - `type DLPEntryUpdateResponseIntegrationEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryUpdateResponseIntegrationEntryType` - `const DLPEntryUpdateResponseIntegrationEntryTypeIntegration DLPEntryUpdateResponseIntegrationEntryType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `type DLPEntryUpdateResponseExactDataEntry struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryUpdateResponseExactDataEntryType` - `const DLPEntryUpdateResponseExactDataEntryTypeExactData DLPEntryUpdateResponseExactDataEntryType = "exact_data"` - `UpdatedAt Time` - `type DLPEntryUpdateResponseDocumentFingerprintEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryUpdateResponseDocumentFingerprintEntryType` - `const DLPEntryUpdateResponseDocumentFingerprintEntryTypeDocumentFingerprint DLPEntryUpdateResponseDocumentFingerprintEntryType = "document_fingerprint"` - `UpdatedAt Time` - `type DLPEntryUpdateResponseWordListEntry struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryUpdateResponseWordListEntryType` - `const DLPEntryUpdateResponseWordListEntryTypeWordList DLPEntryUpdateResponseWordListEntryType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) entry, err := client.ZeroTrust.DLP.Entries.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryUpdateParams{ AccountID: cloudflare.F("account_id"), Body: zero_trust.DLPEntryUpdateParamsBodyCustom{ Name: cloudflare.F("name"), Pattern: cloudflare.F(zero_trust.PatternParam{ Regex: cloudflare.F("regex"), }), Type: cloudflare.F(zero_trust.DLPEntryUpdateParamsBodyCustomTypeCustom), }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Delete(ctx, entryID, body) (*DLPEntryDeleteResponse, error)` **delete** `/accounts/{account_id}/dlp/entries/{entry_id}` Deletes a DLP custom entry. ### Parameters - `entryID string` - `body DLPEntryDeleteParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryDeleteResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) entry, err := client.ZeroTrust.DLP.Entries.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryDeleteParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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": {} } ``` # Custom ## Create custom entry `client.ZeroTrust.DLP.Entries.Custom.New(ctx, params) (*DLPEntryCustomNewResponse, error)` **post** `/accounts/{account_id}/dlp/entries` Creates a DLP custom entry. ### Parameters - `params DLPEntryCustomNewParams` - `AccountID param.Field[string]` Path param - `Enabled param.Field[bool]` Body param - `Name param.Field[string]` Body param - `Pattern param.Field[Pattern]` Body param - `Description param.Field[string]` Body param - `ProfileID param.Field[string]` Body param ### Returns - `type DLPEntryCustomNewResponse struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `UpdatedAt Time` - `Description string` - `ProfileID string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) custom, err := client.ZeroTrust.DLP.Entries.Custom.New(context.TODO(), zero_trust.DLPEntryCustomNewParams{ AccountID: cloudflare.F("account_id"), Enabled: cloudflare.F(true), Name: cloudflare.F("name"), Pattern: cloudflare.F(zero_trust.PatternParam{ Regex: cloudflare.F("regex"), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Custom.Update(ctx, entryID, params) (*DLPEntryCustomUpdateResponse, error)` **put** `/accounts/{account_id}/dlp/entries/custom/{entry_id}` Updates a DLP custom entry. ### Parameters - `entryID string` - `params DLPEntryCustomUpdateParams` - `AccountID param.Field[string]` Path param - `Enabled param.Field[bool]` Body param - `Name param.Field[string]` Body param - `Pattern param.Field[Pattern]` Body param - `Description param.Field[string]` Body param ### Returns - `type DLPEntryCustomUpdateResponse struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `UpdatedAt Time` - `Description string` - `ProfileID string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) custom, err := client.ZeroTrust.DLP.Entries.Custom.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryCustomUpdateParams{ AccountID: cloudflare.F("account_id"), Enabled: cloudflare.F(true), Name: cloudflare.F("name"), Pattern: cloudflare.F(zero_trust.PatternParam{ Regex: cloudflare.F("regex"), }), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Custom.Delete(ctx, entryID, body) (*DLPEntryCustomDeleteResponse, error)` **delete** `/accounts/{account_id}/dlp/entries/{entry_id}` Deletes a DLP custom entry. ### Parameters - `entryID string` - `body DLPEntryCustomDeleteParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryCustomDeleteResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) custom, err := client.ZeroTrust.DLP.Entries.Custom.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryCustomDeleteParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Custom.Get(ctx, entryID, query) (*DLPEntryCustomGetResponse, error)` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `entryID string` - `query DLPEntryCustomGetParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryCustomGetResponse interface{…}` - `type DLPEntryCustomGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryCustomGetResponseObjectType` - `const DLPEntryCustomGetResponseObjectTypeCustom DLPEntryCustomGetResponseObjectType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `Profiles []DLPEntryCustomGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryCustomGetResponseObjectUploadStatus` - `const DLPEntryCustomGetResponseObjectUploadStatusEmpty DLPEntryCustomGetResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomGetResponseObjectUploadStatusUploading DLPEntryCustomGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomGetResponseObjectUploadStatusPending DLPEntryCustomGetResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomGetResponseObjectUploadStatusProcessing DLPEntryCustomGetResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomGetResponseObjectUploadStatusFailed DLPEntryCustomGetResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomGetResponseObjectUploadStatusComplete DLPEntryCustomGetResponseObjectUploadStatus = "complete"` - `type DLPEntryCustomGetResponseObject struct{…}` - `ID string` - `Confidence DLPEntryCustomGetResponseObjectConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryCustomGetResponseObjectType` - `const DLPEntryCustomGetResponseObjectTypePredefined DLPEntryCustomGetResponseObjectType = "predefined"` - `ProfileID string` - `Profiles []DLPEntryCustomGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryCustomGetResponseObjectUploadStatus` - `const DLPEntryCustomGetResponseObjectUploadStatusEmpty DLPEntryCustomGetResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomGetResponseObjectUploadStatusUploading DLPEntryCustomGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomGetResponseObjectUploadStatusPending DLPEntryCustomGetResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomGetResponseObjectUploadStatusProcessing DLPEntryCustomGetResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomGetResponseObjectUploadStatusFailed DLPEntryCustomGetResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomGetResponseObjectUploadStatusComplete DLPEntryCustomGetResponseObjectUploadStatus = "complete"` - `Variant DLPEntryCustomGetResponseObjectVariant` - `TopicType DLPEntryCustomGetResponseObjectVariantTopicType` - `const DLPEntryCustomGetResponseObjectVariantTopicTypeIntent DLPEntryCustomGetResponseObjectVariantTopicType = "Intent"` - `const DLPEntryCustomGetResponseObjectVariantTopicTypeContent DLPEntryCustomGetResponseObjectVariantTopicType = "Content"` - `Type DLPEntryCustomGetResponseObjectVariantType` - `const DLPEntryCustomGetResponseObjectVariantTypePromptTopic DLPEntryCustomGetResponseObjectVariantType = "PromptTopic"` - `Description string` - `type DLPEntryCustomGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryCustomGetResponseObjectType` - `const DLPEntryCustomGetResponseObjectTypeIntegration DLPEntryCustomGetResponseObjectType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `Profiles []DLPEntryCustomGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryCustomGetResponseObjectUploadStatus` - `const DLPEntryCustomGetResponseObjectUploadStatusEmpty DLPEntryCustomGetResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomGetResponseObjectUploadStatusUploading DLPEntryCustomGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomGetResponseObjectUploadStatusPending DLPEntryCustomGetResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomGetResponseObjectUploadStatusProcessing DLPEntryCustomGetResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomGetResponseObjectUploadStatusFailed DLPEntryCustomGetResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomGetResponseObjectUploadStatusComplete DLPEntryCustomGetResponseObjectUploadStatus = "complete"` - `type DLPEntryCustomGetResponseObject struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryCustomGetResponseObjectType` - `const DLPEntryCustomGetResponseObjectTypeExactData DLPEntryCustomGetResponseObjectType = "exact_data"` - `UpdatedAt Time` - `Profiles []DLPEntryCustomGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryCustomGetResponseObjectUploadStatus` - `const DLPEntryCustomGetResponseObjectUploadStatusEmpty DLPEntryCustomGetResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomGetResponseObjectUploadStatusUploading DLPEntryCustomGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomGetResponseObjectUploadStatusPending DLPEntryCustomGetResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomGetResponseObjectUploadStatusProcessing DLPEntryCustomGetResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomGetResponseObjectUploadStatusFailed DLPEntryCustomGetResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomGetResponseObjectUploadStatusComplete DLPEntryCustomGetResponseObjectUploadStatus = "complete"` - `type DLPEntryCustomGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryCustomGetResponseObjectType` - `const DLPEntryCustomGetResponseObjectTypeDocumentFingerprint DLPEntryCustomGetResponseObjectType = "document_fingerprint"` - `UpdatedAt Time` - `Profiles []DLPEntryCustomGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryCustomGetResponseObjectUploadStatus` - `const DLPEntryCustomGetResponseObjectUploadStatusEmpty DLPEntryCustomGetResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomGetResponseObjectUploadStatusUploading DLPEntryCustomGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomGetResponseObjectUploadStatusPending DLPEntryCustomGetResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomGetResponseObjectUploadStatusProcessing DLPEntryCustomGetResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomGetResponseObjectUploadStatusFailed DLPEntryCustomGetResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomGetResponseObjectUploadStatusComplete DLPEntryCustomGetResponseObjectUploadStatus = "complete"` - `type DLPEntryCustomGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryCustomGetResponseObjectType` - `const DLPEntryCustomGetResponseObjectTypeWordList DLPEntryCustomGetResponseObjectType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Profiles []DLPEntryCustomGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryCustomGetResponseObjectUploadStatus` - `const DLPEntryCustomGetResponseObjectUploadStatusEmpty DLPEntryCustomGetResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomGetResponseObjectUploadStatusUploading DLPEntryCustomGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomGetResponseObjectUploadStatusPending DLPEntryCustomGetResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomGetResponseObjectUploadStatusProcessing DLPEntryCustomGetResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomGetResponseObjectUploadStatusFailed DLPEntryCustomGetResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomGetResponseObjectUploadStatusComplete DLPEntryCustomGetResponseObjectUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) custom, err := client.ZeroTrust.DLP.Entries.Custom.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryCustomGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Custom.List(ctx, query) (*SinglePage[DLPEntryCustomListResponse], error)` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `query DLPEntryCustomListParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryCustomListResponse interface{…}` - `type DLPEntryCustomListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryCustomListResponseObjectType` - `const DLPEntryCustomListResponseObjectTypeCustom DLPEntryCustomListResponseObjectType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `UploadStatus DLPEntryCustomListResponseObjectUploadStatus` - `const DLPEntryCustomListResponseObjectUploadStatusEmpty DLPEntryCustomListResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomListResponseObjectUploadStatusUploading DLPEntryCustomListResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomListResponseObjectUploadStatusPending DLPEntryCustomListResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomListResponseObjectUploadStatusProcessing DLPEntryCustomListResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomListResponseObjectUploadStatusFailed DLPEntryCustomListResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomListResponseObjectUploadStatusComplete DLPEntryCustomListResponseObjectUploadStatus = "complete"` - `type DLPEntryCustomListResponseObject struct{…}` - `ID string` - `Confidence DLPEntryCustomListResponseObjectConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryCustomListResponseObjectType` - `const DLPEntryCustomListResponseObjectTypePredefined DLPEntryCustomListResponseObjectType = "predefined"` - `ProfileID string` - `UploadStatus DLPEntryCustomListResponseObjectUploadStatus` - `const DLPEntryCustomListResponseObjectUploadStatusEmpty DLPEntryCustomListResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomListResponseObjectUploadStatusUploading DLPEntryCustomListResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomListResponseObjectUploadStatusPending DLPEntryCustomListResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomListResponseObjectUploadStatusProcessing DLPEntryCustomListResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomListResponseObjectUploadStatusFailed DLPEntryCustomListResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomListResponseObjectUploadStatusComplete DLPEntryCustomListResponseObjectUploadStatus = "complete"` - `Variant DLPEntryCustomListResponseObjectVariant` - `TopicType DLPEntryCustomListResponseObjectVariantTopicType` - `const DLPEntryCustomListResponseObjectVariantTopicTypeIntent DLPEntryCustomListResponseObjectVariantTopicType = "Intent"` - `const DLPEntryCustomListResponseObjectVariantTopicTypeContent DLPEntryCustomListResponseObjectVariantTopicType = "Content"` - `Type DLPEntryCustomListResponseObjectVariantType` - `const DLPEntryCustomListResponseObjectVariantTypePromptTopic DLPEntryCustomListResponseObjectVariantType = "PromptTopic"` - `Description string` - `type DLPEntryCustomListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryCustomListResponseObjectType` - `const DLPEntryCustomListResponseObjectTypeIntegration DLPEntryCustomListResponseObjectType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `UploadStatus DLPEntryCustomListResponseObjectUploadStatus` - `const DLPEntryCustomListResponseObjectUploadStatusEmpty DLPEntryCustomListResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomListResponseObjectUploadStatusUploading DLPEntryCustomListResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomListResponseObjectUploadStatusPending DLPEntryCustomListResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomListResponseObjectUploadStatusProcessing DLPEntryCustomListResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomListResponseObjectUploadStatusFailed DLPEntryCustomListResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomListResponseObjectUploadStatusComplete DLPEntryCustomListResponseObjectUploadStatus = "complete"` - `type DLPEntryCustomListResponseObject struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryCustomListResponseObjectType` - `const DLPEntryCustomListResponseObjectTypeExactData DLPEntryCustomListResponseObjectType = "exact_data"` - `UpdatedAt Time` - `UploadStatus DLPEntryCustomListResponseObjectUploadStatus` - `const DLPEntryCustomListResponseObjectUploadStatusEmpty DLPEntryCustomListResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomListResponseObjectUploadStatusUploading DLPEntryCustomListResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomListResponseObjectUploadStatusPending DLPEntryCustomListResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomListResponseObjectUploadStatusProcessing DLPEntryCustomListResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomListResponseObjectUploadStatusFailed DLPEntryCustomListResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomListResponseObjectUploadStatusComplete DLPEntryCustomListResponseObjectUploadStatus = "complete"` - `type DLPEntryCustomListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryCustomListResponseObjectType` - `const DLPEntryCustomListResponseObjectTypeDocumentFingerprint DLPEntryCustomListResponseObjectType = "document_fingerprint"` - `UpdatedAt Time` - `UploadStatus DLPEntryCustomListResponseObjectUploadStatus` - `const DLPEntryCustomListResponseObjectUploadStatusEmpty DLPEntryCustomListResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomListResponseObjectUploadStatusUploading DLPEntryCustomListResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomListResponseObjectUploadStatusPending DLPEntryCustomListResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomListResponseObjectUploadStatusProcessing DLPEntryCustomListResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomListResponseObjectUploadStatusFailed DLPEntryCustomListResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomListResponseObjectUploadStatusComplete DLPEntryCustomListResponseObjectUploadStatus = "complete"` - `type DLPEntryCustomListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryCustomListResponseObjectType` - `const DLPEntryCustomListResponseObjectTypeWordList DLPEntryCustomListResponseObjectType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `UploadStatus DLPEntryCustomListResponseObjectUploadStatus` - `const DLPEntryCustomListResponseObjectUploadStatusEmpty DLPEntryCustomListResponseObjectUploadStatus = "empty"` - `const DLPEntryCustomListResponseObjectUploadStatusUploading DLPEntryCustomListResponseObjectUploadStatus = "uploading"` - `const DLPEntryCustomListResponseObjectUploadStatusPending DLPEntryCustomListResponseObjectUploadStatus = "pending"` - `const DLPEntryCustomListResponseObjectUploadStatusProcessing DLPEntryCustomListResponseObjectUploadStatus = "processing"` - `const DLPEntryCustomListResponseObjectUploadStatusFailed DLPEntryCustomListResponseObjectUploadStatus = "failed"` - `const DLPEntryCustomListResponseObjectUploadStatusComplete DLPEntryCustomListResponseObjectUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.ZeroTrust.DLP.Entries.Custom.List(context.TODO(), zero_trust.DLPEntryCustomListParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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" } ] } ``` # Predefined ## Create predefined entry `client.ZeroTrust.DLP.Entries.Predefined.New(ctx, params) (*DLPEntryPredefinedNewResponse, error)` **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 - `params DLPEntryPredefinedNewParams` - `AccountID param.Field[string]` Path param - `Enabled param.Field[bool]` Body param - `EntryID param.Field[string]` Body param - `ProfileID param.Field[string]` Body param: This field is not used as the owning profile. For predefined entries it is already set to a predefined profile. ### Returns - `type DLPEntryPredefinedNewResponse struct{…}` - `ID string` - `Confidence DLPEntryPredefinedNewResponseConfidence` - `AIContextAvailable 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 string` - `ProfileID string` - `Variant DLPEntryPredefinedNewResponseVariant` - `TopicType DLPEntryPredefinedNewResponseVariantTopicType` - `const DLPEntryPredefinedNewResponseVariantTopicTypeIntent DLPEntryPredefinedNewResponseVariantTopicType = "Intent"` - `const DLPEntryPredefinedNewResponseVariantTopicTypeContent DLPEntryPredefinedNewResponseVariantTopicType = "Content"` - `Type DLPEntryPredefinedNewResponseVariantType` - `const DLPEntryPredefinedNewResponseVariantTypePromptTopic DLPEntryPredefinedNewResponseVariantType = "PromptTopic"` - `Description string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) predefined, err := client.ZeroTrust.DLP.Entries.Predefined.New(context.TODO(), zero_trust.DLPEntryPredefinedNewParams{ AccountID: cloudflare.F("account_id"), Enabled: cloudflare.F(true), EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Predefined.Update(ctx, entryID, params) (*DLPEntryPredefinedUpdateResponse, error)` **put** `/accounts/{account_id}/dlp/entries/predefined/{entry_id}` Updates a DLP entry. ### Parameters - `entryID string` - `params DLPEntryPredefinedUpdateParams` - `AccountID param.Field[string]` Path param - `Enabled param.Field[bool]` Body param ### Returns - `type DLPEntryPredefinedUpdateResponse struct{…}` - `ID string` - `Confidence DLPEntryPredefinedUpdateResponseConfidence` - `AIContextAvailable 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 string` - `ProfileID string` - `Variant DLPEntryPredefinedUpdateResponseVariant` - `TopicType DLPEntryPredefinedUpdateResponseVariantTopicType` - `const DLPEntryPredefinedUpdateResponseVariantTopicTypeIntent DLPEntryPredefinedUpdateResponseVariantTopicType = "Intent"` - `const DLPEntryPredefinedUpdateResponseVariantTopicTypeContent DLPEntryPredefinedUpdateResponseVariantTopicType = "Content"` - `Type DLPEntryPredefinedUpdateResponseVariantType` - `const DLPEntryPredefinedUpdateResponseVariantTypePromptTopic DLPEntryPredefinedUpdateResponseVariantType = "PromptTopic"` - `Description string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) predefined, err := client.ZeroTrust.DLP.Entries.Predefined.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryPredefinedUpdateParams{ AccountID: cloudflare.F("account_id"), Enabled: cloudflare.F(true), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Predefined.Delete(ctx, entryID, body) (*DLPEntryPredefinedDeleteResponse, error)` **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 - `entryID string` - `body DLPEntryPredefinedDeleteParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryPredefinedDeleteResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) predefined, err := client.ZeroTrust.DLP.Entries.Predefined.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryPredefinedDeleteParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Predefined.Get(ctx, entryID, query) (*DLPEntryPredefinedGetResponse, error)` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `entryID string` - `query DLPEntryPredefinedGetParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryPredefinedGetResponse interface{…}` - `type DLPEntryPredefinedGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryPredefinedGetResponseObjectType` - `const DLPEntryPredefinedGetResponseObjectTypeCustom DLPEntryPredefinedGetResponseObjectType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `Profiles []DLPEntryPredefinedGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryPredefinedGetResponseObjectUploadStatus` - `const DLPEntryPredefinedGetResponseObjectUploadStatusEmpty DLPEntryPredefinedGetResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusUploading DLPEntryPredefinedGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusPending DLPEntryPredefinedGetResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusProcessing DLPEntryPredefinedGetResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusFailed DLPEntryPredefinedGetResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusComplete DLPEntryPredefinedGetResponseObjectUploadStatus = "complete"` - `type DLPEntryPredefinedGetResponseObject struct{…}` - `ID string` - `Confidence DLPEntryPredefinedGetResponseObjectConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryPredefinedGetResponseObjectType` - `const DLPEntryPredefinedGetResponseObjectTypePredefined DLPEntryPredefinedGetResponseObjectType = "predefined"` - `ProfileID string` - `Profiles []DLPEntryPredefinedGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryPredefinedGetResponseObjectUploadStatus` - `const DLPEntryPredefinedGetResponseObjectUploadStatusEmpty DLPEntryPredefinedGetResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusUploading DLPEntryPredefinedGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusPending DLPEntryPredefinedGetResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusProcessing DLPEntryPredefinedGetResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusFailed DLPEntryPredefinedGetResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusComplete DLPEntryPredefinedGetResponseObjectUploadStatus = "complete"` - `Variant DLPEntryPredefinedGetResponseObjectVariant` - `TopicType DLPEntryPredefinedGetResponseObjectVariantTopicType` - `const DLPEntryPredefinedGetResponseObjectVariantTopicTypeIntent DLPEntryPredefinedGetResponseObjectVariantTopicType = "Intent"` - `const DLPEntryPredefinedGetResponseObjectVariantTopicTypeContent DLPEntryPredefinedGetResponseObjectVariantTopicType = "Content"` - `Type DLPEntryPredefinedGetResponseObjectVariantType` - `const DLPEntryPredefinedGetResponseObjectVariantTypePromptTopic DLPEntryPredefinedGetResponseObjectVariantType = "PromptTopic"` - `Description string` - `type DLPEntryPredefinedGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryPredefinedGetResponseObjectType` - `const DLPEntryPredefinedGetResponseObjectTypeIntegration DLPEntryPredefinedGetResponseObjectType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `Profiles []DLPEntryPredefinedGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryPredefinedGetResponseObjectUploadStatus` - `const DLPEntryPredefinedGetResponseObjectUploadStatusEmpty DLPEntryPredefinedGetResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusUploading DLPEntryPredefinedGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusPending DLPEntryPredefinedGetResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusProcessing DLPEntryPredefinedGetResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusFailed DLPEntryPredefinedGetResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusComplete DLPEntryPredefinedGetResponseObjectUploadStatus = "complete"` - `type DLPEntryPredefinedGetResponseObject struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryPredefinedGetResponseObjectType` - `const DLPEntryPredefinedGetResponseObjectTypeExactData DLPEntryPredefinedGetResponseObjectType = "exact_data"` - `UpdatedAt Time` - `Profiles []DLPEntryPredefinedGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryPredefinedGetResponseObjectUploadStatus` - `const DLPEntryPredefinedGetResponseObjectUploadStatusEmpty DLPEntryPredefinedGetResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusUploading DLPEntryPredefinedGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusPending DLPEntryPredefinedGetResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusProcessing DLPEntryPredefinedGetResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusFailed DLPEntryPredefinedGetResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusComplete DLPEntryPredefinedGetResponseObjectUploadStatus = "complete"` - `type DLPEntryPredefinedGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryPredefinedGetResponseObjectType` - `const DLPEntryPredefinedGetResponseObjectTypeDocumentFingerprint DLPEntryPredefinedGetResponseObjectType = "document_fingerprint"` - `UpdatedAt Time` - `Profiles []DLPEntryPredefinedGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryPredefinedGetResponseObjectUploadStatus` - `const DLPEntryPredefinedGetResponseObjectUploadStatusEmpty DLPEntryPredefinedGetResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusUploading DLPEntryPredefinedGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusPending DLPEntryPredefinedGetResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusProcessing DLPEntryPredefinedGetResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusFailed DLPEntryPredefinedGetResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusComplete DLPEntryPredefinedGetResponseObjectUploadStatus = "complete"` - `type DLPEntryPredefinedGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryPredefinedGetResponseObjectType` - `const DLPEntryPredefinedGetResponseObjectTypeWordList DLPEntryPredefinedGetResponseObjectType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Profiles []DLPEntryPredefinedGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryPredefinedGetResponseObjectUploadStatus` - `const DLPEntryPredefinedGetResponseObjectUploadStatusEmpty DLPEntryPredefinedGetResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusUploading DLPEntryPredefinedGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusPending DLPEntryPredefinedGetResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusProcessing DLPEntryPredefinedGetResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusFailed DLPEntryPredefinedGetResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedGetResponseObjectUploadStatusComplete DLPEntryPredefinedGetResponseObjectUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) predefined, err := client.ZeroTrust.DLP.Entries.Predefined.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryPredefinedGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Predefined.List(ctx, query) (*SinglePage[DLPEntryPredefinedListResponse], error)` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `query DLPEntryPredefinedListParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryPredefinedListResponse interface{…}` - `type DLPEntryPredefinedListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryPredefinedListResponseObjectType` - `const DLPEntryPredefinedListResponseObjectTypeCustom DLPEntryPredefinedListResponseObjectType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `UploadStatus DLPEntryPredefinedListResponseObjectUploadStatus` - `const DLPEntryPredefinedListResponseObjectUploadStatusEmpty DLPEntryPredefinedListResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedListResponseObjectUploadStatusUploading DLPEntryPredefinedListResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedListResponseObjectUploadStatusPending DLPEntryPredefinedListResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedListResponseObjectUploadStatusProcessing DLPEntryPredefinedListResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedListResponseObjectUploadStatusFailed DLPEntryPredefinedListResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedListResponseObjectUploadStatusComplete DLPEntryPredefinedListResponseObjectUploadStatus = "complete"` - `type DLPEntryPredefinedListResponseObject struct{…}` - `ID string` - `Confidence DLPEntryPredefinedListResponseObjectConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryPredefinedListResponseObjectType` - `const DLPEntryPredefinedListResponseObjectTypePredefined DLPEntryPredefinedListResponseObjectType = "predefined"` - `ProfileID string` - `UploadStatus DLPEntryPredefinedListResponseObjectUploadStatus` - `const DLPEntryPredefinedListResponseObjectUploadStatusEmpty DLPEntryPredefinedListResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedListResponseObjectUploadStatusUploading DLPEntryPredefinedListResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedListResponseObjectUploadStatusPending DLPEntryPredefinedListResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedListResponseObjectUploadStatusProcessing DLPEntryPredefinedListResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedListResponseObjectUploadStatusFailed DLPEntryPredefinedListResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedListResponseObjectUploadStatusComplete DLPEntryPredefinedListResponseObjectUploadStatus = "complete"` - `Variant DLPEntryPredefinedListResponseObjectVariant` - `TopicType DLPEntryPredefinedListResponseObjectVariantTopicType` - `const DLPEntryPredefinedListResponseObjectVariantTopicTypeIntent DLPEntryPredefinedListResponseObjectVariantTopicType = "Intent"` - `const DLPEntryPredefinedListResponseObjectVariantTopicTypeContent DLPEntryPredefinedListResponseObjectVariantTopicType = "Content"` - `Type DLPEntryPredefinedListResponseObjectVariantType` - `const DLPEntryPredefinedListResponseObjectVariantTypePromptTopic DLPEntryPredefinedListResponseObjectVariantType = "PromptTopic"` - `Description string` - `type DLPEntryPredefinedListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryPredefinedListResponseObjectType` - `const DLPEntryPredefinedListResponseObjectTypeIntegration DLPEntryPredefinedListResponseObjectType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `UploadStatus DLPEntryPredefinedListResponseObjectUploadStatus` - `const DLPEntryPredefinedListResponseObjectUploadStatusEmpty DLPEntryPredefinedListResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedListResponseObjectUploadStatusUploading DLPEntryPredefinedListResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedListResponseObjectUploadStatusPending DLPEntryPredefinedListResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedListResponseObjectUploadStatusProcessing DLPEntryPredefinedListResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedListResponseObjectUploadStatusFailed DLPEntryPredefinedListResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedListResponseObjectUploadStatusComplete DLPEntryPredefinedListResponseObjectUploadStatus = "complete"` - `type DLPEntryPredefinedListResponseObject struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryPredefinedListResponseObjectType` - `const DLPEntryPredefinedListResponseObjectTypeExactData DLPEntryPredefinedListResponseObjectType = "exact_data"` - `UpdatedAt Time` - `UploadStatus DLPEntryPredefinedListResponseObjectUploadStatus` - `const DLPEntryPredefinedListResponseObjectUploadStatusEmpty DLPEntryPredefinedListResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedListResponseObjectUploadStatusUploading DLPEntryPredefinedListResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedListResponseObjectUploadStatusPending DLPEntryPredefinedListResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedListResponseObjectUploadStatusProcessing DLPEntryPredefinedListResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedListResponseObjectUploadStatusFailed DLPEntryPredefinedListResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedListResponseObjectUploadStatusComplete DLPEntryPredefinedListResponseObjectUploadStatus = "complete"` - `type DLPEntryPredefinedListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryPredefinedListResponseObjectType` - `const DLPEntryPredefinedListResponseObjectTypeDocumentFingerprint DLPEntryPredefinedListResponseObjectType = "document_fingerprint"` - `UpdatedAt Time` - `UploadStatus DLPEntryPredefinedListResponseObjectUploadStatus` - `const DLPEntryPredefinedListResponseObjectUploadStatusEmpty DLPEntryPredefinedListResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedListResponseObjectUploadStatusUploading DLPEntryPredefinedListResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedListResponseObjectUploadStatusPending DLPEntryPredefinedListResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedListResponseObjectUploadStatusProcessing DLPEntryPredefinedListResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedListResponseObjectUploadStatusFailed DLPEntryPredefinedListResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedListResponseObjectUploadStatusComplete DLPEntryPredefinedListResponseObjectUploadStatus = "complete"` - `type DLPEntryPredefinedListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryPredefinedListResponseObjectType` - `const DLPEntryPredefinedListResponseObjectTypeWordList DLPEntryPredefinedListResponseObjectType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `UploadStatus DLPEntryPredefinedListResponseObjectUploadStatus` - `const DLPEntryPredefinedListResponseObjectUploadStatusEmpty DLPEntryPredefinedListResponseObjectUploadStatus = "empty"` - `const DLPEntryPredefinedListResponseObjectUploadStatusUploading DLPEntryPredefinedListResponseObjectUploadStatus = "uploading"` - `const DLPEntryPredefinedListResponseObjectUploadStatusPending DLPEntryPredefinedListResponseObjectUploadStatus = "pending"` - `const DLPEntryPredefinedListResponseObjectUploadStatusProcessing DLPEntryPredefinedListResponseObjectUploadStatus = "processing"` - `const DLPEntryPredefinedListResponseObjectUploadStatusFailed DLPEntryPredefinedListResponseObjectUploadStatus = "failed"` - `const DLPEntryPredefinedListResponseObjectUploadStatusComplete DLPEntryPredefinedListResponseObjectUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.ZeroTrust.DLP.Entries.Predefined.List(context.TODO(), zero_trust.DLPEntryPredefinedListParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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" } ] } ``` # Integration ## Create integration entry `client.ZeroTrust.DLP.Entries.Integration.New(ctx, params) (*DLPEntryIntegrationNewResponse, error)` **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 - `params DLPEntryIntegrationNewParams` - `AccountID param.Field[string]` Path param - `Enabled param.Field[bool]` Body param - `EntryID param.Field[string]` Body param - `ProfileID param.Field[string]` Body param: This field is not used as the owning profile. For predefined entries it is already set to a predefined profile. ### Returns - `type DLPEntryIntegrationNewResponse struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `UpdatedAt Time` - `ProfileID string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) integration, err := client.ZeroTrust.DLP.Entries.Integration.New(context.TODO(), zero_trust.DLPEntryIntegrationNewParams{ AccountID: cloudflare.F("account_id"), Enabled: cloudflare.F(true), EntryID: cloudflare.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Integration.Update(ctx, entryID, params) (*DLPEntryIntegrationUpdateResponse, error)` **put** `/accounts/{account_id}/dlp/entries/integration/{entry_id}` Updates a DLP entry. ### Parameters - `entryID string` - `params DLPEntryIntegrationUpdateParams` - `AccountID param.Field[string]` Path param - `Enabled param.Field[bool]` Body param ### Returns - `type DLPEntryIntegrationUpdateResponse struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `UpdatedAt Time` - `ProfileID string` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) integration, err := client.ZeroTrust.DLP.Entries.Integration.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryIntegrationUpdateParams{ AccountID: cloudflare.F("account_id"), Enabled: cloudflare.F(true), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Integration.Delete(ctx, entryID, body) (*DLPEntryIntegrationDeleteResponse, error)` **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 - `entryID string` - `body DLPEntryIntegrationDeleteParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryIntegrationDeleteResponse interface{…}` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) integration, err := client.ZeroTrust.DLP.Entries.Integration.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryIntegrationDeleteParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Integration.Get(ctx, entryID, query) (*DLPEntryIntegrationGetResponse, error)` **get** `/accounts/{account_id}/dlp/entries/{entry_id}` Fetches a DLP entry by ID. ### Parameters - `entryID string` - `query DLPEntryIntegrationGetParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryIntegrationGetResponse interface{…}` - `type DLPEntryIntegrationGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryIntegrationGetResponseObjectType` - `const DLPEntryIntegrationGetResponseObjectTypeCustom DLPEntryIntegrationGetResponseObjectType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `Profiles []DLPEntryIntegrationGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryIntegrationGetResponseObjectUploadStatus` - `const DLPEntryIntegrationGetResponseObjectUploadStatusEmpty DLPEntryIntegrationGetResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusUploading DLPEntryIntegrationGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusPending DLPEntryIntegrationGetResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusProcessing DLPEntryIntegrationGetResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusFailed DLPEntryIntegrationGetResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusComplete DLPEntryIntegrationGetResponseObjectUploadStatus = "complete"` - `type DLPEntryIntegrationGetResponseObject struct{…}` - `ID string` - `Confidence DLPEntryIntegrationGetResponseObjectConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryIntegrationGetResponseObjectType` - `const DLPEntryIntegrationGetResponseObjectTypePredefined DLPEntryIntegrationGetResponseObjectType = "predefined"` - `ProfileID string` - `Profiles []DLPEntryIntegrationGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryIntegrationGetResponseObjectUploadStatus` - `const DLPEntryIntegrationGetResponseObjectUploadStatusEmpty DLPEntryIntegrationGetResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusUploading DLPEntryIntegrationGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusPending DLPEntryIntegrationGetResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusProcessing DLPEntryIntegrationGetResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusFailed DLPEntryIntegrationGetResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusComplete DLPEntryIntegrationGetResponseObjectUploadStatus = "complete"` - `Variant DLPEntryIntegrationGetResponseObjectVariant` - `TopicType DLPEntryIntegrationGetResponseObjectVariantTopicType` - `const DLPEntryIntegrationGetResponseObjectVariantTopicTypeIntent DLPEntryIntegrationGetResponseObjectVariantTopicType = "Intent"` - `const DLPEntryIntegrationGetResponseObjectVariantTopicTypeContent DLPEntryIntegrationGetResponseObjectVariantTopicType = "Content"` - `Type DLPEntryIntegrationGetResponseObjectVariantType` - `const DLPEntryIntegrationGetResponseObjectVariantTypePromptTopic DLPEntryIntegrationGetResponseObjectVariantType = "PromptTopic"` - `Description string` - `type DLPEntryIntegrationGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryIntegrationGetResponseObjectType` - `const DLPEntryIntegrationGetResponseObjectTypeIntegration DLPEntryIntegrationGetResponseObjectType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `Profiles []DLPEntryIntegrationGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryIntegrationGetResponseObjectUploadStatus` - `const DLPEntryIntegrationGetResponseObjectUploadStatusEmpty DLPEntryIntegrationGetResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusUploading DLPEntryIntegrationGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusPending DLPEntryIntegrationGetResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusProcessing DLPEntryIntegrationGetResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusFailed DLPEntryIntegrationGetResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusComplete DLPEntryIntegrationGetResponseObjectUploadStatus = "complete"` - `type DLPEntryIntegrationGetResponseObject struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryIntegrationGetResponseObjectType` - `const DLPEntryIntegrationGetResponseObjectTypeExactData DLPEntryIntegrationGetResponseObjectType = "exact_data"` - `UpdatedAt Time` - `Profiles []DLPEntryIntegrationGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryIntegrationGetResponseObjectUploadStatus` - `const DLPEntryIntegrationGetResponseObjectUploadStatusEmpty DLPEntryIntegrationGetResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusUploading DLPEntryIntegrationGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusPending DLPEntryIntegrationGetResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusProcessing DLPEntryIntegrationGetResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusFailed DLPEntryIntegrationGetResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusComplete DLPEntryIntegrationGetResponseObjectUploadStatus = "complete"` - `type DLPEntryIntegrationGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryIntegrationGetResponseObjectType` - `const DLPEntryIntegrationGetResponseObjectTypeDocumentFingerprint DLPEntryIntegrationGetResponseObjectType = "document_fingerprint"` - `UpdatedAt Time` - `Profiles []DLPEntryIntegrationGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryIntegrationGetResponseObjectUploadStatus` - `const DLPEntryIntegrationGetResponseObjectUploadStatusEmpty DLPEntryIntegrationGetResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusUploading DLPEntryIntegrationGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusPending DLPEntryIntegrationGetResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusProcessing DLPEntryIntegrationGetResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusFailed DLPEntryIntegrationGetResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusComplete DLPEntryIntegrationGetResponseObjectUploadStatus = "complete"` - `type DLPEntryIntegrationGetResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryIntegrationGetResponseObjectType` - `const DLPEntryIntegrationGetResponseObjectTypeWordList DLPEntryIntegrationGetResponseObjectType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `Profiles []DLPEntryIntegrationGetResponseObjectProfile` - `ID string` - `Name string` - `UploadStatus DLPEntryIntegrationGetResponseObjectUploadStatus` - `const DLPEntryIntegrationGetResponseObjectUploadStatusEmpty DLPEntryIntegrationGetResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusUploading DLPEntryIntegrationGetResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusPending DLPEntryIntegrationGetResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusProcessing DLPEntryIntegrationGetResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusFailed DLPEntryIntegrationGetResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationGetResponseObjectUploadStatusComplete DLPEntryIntegrationGetResponseObjectUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) integration, err := client.ZeroTrust.DLP.Entries.Integration.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", zero_trust.DLPEntryIntegrationGetParams{ AccountID: cloudflare.F("account_id"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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 `client.ZeroTrust.DLP.Entries.Integration.List(ctx, query) (*SinglePage[DLPEntryIntegrationListResponse], error)` **get** `/accounts/{account_id}/dlp/entries` Lists all DLP entries in an account. ### Parameters - `query DLPEntryIntegrationListParams` - `AccountID param.Field[string]` ### Returns - `type DLPEntryIntegrationListResponse interface{…}` - `type DLPEntryIntegrationListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Pattern Pattern` - `Regex string` - `Validation PatternValidation` - `const PatternValidationLuhn PatternValidation = "luhn"` - `Type DLPEntryIntegrationListResponseObjectType` - `const DLPEntryIntegrationListResponseObjectTypeCustom DLPEntryIntegrationListResponseObjectType = "custom"` - `UpdatedAt Time` - `Description string` - `ProfileID string` - `UploadStatus DLPEntryIntegrationListResponseObjectUploadStatus` - `const DLPEntryIntegrationListResponseObjectUploadStatusEmpty DLPEntryIntegrationListResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationListResponseObjectUploadStatusUploading DLPEntryIntegrationListResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationListResponseObjectUploadStatusPending DLPEntryIntegrationListResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationListResponseObjectUploadStatusProcessing DLPEntryIntegrationListResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationListResponseObjectUploadStatusFailed DLPEntryIntegrationListResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationListResponseObjectUploadStatusComplete DLPEntryIntegrationListResponseObjectUploadStatus = "complete"` - `type DLPEntryIntegrationListResponseObject struct{…}` - `ID string` - `Confidence DLPEntryIntegrationListResponseObjectConfidence` - `AIContextAvailable 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 string` - `Type DLPEntryIntegrationListResponseObjectType` - `const DLPEntryIntegrationListResponseObjectTypePredefined DLPEntryIntegrationListResponseObjectType = "predefined"` - `ProfileID string` - `UploadStatus DLPEntryIntegrationListResponseObjectUploadStatus` - `const DLPEntryIntegrationListResponseObjectUploadStatusEmpty DLPEntryIntegrationListResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationListResponseObjectUploadStatusUploading DLPEntryIntegrationListResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationListResponseObjectUploadStatusPending DLPEntryIntegrationListResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationListResponseObjectUploadStatusProcessing DLPEntryIntegrationListResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationListResponseObjectUploadStatusFailed DLPEntryIntegrationListResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationListResponseObjectUploadStatusComplete DLPEntryIntegrationListResponseObjectUploadStatus = "complete"` - `Variant DLPEntryIntegrationListResponseObjectVariant` - `TopicType DLPEntryIntegrationListResponseObjectVariantTopicType` - `const DLPEntryIntegrationListResponseObjectVariantTopicTypeIntent DLPEntryIntegrationListResponseObjectVariantTopicType = "Intent"` - `const DLPEntryIntegrationListResponseObjectVariantTopicTypeContent DLPEntryIntegrationListResponseObjectVariantTopicType = "Content"` - `Type DLPEntryIntegrationListResponseObjectVariantType` - `const DLPEntryIntegrationListResponseObjectVariantTypePromptTopic DLPEntryIntegrationListResponseObjectVariantType = "PromptTopic"` - `Description string` - `type DLPEntryIntegrationListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryIntegrationListResponseObjectType` - `const DLPEntryIntegrationListResponseObjectTypeIntegration DLPEntryIntegrationListResponseObjectType = "integration"` - `UpdatedAt Time` - `ProfileID string` - `UploadStatus DLPEntryIntegrationListResponseObjectUploadStatus` - `const DLPEntryIntegrationListResponseObjectUploadStatusEmpty DLPEntryIntegrationListResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationListResponseObjectUploadStatusUploading DLPEntryIntegrationListResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationListResponseObjectUploadStatusPending DLPEntryIntegrationListResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationListResponseObjectUploadStatusProcessing DLPEntryIntegrationListResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationListResponseObjectUploadStatusFailed DLPEntryIntegrationListResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationListResponseObjectUploadStatusComplete DLPEntryIntegrationListResponseObjectUploadStatus = "complete"` - `type DLPEntryIntegrationListResponseObject struct{…}` - `ID string` - `CaseSensitive 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 - `CreatedAt Time` - `Enabled bool` - `Name string` - `Secret bool` - `Type DLPEntryIntegrationListResponseObjectType` - `const DLPEntryIntegrationListResponseObjectTypeExactData DLPEntryIntegrationListResponseObjectType = "exact_data"` - `UpdatedAt Time` - `UploadStatus DLPEntryIntegrationListResponseObjectUploadStatus` - `const DLPEntryIntegrationListResponseObjectUploadStatusEmpty DLPEntryIntegrationListResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationListResponseObjectUploadStatusUploading DLPEntryIntegrationListResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationListResponseObjectUploadStatusPending DLPEntryIntegrationListResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationListResponseObjectUploadStatusProcessing DLPEntryIntegrationListResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationListResponseObjectUploadStatusFailed DLPEntryIntegrationListResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationListResponseObjectUploadStatusComplete DLPEntryIntegrationListResponseObjectUploadStatus = "complete"` - `type DLPEntryIntegrationListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryIntegrationListResponseObjectType` - `const DLPEntryIntegrationListResponseObjectTypeDocumentFingerprint DLPEntryIntegrationListResponseObjectType = "document_fingerprint"` - `UpdatedAt Time` - `UploadStatus DLPEntryIntegrationListResponseObjectUploadStatus` - `const DLPEntryIntegrationListResponseObjectUploadStatusEmpty DLPEntryIntegrationListResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationListResponseObjectUploadStatusUploading DLPEntryIntegrationListResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationListResponseObjectUploadStatusPending DLPEntryIntegrationListResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationListResponseObjectUploadStatusProcessing DLPEntryIntegrationListResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationListResponseObjectUploadStatusFailed DLPEntryIntegrationListResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationListResponseObjectUploadStatusComplete DLPEntryIntegrationListResponseObjectUploadStatus = "complete"` - `type DLPEntryIntegrationListResponseObject struct{…}` - `ID string` - `CreatedAt Time` - `Enabled bool` - `Name string` - `Type DLPEntryIntegrationListResponseObjectType` - `const DLPEntryIntegrationListResponseObjectTypeWordList DLPEntryIntegrationListResponseObjectType = "word_list"` - `UpdatedAt Time` - `WordList unknown` - `ProfileID string` - `UploadStatus DLPEntryIntegrationListResponseObjectUploadStatus` - `const DLPEntryIntegrationListResponseObjectUploadStatusEmpty DLPEntryIntegrationListResponseObjectUploadStatus = "empty"` - `const DLPEntryIntegrationListResponseObjectUploadStatusUploading DLPEntryIntegrationListResponseObjectUploadStatus = "uploading"` - `const DLPEntryIntegrationListResponseObjectUploadStatusPending DLPEntryIntegrationListResponseObjectUploadStatus = "pending"` - `const DLPEntryIntegrationListResponseObjectUploadStatusProcessing DLPEntryIntegrationListResponseObjectUploadStatus = "processing"` - `const DLPEntryIntegrationListResponseObjectUploadStatusFailed DLPEntryIntegrationListResponseObjectUploadStatus = "failed"` - `const DLPEntryIntegrationListResponseObjectUploadStatusComplete DLPEntryIntegrationListResponseObjectUploadStatus = "complete"` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/option" "github.com/cloudflare/cloudflare-go/zero_trust" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) page, err := client.ZeroTrust.DLP.Entries.Integration.List(context.TODO(), zero_trust.DLPEntryIntegrationListParams{ AccountID: cloudflare.F("account_id"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", 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" } ] } ```