Skip to content
Start here

Get predefined profile config

zero_trust.dlp.profiles.predefined.get(strprofile_id, PredefinedGetParams**kwargs) -> PredefinedProfile
GET/accounts/{account_id}/dlp/profiles/predefined/{profile_id}/config

This is similar to get_predefined but only returns entries that are enabled. This is needed for our terraform API Fetches a predefined DLP profile by id.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Zero Trust ReadZero Trust Write
ParametersExpand Collapse
account_id: str
profile_id: str
formatuuid
ReturnsExpand Collapse
class PredefinedProfile:
id: str

The id of the predefined profile (uuid).

formatuuid
allowed_match_count: int
formatint32
confidence_threshold: Optional[str]
enabled_entries: List[str]

Entries to enable for this predefined profile. Any entries not provided will be disabled.

Deprecatedentries: List[Entry]

This field has been deprecated for enabled_entries.

One of the following:
class EntryCustomEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
Deprecatedenabled: bool
name: str
pattern: Pattern
regex: str
Deprecatedvalidation: Optional[Literal["luhn"]]
type: Literal["custom"]
updated_at: datetime
formatdate-time
description: Optional[str]
Deprecatedprofile_id: Optional[str]
formatuuid
class EntryPredefinedEntry:
id: str
formatuuid
confidence: EntryPredefinedEntryConfidence
ai_context_available: bool

Indicates whether this entry has AI remote service validation.

available: bool

Indicates whether this entry has any form of validation that is not an AI remote service.

enabled: bool
name: str
type: Literal["predefined"]
Deprecatedprofile_id: Optional[str]
formatuuid
variant: Optional[EntryPredefinedEntryVariant]
topic_type: Literal["Intent", "Content"]
One of the following:
"Intent"
"Content"
type: Literal["PromptTopic"]
description: Optional[str]
class EntryIntegrationEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["integration"]
updated_at: datetime
formatdate-time
profile_id: Optional[str]
formatuuid
class EntryExactDataEntry:
id: str
formatuuid
case_sensitive: bool

Only applies to custom word lists. Determines if the words should be matched in a case-sensitive manner Cannot be set to false if secret is true

created_at: datetime
formatdate-time
enabled: bool
name: str
secret: bool
type: Literal["exact_data"]
updated_at: datetime
formatdate-time
class EntryDocumentFingerprintEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["document_fingerprint"]
updated_at: datetime
formatdate-time
class EntryWordListEntry:
id: str
formatuuid
created_at: datetime
formatdate-time
enabled: bool
name: str
type: Literal["word_list"]
updated_at: datetime
formatdate-time
word_list: object
profile_id: Optional[str]
formatuuid
name: str

The name of the predefined profile.

ai_context_enabled: Optional[bool]
ocr_enabled: Optional[bool]
open_access: Optional[bool]

Whether this profile can be accessed by anyone.

Get predefined profile config

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
predefined_profile = client.zero_trust.dlp.profiles.predefined.get(
    profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    account_id="account_id",
)
print(predefined_profile.id)
{
  "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
  }
}
Returns Examples
{
  "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
  }
}