1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. PageShieldPolicy
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.PageShieldPolicy

Explore with Pulumi AI

Example Usage

Create PageShieldPolicy Resource

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

Constructor syntax

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

@overload
def PageShieldPolicy(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     action: Optional[str] = None,
                     description: Optional[str] = None,
                     enabled: Optional[bool] = None,
                     expression: Optional[str] = None,
                     value: Optional[str] = None,
                     zone_id: Optional[str] = None)
func NewPageShieldPolicy(ctx *Context, name string, args PageShieldPolicyArgs, opts ...ResourceOption) (*PageShieldPolicy, error)
public PageShieldPolicy(string name, PageShieldPolicyArgs args, CustomResourceOptions? opts = null)
public PageShieldPolicy(String name, PageShieldPolicyArgs args)
public PageShieldPolicy(String name, PageShieldPolicyArgs args, CustomResourceOptions options)
type: cloudflare:PageShieldPolicy
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. PageShieldPolicyArgs
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. PageShieldPolicyArgs
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. PageShieldPolicyArgs
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. PageShieldPolicyArgs
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. PageShieldPolicyArgs
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 pageShieldPolicyResource = new Cloudflare.PageShieldPolicy("pageShieldPolicyResource", new()
{
    Action = "string",
    Description = "string",
    Enabled = false,
    Expression = "string",
    Value = "string",
    ZoneId = "string",
});
Copy
example, err := cloudflare.NewPageShieldPolicy(ctx, "pageShieldPolicyResource", &cloudflare.PageShieldPolicyArgs{
	Action:      pulumi.String("string"),
	Description: pulumi.String("string"),
	Enabled:     pulumi.Bool(false),
	Expression:  pulumi.String("string"),
	Value:       pulumi.String("string"),
	ZoneId:      pulumi.String("string"),
})
Copy
var pageShieldPolicyResource = new PageShieldPolicy("pageShieldPolicyResource", PageShieldPolicyArgs.builder()
    .action("string")
    .description("string")
    .enabled(false)
    .expression("string")
    .value("string")
    .zoneId("string")
    .build());
Copy
page_shield_policy_resource = cloudflare.PageShieldPolicy("pageShieldPolicyResource",
    action="string",
    description="string",
    enabled=False,
    expression="string",
    value="string",
    zone_id="string")
Copy
const pageShieldPolicyResource = new cloudflare.PageShieldPolicy("pageShieldPolicyResource", {
    action: "string",
    description: "string",
    enabled: false,
    expression: "string",
    value: "string",
    zoneId: "string",
});
Copy
type: cloudflare:PageShieldPolicy
properties:
    action: string
    description: string
    enabled: false
    expression: string
    value: string
    zoneId: string
Copy

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

Action This property is required. string
The action to take if the expression matches Available values: "allow", "log".
Description This property is required. string
A description for the policy
Enabled This property is required. bool
Whether the policy is enabled
Expression This property is required. string
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
Value This property is required. string
The policy which will be applied
ZoneId This property is required. string
Identifier
Action This property is required. string
The action to take if the expression matches Available values: "allow", "log".
Description This property is required. string
A description for the policy
Enabled This property is required. bool
Whether the policy is enabled
Expression This property is required. string
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
Value This property is required. string
The policy which will be applied
ZoneId This property is required. string
Identifier
action This property is required. String
The action to take if the expression matches Available values: "allow", "log".
description This property is required. String
A description for the policy
enabled This property is required. Boolean
Whether the policy is enabled
expression This property is required. String
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
value This property is required. String
The policy which will be applied
zoneId This property is required. String
Identifier
action This property is required. string
The action to take if the expression matches Available values: "allow", "log".
description This property is required. string
A description for the policy
enabled This property is required. boolean
Whether the policy is enabled
expression This property is required. string
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
value This property is required. string
The policy which will be applied
zoneId This property is required. string
Identifier
action This property is required. str
The action to take if the expression matches Available values: "allow", "log".
description This property is required. str
A description for the policy
enabled This property is required. bool
Whether the policy is enabled
expression This property is required. str
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
value This property is required. str
The policy which will be applied
zone_id This property is required. str
Identifier
action This property is required. String
The action to take if the expression matches Available values: "allow", "log".
description This property is required. String
A description for the policy
enabled This property is required. Boolean
Whether the policy is enabled
expression This property is required. String
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
value This property is required. String
The policy which will be applied
zoneId This property is required. String
Identifier

Outputs

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

Get an existing PageShieldPolicy 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?: PageShieldPolicyState, opts?: CustomResourceOptions): PageShieldPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        description: Optional[str] = None,
        enabled: Optional[bool] = None,
        expression: Optional[str] = None,
        value: Optional[str] = None,
        zone_id: Optional[str] = None) -> PageShieldPolicy
func GetPageShieldPolicy(ctx *Context, name string, id IDInput, state *PageShieldPolicyState, opts ...ResourceOption) (*PageShieldPolicy, error)
public static PageShieldPolicy Get(string name, Input<string> id, PageShieldPolicyState? state, CustomResourceOptions? opts = null)
public static PageShieldPolicy get(String name, Output<String> id, PageShieldPolicyState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:PageShieldPolicy    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:
Action string
The action to take if the expression matches Available values: "allow", "log".
Description string
A description for the policy
Enabled bool
Whether the policy is enabled
Expression string
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
Value string
The policy which will be applied
ZoneId string
Identifier
Action string
The action to take if the expression matches Available values: "allow", "log".
Description string
A description for the policy
Enabled bool
Whether the policy is enabled
Expression string
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
Value string
The policy which will be applied
ZoneId string
Identifier
action String
The action to take if the expression matches Available values: "allow", "log".
description String
A description for the policy
enabled Boolean
Whether the policy is enabled
expression String
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
value String
The policy which will be applied
zoneId String
Identifier
action string
The action to take if the expression matches Available values: "allow", "log".
description string
A description for the policy
enabled boolean
Whether the policy is enabled
expression string
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
value string
The policy which will be applied
zoneId string
Identifier
action str
The action to take if the expression matches Available values: "allow", "log".
description str
A description for the policy
enabled bool
Whether the policy is enabled
expression str
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
value str
The policy which will be applied
zone_id str
Identifier
action String
The action to take if the expression matches Available values: "allow", "log".
description String
A description for the policy
enabled Boolean
Whether the policy is enabled
expression String
The expression which must match for the policy to be applied, using the Cloudflare Firewall rule expression syntax
value String
The policy which will be applied
zoneId String
Identifier

Import

$ pulumi import cloudflare:index/pageShieldPolicy:PageShieldPolicy example '<zone_id>/<policy_id>'
Copy

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 cloudflare Terraform Provider.