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 string
- The unique name of the resource.
- args PageShieldPolicyArgs
- 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 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 string
- The unique name of the resource.
- args PageShieldPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PageShieldPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var pageShieldPolicyResource = new PageShieldPolicy("pageShieldPolicyResource", PageShieldPolicyArgs.builder()
.action("string")
.description("string")
.enabled(false)
.expression("string")
.value("string")
.zoneId("string")
.build());
page_shield_policy_resource = cloudflare.PageShieldPolicy("pageShieldPolicyResource",
action="string",
description="string",
enabled=False,
expression="string",
value="string",
zone_id="string")
const pageShieldPolicyResource = new cloudflare.PageShieldPolicy("pageShieldPolicyResource", {
action: "string",
description: "string",
enabled: false,
expression: "string",
value: "string",
zoneId: "string",
});
type: cloudflare:PageShieldPolicy
properties:
action: string
description: string
enabled: false
expression: string
value: string
zoneId: string
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 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
- Zone
Id 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
- Zone
Id 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
- zone
Id 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
- zone
Id 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
- zone
Id 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
- 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.
- 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
- Zone
Id 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
- Zone
Id 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
- zone
Id 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
- zone
Id 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
- zone
Id String - Identifier
Import
$ pulumi import cloudflare:index/pageShieldPolicy:PageShieldPolicy example '<zone_id>/<policy_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
cloudflare
Terraform Provider.