Skip to content
Start here

Update entry

client.ZeroTrust.DLP.Entries.Update(ctx, entryID, params) (*DLPEntryUpdateResponse, error)
PUT/accounts/{account_id}/dlp/entries/{entry_id}

Updates a DLP entry.

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 Write
ParametersExpand Collapse
entryID string
formatuuid
params DLPEntryUpdateParams
AccountID param.Field[string]

Path param

Name param.Field[string]

Body param

Pattern param.Field[Pattern]

Body param

Body param

const DLPEntryUpdateParamsVariant0TypeCustom DLPEntryUpdateParamsVariant0Type = "custom"
Description param.Field[string]Optional

Body param

Enabled param.Field[bool]Optional

Body param

ReturnsExpand Collapse
type DLPEntryUpdateResponse interface{…}
One of the following:
type DLPEntryUpdateResponseCustomEntry struct{…}
ID string
formatuuid
CreatedAt Time
formatdate-time
DeprecatedEnabled bool
Name string
Pattern Pattern
Regex string
DeprecatedValidation PatternValidationOptional
Type DLPEntryUpdateResponseCustomEntryType
UpdatedAt Time
formatdate-time
Description stringOptional
DeprecatedProfileID stringOptional
formatuuid
type DLPEntryUpdateResponseCustomPromptTopicEntry struct{…}
ID string
formatuuid
CreatedAt Time
formatdate-time
DeprecatedEnabled bool
Name string
Type DLPEntryUpdateResponseCustomPromptTopicEntryType
UpdatedAt Time
formatdate-time
Description stringOptional

The optional description of the custom prompt topic entry.

type DLPEntryUpdateResponsePredefinedEntry struct{…}
ID string
formatuuid
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
DeprecatedProfileID stringOptional
formatuuid
Variant DLPEntryUpdateResponsePredefinedEntryVariantOptional

A Predefined AI prompt classification topic entry.

One of the following:
type DLPEntryUpdateResponsePredefinedEntryVariantObject struct{…}

A Predefined AI prompt classification topic entry.

TopicType DLPEntryUpdateResponsePredefinedEntryVariantObjectTopicType
One of the following:
const DLPEntryUpdateResponsePredefinedEntryVariantObjectTopicTypeIntent DLPEntryUpdateResponsePredefinedEntryVariantObjectTopicType = "Intent"
const DLPEntryUpdateResponsePredefinedEntryVariantObjectTopicTypeContent DLPEntryUpdateResponsePredefinedEntryVariantObjectTopicType = "Content"
Type DLPEntryUpdateResponsePredefinedEntryVariantObjectType
Description stringOptional

A customer-facing explanation of what this predefined AI prompt topic represents.

type DLPEntryUpdateResponsePredefinedEntryVariantObject struct{…}

A general predefined entry.

Type DLPEntryUpdateResponsePredefinedEntryVariantObjectType
Description stringOptional

A customer-facing explanation of what this predefined entry represents.

type DLPEntryUpdateResponseIntegrationEntry struct{…}
ID string
formatuuid
CreatedAt Time
formatdate-time
Enabled bool
Name string
Type DLPEntryUpdateResponseIntegrationEntryType
UpdatedAt Time
formatdate-time
ProfileID stringOptional
formatuuid
type DLPEntryUpdateResponseExactDataEntry struct{…}
ID string
formatuuid
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
formatdate-time
Enabled bool
Name string
Secret bool
Type DLPEntryUpdateResponseExactDataEntryType
UpdatedAt Time
formatdate-time
Description stringOptional

The optional description of the exact data entry.

type DLPEntryUpdateResponseDocumentFingerprintEntry struct{…}
ID string
formatuuid
CreatedAt Time
formatdate-time
Enabled bool
Name string
Type DLPEntryUpdateResponseDocumentFingerprintEntryType
UpdatedAt Time
formatdate-time
Description stringOptional

The optional description of the document fingerprint entry.

type DLPEntryUpdateResponseWordListEntry struct{…}
ID string
formatuuid
CreatedAt Time
formatdate-time
Enabled bool
Name string
Type DLPEntryUpdateResponseWordListEntryType
UpdatedAt Time
formatdate-time
WordList unknown
ProfileID stringOptional
formatuuid

Update entry

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/option"
  "github.com/stainless-sdks/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)
}
{
  "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"
  }
}
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",
    "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"
  }
}