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: {
logAll: false,
logBlocks: true,
},
http: {
logAll: false,
logBlocks: true,
},
l4: {
logAll: false,
logBlocks: true,
},
},
});
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": {
"log_all": False,
"log_blocks": True,
},
"http": {
"log_all": False,
"log_blocks": True,
},
"l4": {
"log_all": False,
"log_blocks": True,
},
})
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: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeDnsArgs{
LogAll: pulumi.Bool(false),
LogBlocks: pulumi.Bool(true),
},
Http: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeHttpArgs{
LogAll: pulumi.Bool(false),
LogBlocks: pulumi.Bool(true),
},
L4: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeL4Args{
LogAll: pulumi.Bool(false),
LogBlocks: pulumi.Bool(true),
},
},
})
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 exampleZeroTrustGatewayLogging = new Cloudflare.ZeroTrustGatewayLogging("example_zero_trust_gateway_logging", new()
{
AccountId = "699d98642c564d2e855e9661899b7252",
RedactPii = true,
SettingsByRuleType = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeArgs
{
Dns = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeDnsArgs
{
LogAll = false,
LogBlocks = true,
},
Http = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeHttpArgs
{
LogAll = false,
LogBlocks = true,
},
L4 = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeL4Args
{
LogAll = false,
LogBlocks = true,
},
},
});
});
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 com.pulumi.cloudflare.inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeDnsArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeHttpArgs;
import com.pulumi.cloudflare.inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeL4Args;
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(ZeroTrustGatewayLoggingSettingsByRuleTypeDnsArgs.builder()
.logAll(false)
.logBlocks(true)
.build())
.http(ZeroTrustGatewayLoggingSettingsByRuleTypeHttpArgs.builder()
.logAll(false)
.logBlocks(true)
.build())
.l4(ZeroTrustGatewayLoggingSettingsByRuleTypeL4Args.builder()
.logAll(false)
.logBlocks(true)
.build())
.build())
.build());
}
}
resources:
exampleZeroTrustGatewayLogging:
type: cloudflare:ZeroTrustGatewayLogging
name: example_zero_trust_gateway_logging
properties:
accountId: 699d98642c564d2e855e9661899b7252
redactPii: true
settingsByRuleType:
dns:
logAll: false
logBlocks: true
http:
logAll: false
logBlocks: true
l4:
logAll: false
logBlocks: true
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 string
- The unique name of the resource.
- args ZeroTrustGatewayLoggingArgs
- 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 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 string
- The unique name of the resource.
- args ZeroTrustGatewayLoggingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZeroTrustGatewayLoggingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeDnsArgs
{
LogAll = false,
LogBlocks = false,
},
Http = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeHttpArgs
{
LogAll = false,
LogBlocks = false,
},
L4 = new Cloudflare.Inputs.ZeroTrustGatewayLoggingSettingsByRuleTypeL4Args
{
LogAll = false,
LogBlocks = false,
},
},
});
example, err := cloudflare.NewZeroTrustGatewayLogging(ctx, "zeroTrustGatewayLoggingResource", &cloudflare.ZeroTrustGatewayLoggingArgs{
AccountId: pulumi.String("string"),
RedactPii: pulumi.Bool(false),
SettingsByRuleType: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeArgs{
Dns: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeDnsArgs{
LogAll: pulumi.Bool(false),
LogBlocks: pulumi.Bool(false),
},
Http: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeHttpArgs{
LogAll: pulumi.Bool(false),
LogBlocks: pulumi.Bool(false),
},
L4: &cloudflare.ZeroTrustGatewayLoggingSettingsByRuleTypeL4Args{
LogAll: pulumi.Bool(false),
LogBlocks: pulumi.Bool(false),
},
},
})
var zeroTrustGatewayLoggingResource = new ZeroTrustGatewayLogging("zeroTrustGatewayLoggingResource", ZeroTrustGatewayLoggingArgs.builder()
.accountId("string")
.redactPii(false)
.settingsByRuleType(ZeroTrustGatewayLoggingSettingsByRuleTypeArgs.builder()
.dns(ZeroTrustGatewayLoggingSettingsByRuleTypeDnsArgs.builder()
.logAll(false)
.logBlocks(false)
.build())
.http(ZeroTrustGatewayLoggingSettingsByRuleTypeHttpArgs.builder()
.logAll(false)
.logBlocks(false)
.build())
.l4(ZeroTrustGatewayLoggingSettingsByRuleTypeL4Args.builder()
.logAll(false)
.logBlocks(false)
.build())
.build())
.build());
zero_trust_gateway_logging_resource = cloudflare.ZeroTrustGatewayLogging("zeroTrustGatewayLoggingResource",
account_id="string",
redact_pii=False,
settings_by_rule_type={
"dns": {
"log_all": False,
"log_blocks": False,
},
"http": {
"log_all": False,
"log_blocks": False,
},
"l4": {
"log_all": False,
"log_blocks": False,
},
})
const zeroTrustGatewayLoggingResource = new cloudflare.ZeroTrustGatewayLogging("zeroTrustGatewayLoggingResource", {
accountId: "string",
redactPii: false,
settingsByRuleType: {
dns: {
logAll: false,
logBlocks: false,
},
http: {
logAll: false,
logBlocks: false,
},
l4: {
logAll: false,
logBlocks: false,
},
},
});
type: cloudflare:ZeroTrustGatewayLogging
properties:
accountId: string
redactPii: false
settingsByRuleType:
dns:
logAll: false
logBlocks: false
http:
logAll: false
logBlocks: false
l4:
logAll: false
logBlocks: false
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:
- Account
Id string - 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 ZeroRule Type Trust Gateway Logging Settings By Rule Type - Logging settings by rule type.
- Account
Id string - 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 ZeroRule Type Trust Gateway Logging Settings By Rule Type Args - Logging settings by rule type.
- account
Id String - redact
Pii Boolean - Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
- settings
By ZeroRule Type Trust Gateway Logging Settings By Rule Type - Logging settings by rule type.
- account
Id string - redact
Pii boolean - Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
- settings
By ZeroRule Type Trust Gateway Logging Settings By Rule Type - 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_ Zerorule_ type Trust Gateway Logging Settings By Rule Type Args - Logging settings by rule type.
- account
Id String - redact
Pii Boolean - Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
- settings
By Property MapRule Type - 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
- 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 - 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 ZeroRule Type Trust Gateway Logging Settings By Rule Type - Logging settings by rule type.
- Account
Id string - 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 ZeroRule Type Trust Gateway Logging Settings By Rule Type Args - Logging settings by rule type.
- account
Id String - redact
Pii Boolean - Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
- settings
By ZeroRule Type Trust Gateway Logging Settings By Rule Type - Logging settings by rule type.
- account
Id string - redact
Pii boolean - Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
- settings
By ZeroRule Type Trust Gateway Logging Settings By Rule Type - 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_ Zerorule_ type Trust Gateway Logging Settings By Rule Type Args - Logging settings by rule type.
- account
Id String - redact
Pii Boolean - Redact personally identifiable information from activity logging (PII fields are: source IP, user email, user ID, device ID, URL, referrer, user agent).
- settings
By Property MapRule Type - Logging settings by rule type.
Supporting Types
ZeroTrustGatewayLoggingSettingsByRuleType, ZeroTrustGatewayLoggingSettingsByRuleTypeArgs
ZeroTrustGatewayLoggingSettingsByRuleTypeDns, ZeroTrustGatewayLoggingSettingsByRuleTypeDnsArgs
- log_
all bool - Log all requests to this service.
- log_
blocks bool - Log only blocking requests to this service.
ZeroTrustGatewayLoggingSettingsByRuleTypeHttp, ZeroTrustGatewayLoggingSettingsByRuleTypeHttpArgs
- log_
all bool - Log all requests to this service.
- log_
blocks bool - Log only blocking requests to this service.
ZeroTrustGatewayLoggingSettingsByRuleTypeL4, ZeroTrustGatewayLoggingSettingsByRuleTypeL4Args
- log_
all bool - Log all requests to this service.
- log_
blocks bool - Log only blocking requests to this service.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.