1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ZeroTrustGatewayLogging
Cloudflare v6.0.0 published on Monday, Apr 14, 2025 by Pulumi

cloudflare.ZeroTrustGatewayLogging

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleZeroTrustGatewayLogging = new cloudflare.ZeroTrustGatewayLogging("example_zero_trust_gateway_logging", {
    accountId: "699d98642c564d2e855e9661899b7252",
    redactPii: true,
    settingsByRuleType: {
        dns: {},
        http: {},
        l4: {},
    },
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_zero_trust_gateway_logging = cloudflare.ZeroTrustGatewayLogging("example_zero_trust_gateway_logging",
    account_id="699d98642c564d2e855e9661899b7252",
    redact_pii=True,
    settings_by_rule_type={
        "dns": {},
        "http": {},
        "l4": {},
    })
Copy
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.NewZeroTrustGatewayLogging(ctx, "example_zero_trust_gateway_logging", &cloudflare.ZeroTrustGatewayLoggingArgs{
			AccountId: pulumi.String("699d98642c564d2e855e9661899b7252"),
			RedactPii: pulumi.Bool(true),
			SettingsByRuleType: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeArgs{
				Dns:  pulumi.String{},
				Http: pulumi.String{},
				L4:   pulumi.String{},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleZeroTrustGatewayLogging = new Cloudflare.ZeroTrustGatewayLogging("example_zero_trust_gateway_logging", new()
    {
        AccountId = "699d98642c564d2e855e9661899b7252",
        RedactPii = true,
        SettingsByRuleType = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeArgs
        {
            Dns = null,
            Http = null,
            L4 = null,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ZeroTrustGatewayLogging;
import com.pulumi.cloudflare.ZeroTrustGatewayLoggingArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeArgs;
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 exampleZeroTrustGatewayLogging = new ZeroTrustGatewayLogging("exampleZeroTrustGatewayLogging", ZeroTrustGatewayLoggingArgs.builder()
            .accountId("699d98642c564d2e855e9661899b7252")
            .redactPii(true)
            .settingsByRuleType(ZeroTrustGatewayLoggingSettingsByRuleTypeArgs.builder()
                .dns(Map.ofEntries(
                ))
                .http(Map.ofEntries(
                ))
                .l4(Map.ofEntries(
                ))
                .build())
            .build());

    }
}
Copy
resources:
  exampleZeroTrustGatewayLogging:
    type: cloudflare:ZeroTrustGatewayLogging
    name: example_zero_trust_gateway_logging
    properties:
      accountId: 699d98642c564d2e855e9661899b7252
      redactPii: true
      settingsByRuleType:
        dns: {}
        http: {}
        l4: {}
Copy

Create ZeroTrustGatewayLogging Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ZeroTrustGatewayLogging(name: string, args: ZeroTrustGatewayLoggingArgs, opts?: CustomResourceOptions);
@overload
def ZeroTrustGatewayLogging(resource_name: str,
                            args: ZeroTrustGatewayLoggingArgs,
                            opts: Optional[ResourceOptions] = None)

@overload
def ZeroTrustGatewayLogging(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            account_id: Optional[str] = None,
                            redact_pii: Optional[bool] = None,
                            settings_by_rule_type: Optional[ZeroTrustGatewayLoggingSettingsByRuleTypeArgs] = None)
func NewZeroTrustGatewayLogging(ctx *Context, name string, args ZeroTrustGatewayLoggingArgs, opts ...ResourceOption) (*ZeroTrustGatewayLogging, error)
public ZeroTrustGatewayLogging(string name, ZeroTrustGatewayLoggingArgs args, CustomResourceOptions? opts = null)
public ZeroTrustGatewayLogging(String name, ZeroTrustGatewayLoggingArgs args)
public ZeroTrustGatewayLogging(String name, ZeroTrustGatewayLoggingArgs args, CustomResourceOptions options)
type: cloudflare:ZeroTrustGatewayLogging
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustGatewayLoggingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ZeroTrustGatewayLoggingArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustGatewayLoggingArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ZeroTrustGatewayLoggingArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ZeroTrustGatewayLoggingArgs
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 zeroTrustGatewayLoggingResource = new Cloudflare.ZeroTrustGatewayLogging("zeroTrustGatewayLoggingResource", new()
{
    AccountId = "string",
    RedactPii = false,
    SettingsByRuleType = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeArgs
    {
        Dns = "string",
        Http = "string",
        L4 = "string",
    },
});
Copy
example, err := cloudflare.NewZeroTrustGatewayLogging(ctx, "zeroTrustGatewayLoggingResource", &cloudflare.ZeroTrustGatewayLoggingArgs{
	AccountId: pulumi.String("string"),
	RedactPii: pulumi.Bool(false),
	SettingsByRuleType: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeArgs{
		Dns:  pulumi.String("string"),
		Http: pulumi.String("string"),
		L4:   pulumi.String("string"),
	},
})
Copy
var zeroTrustGatewayLoggingResource = new ZeroTrustGatewayLogging("zeroTrustGatewayLoggingResource", ZeroTrustGatewayLoggingArgs.builder()
    .accountId("string")
    .redactPii(false)
    .settingsByRuleType(ZeroTrustGatewayLoggingSettingsByRuleTypeArgs.builder()
        .dns("string")
        .http("string")
        .l4("string")
        .build())
    .build());
Copy
zero_trust_gateway_logging_resource = cloudflare.ZeroTrustGatewayLogging("zeroTrustGatewayLoggingResource",
    account_id="string",
    redact_pii=False,
    settings_by_rule_type={
        "dns": "string",
        "http": "string",
        "l4": "string",
    })
Copy
const zeroTrustGatewayLoggingResource = new cloudflare.ZeroTrustGatewayLogging("zeroTrustGatewayLoggingResource", {
    accountId: "string",
    redactPii: false,
    settingsByRuleType: {
        dns: "string",
        http: "string",
        l4: "string",
    },
});
Copy
type: cloudflare:ZeroTrustGatewayLogging
properties:
    accountId: string
    redactPii: false
    settingsByRuleType:
        dns: string
        http: string
        l4: string
Copy

ZeroTrustGatewayLogging 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 ZeroTrustGatewayLogging resource accepts the following input properties:

AccountId This property is required. string
RedactPii bool
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
SettingsByRuleType ZeroTrustGatewayLoggingSettingsByRuleType
Logging settings by rule type.
AccountId This property is required. string
RedactPii bool
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
SettingsByRuleType ZeroTrustGatewayLoggingSettingsByRuleTypeArgs
Logging settings by rule type.
accountId This property is required. String
redactPii Boolean
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
settingsByRuleType ZeroTrustGatewayLoggingSettingsByRuleType
Logging settings by rule type.
accountId This property is required. string
redactPii boolean
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
settingsByRuleType ZeroTrustGatewayLoggingSettingsByRuleType
Logging settings by rule type.
account_id This property is required. str
redact_pii bool
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
settings_by_rule_type ZeroTrustGatewayLoggingSettingsByRuleTypeArgs
Logging settings by rule type.
accountId This property is required. String
redactPii Boolean
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
settingsByRuleType Property Map
Logging settings by rule type.

Outputs

All input properties are implicitly available as output properties. Additionally, the ZeroTrustGatewayLogging 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 ZeroTrustGatewayLogging Resource

Get an existing ZeroTrustGatewayLogging 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?: ZeroTrustGatewayLoggingState, opts?: CustomResourceOptions): ZeroTrustGatewayLogging
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        redact_pii: Optional[bool] = None,
        settings_by_rule_type: Optional[ZeroTrustGatewayLoggingSettingsByRuleTypeArgs] = None) -> ZeroTrustGatewayLogging
func GetZeroTrustGatewayLogging(ctx *Context, name string, id IDInput, state *ZeroTrustGatewayLoggingState, opts ...ResourceOption) (*ZeroTrustGatewayLogging, error)
public static ZeroTrustGatewayLogging Get(string name, Input<string> id, ZeroTrustGatewayLoggingState? state, CustomResourceOptions? opts = null)
public static ZeroTrustGatewayLogging get(String name, Output<String> id, ZeroTrustGatewayLoggingState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:ZeroTrustGatewayLogging    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AccountId string
RedactPii bool
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
SettingsByRuleType ZeroTrustGatewayLoggingSettingsByRuleType
Logging settings by rule type.
AccountId string
RedactPii bool
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
SettingsByRuleType ZeroTrustGatewayLoggingSettingsByRuleTypeArgs
Logging settings by rule type.
accountId String
redactPii Boolean
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
settingsByRuleType ZeroTrustGatewayLoggingSettingsByRuleType
Logging settings by rule type.
accountId string
redactPii boolean
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
settingsByRuleType ZeroTrustGatewayLoggingSettingsByRuleType
Logging settings by rule type.
account_id str
redact_pii bool
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
settings_by_rule_type ZeroTrustGatewayLoggingSettingsByRuleTypeArgs
Logging settings by rule type.
accountId String
redactPii Boolean
Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
settingsByRuleType Property Map
Logging settings by rule type.

Supporting Types

ZeroTrustGatewayLoggingSettingsByRuleType
, ZeroTrustGatewayLoggingSettingsByRuleTypeArgs

Dns string
Logging settings for DNS firewall.
Http string
Logging settings for HTTP/HTTPS firewall.
L4 string
Logging settings for Network firewall.
Dns string
Logging settings for DNS firewall.
Http string
Logging settings for HTTP/HTTPS firewall.
L4 string
Logging settings for Network firewall.
dns String
Logging settings for DNS firewall.
http String
Logging settings for HTTP/HTTPS firewall.
l4 String
Logging settings for Network firewall.
dns string
Logging settings for DNS firewall.
http string
Logging settings for HTTP/HTTPS firewall.
l4 string
Logging settings for Network firewall.
dns str
Logging settings for DNS firewall.
http str
Logging settings for HTTP/HTTPS firewall.
l4 str
Logging settings for Network firewall.
dns String
Logging settings for DNS firewall.
http String
Logging settings for HTTP/HTTPS firewall.
l4 String
Logging settings for Network firewall.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.