published on Saturday, May 2, 2026 by Pulumi
published on Saturday, May 2, 2026 by Pulumi
Accepted Permissions
Zero Trust ReadZero Trust Write
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleZeroTrustDlpSettings = new cloudflare.ZeroTrustDlpSettings("example_zero_trust_dlp_settings", {
accountId: "account_id",
aiContextAnalysis: true,
ocr: true,
payloadLogging: {
maskingLevel: "full",
publicKey: "public_key",
},
});
import pulumi
import pulumi_cloudflare as cloudflare
example_zero_trust_dlp_settings = cloudflare.ZeroTrustDlpSettings("example_zero_trust_dlp_settings",
account_id="account_id",
ai_context_analysis=True,
ocr=True,
payload_logging={
"masking_level": "full",
"public_key": "public_key",
})
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewZeroTrustDlpSettings(ctx, "example_zero_trust_dlp_settings", &cloudflare.ZeroTrustDlpSettingsArgs{
AccountId: pulumi.String("account_id"),
AiContextAnalysis: pulumi.Bool(true),
Ocr: pulumi.Bool(true),
PayloadLogging: &cloudflare.ZeroTrustDlpSettingsPayloadLoggingArgs{
MaskingLevel: pulumi.String("full"),
PublicKey: pulumi.String("public_key"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleZeroTrustDlpSettings = new Cloudflare.Index.ZeroTrustDlpSettings("example_zero_trust_dlp_settings", new()
{
AccountId = "account_id",
AiContextAnalysis = true,
Ocr = true,
PayloadLogging = new Cloudflare.Inputs.ZeroTrustDlpSettingsPayloadLoggingArgs
{
MaskingLevel = "full",
PublicKey = "public_key",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustDlpSettings;
import com.pulumi.cloudflare.ZeroTrustDlpSettingsArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustDlpSettingsPayloadLoggingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleZeroTrustDlpSettings = new ZeroTrustDlpSettings("exampleZeroTrustDlpSettings", ZeroTrustDlpSettingsArgs.builder()
.accountId("account_id")
.aiContextAnalysis(true)
.ocr(true)
.payloadLogging(ZeroTrustDlpSettingsPayloadLoggingArgs.builder()
.maskingLevel("full")
.publicKey("public_key")
.build())
.build());
}
}
resources:
exampleZeroTrustDlpSettings:
type: cloudflare:ZeroTrustDlpSettings
name: example_zero_trust_dlp_settings
properties:
accountId: account_id
aiContextAnalysis: true
ocr: true
payloadLogging:
maskingLevel: full
publicKey: public_key
Create ZeroTrustDlpSettings Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZeroTrustDlpSettings(name: string, args: ZeroTrustDlpSettingsArgs, opts?: CustomResourceOptions);@overload
def ZeroTrustDlpSettings(resource_name: str,
args: ZeroTrustDlpSettingsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZeroTrustDlpSettings(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
ai_context_analysis: Optional[bool] = None,
ocr: Optional[bool] = None,
payload_logging: Optional[ZeroTrustDlpSettingsPayloadLoggingArgs] = None)func NewZeroTrustDlpSettings(ctx *Context, name string, args ZeroTrustDlpSettingsArgs, opts ...ResourceOption) (*ZeroTrustDlpSettings, error)public ZeroTrustDlpSettings(string name, ZeroTrustDlpSettingsArgs args, CustomResourceOptions? opts = null)
public ZeroTrustDlpSettings(String name, ZeroTrustDlpSettingsArgs args)
public ZeroTrustDlpSettings(String name, ZeroTrustDlpSettingsArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustDlpSettings
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ZeroTrustDlpSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ZeroTrustDlpSettingsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ZeroTrustDlpSettingsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustDlpSettingsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZeroTrustDlpSettingsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var zeroTrustDlpSettingsResource = new Cloudflare.ZeroTrustDlpSettings("zeroTrustDlpSettingsResource", new()
{
AccountId = "string",
AiContextAnalysis = false,
Ocr = false,
PayloadLogging = new Cloudflare.Inputs.ZeroTrustDlpSettingsPayloadLoggingArgs
{
MaskingLevel = "string",
PublicKey = "string",
},
});
example, err := cloudflare.NewZeroTrustDlpSettings(ctx, "zeroTrustDlpSettingsResource", &cloudflare.ZeroTrustDlpSettingsArgs{
AccountId: pulumi.String("string"),
AiContextAnalysis: pulumi.Bool(false),
Ocr: pulumi.Bool(false),
PayloadLogging: &cloudflare.ZeroTrustDlpSettingsPayloadLoggingArgs{
MaskingLevel: pulumi.String("string"),
PublicKey: pulumi.String("string"),
},
})
var zeroTrustDlpSettingsResource = new ZeroTrustDlpSettings("zeroTrustDlpSettingsResource", ZeroTrustDlpSettingsArgs.builder()
.accountId("string")
.aiContextAnalysis(false)
.ocr(false)
.payloadLogging(ZeroTrustDlpSettingsPayloadLoggingArgs.builder()
.maskingLevel("string")
.publicKey("string")
.build())
.build());
zero_trust_dlp_settings_resource = cloudflare.ZeroTrustDlpSettings("zeroTrustDlpSettingsResource",
account_id="string",
ai_context_analysis=False,
ocr=False,
payload_logging={
"masking_level": "string",
"public_key": "string",
})
const zeroTrustDlpSettingsResource = new cloudflare.ZeroTrustDlpSettings("zeroTrustDlpSettingsResource", {
accountId: "string",
aiContextAnalysis: false,
ocr: false,
payloadLogging: {
maskingLevel: "string",
publicKey: "string",
},
});
type: cloudflare:ZeroTrustDlpSettings
properties:
accountId: string
aiContextAnalysis: false
ocr: false
payloadLogging:
maskingLevel: string
publicKey: string
ZeroTrustDlpSettings Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ZeroTrustDlpSettings resource accepts the following input properties:
- Account
Id string - Ai
Context boolAnalysis - Whether AI context analysis is enabled at the account level.
- Ocr bool
- Whether OCR is enabled at the account level.
- Payload
Logging ZeroTrust Dlp Settings Payload Logging - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- Account
Id string - Ai
Context boolAnalysis - Whether AI context analysis is enabled at the account level.
- Ocr bool
- Whether OCR is enabled at the account level.
- Payload
Logging ZeroTrust Dlp Settings Payload Logging Args - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- account
Id String - ai
Context BooleanAnalysis - Whether AI context analysis is enabled at the account level.
- ocr Boolean
- Whether OCR is enabled at the account level.
- payload
Logging ZeroTrust Dlp Settings Payload Logging - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- account
Id string - ai
Context booleanAnalysis - Whether AI context analysis is enabled at the account level.
- ocr boolean
- Whether OCR is enabled at the account level.
- payload
Logging ZeroTrust Dlp Settings Payload Logging - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- account_
id str - ai_
context_ boolanalysis - Whether AI context analysis is enabled at the account level.
- ocr bool
- Whether OCR is enabled at the account level.
- payload_
logging ZeroTrust Dlp Settings Payload Logging Args - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- account
Id String - ai
Context BooleanAnalysis - Whether AI context analysis is enabled at the account level.
- ocr Boolean
- Whether OCR is enabled at the account level.
- payload
Logging Property Map - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
Outputs
All input properties are implicitly available as output properties. Additionally, the ZeroTrustDlpSettings resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ZeroTrustDlpSettings Resource
Get an existing ZeroTrustDlpSettings resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ZeroTrustDlpSettingsState, opts?: CustomResourceOptions): ZeroTrustDlpSettings@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
ai_context_analysis: Optional[bool] = None,
ocr: Optional[bool] = None,
payload_logging: Optional[ZeroTrustDlpSettingsPayloadLoggingArgs] = None) -> ZeroTrustDlpSettingsfunc GetZeroTrustDlpSettings(ctx *Context, name string, id IDInput, state *ZeroTrustDlpSettingsState, opts ...ResourceOption) (*ZeroTrustDlpSettings, error)public static ZeroTrustDlpSettings Get(string name, Input<string> id, ZeroTrustDlpSettingsState? state, CustomResourceOptions? opts = null)public static ZeroTrustDlpSettings get(String name, Output<String> id, ZeroTrustDlpSettingsState state, CustomResourceOptions options)resources: _: type: cloudflare:ZeroTrustDlpSettings get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - Ai
Context boolAnalysis - Whether AI context analysis is enabled at the account level.
- Ocr bool
- Whether OCR is enabled at the account level.
- Payload
Logging ZeroTrust Dlp Settings Payload Logging - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- Account
Id string - Ai
Context boolAnalysis - Whether AI context analysis is enabled at the account level.
- Ocr bool
- Whether OCR is enabled at the account level.
- Payload
Logging ZeroTrust Dlp Settings Payload Logging Args - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- account
Id String - ai
Context BooleanAnalysis - Whether AI context analysis is enabled at the account level.
- ocr Boolean
- Whether OCR is enabled at the account level.
- payload
Logging ZeroTrust Dlp Settings Payload Logging - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- account
Id string - ai
Context booleanAnalysis - Whether AI context analysis is enabled at the account level.
- ocr boolean
- Whether OCR is enabled at the account level.
- payload
Logging ZeroTrust Dlp Settings Payload Logging - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- account_
id str - ai_
context_ boolanalysis - Whether AI context analysis is enabled at the account level.
- ocr bool
- Whether OCR is enabled at the account level.
- payload_
logging ZeroTrust Dlp Settings Payload Logging Args - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
- account
Id String - ai
Context BooleanAnalysis - Whether AI context analysis is enabled at the account level.
- ocr Boolean
- Whether OCR is enabled at the account level.
- payload
Logging Property Map - Request model for payload log settings within the DLP settings endpoint. Unlike the legacy endpoint, null and missing are treated identically here (both mean "not provided" for PATCH, "reset to default" for PUT).
Supporting Types
ZeroTrustDlpSettingsPayloadLogging, ZeroTrustDlpSettingsPayloadLoggingArgs
- Masking
Level string - 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. Available values: "full", "partial", "clear", "default".
- Public
Key string - Base64-encoded public key for encrypting payload logs.
- Set to a non-empty base64 string to enable payload logging with the given key.
- Set to an empty string to disable payload logging.
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).
- Masking
Level string - 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. Available values: "full", "partial", "clear", "default".
- Public
Key string - Base64-encoded public key for encrypting payload logs.
- Set to a non-empty base64 string to enable payload logging with the given key.
- Set to an empty string to disable payload logging.
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).
- masking
Level String - 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. Available values: "full", "partial", "clear", "default".
- public
Key String - Base64-encoded public key for encrypting payload logs.
- Set to a non-empty base64 string to enable payload logging with the given key.
- Set to an empty string to disable payload logging.
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).
- masking
Level string - 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. Available values: "full", "partial", "clear", "default".
- public
Key string - Base64-encoded public key for encrypting payload logs.
- Set to a non-empty base64 string to enable payload logging with the given key.
- Set to an empty string to disable payload logging.
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).
- masking_
level str - 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. Available values: "full", "partial", "clear", "default".
- public_
key str - Base64-encoded public key for encrypting payload logs.
- Set to a non-empty base64 string to enable payload logging with the given key.
- Set to an empty string to disable payload logging.
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).
- masking
Level String - 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. Available values: "full", "partial", "clear", "default".
- public
Key String - Base64-encoded public key for encrypting payload logs.
- Set to a non-empty base64 string to enable payload logging with the given key.
- Set to an empty string to disable payload logging.
- Omit or set to null to leave unchanged (PATCH) or reset to disabled (PUT).
Import
$ pulumi import cloudflare:index/zeroTrustDlpSettings:ZeroTrustDlpSettings example '<account_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
published on Saturday, May 2, 2026 by Pulumi
