Show / Hide Table of Contents

Class PageRule

Provides a Cloudflare page rule resource.

Example Usage

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
public MyStack()
{
    // Add a page rule to the domain
    var foobar = new Cloudflare.PageRule("foobar", new Cloudflare.PageRuleArgs
    {
        ZoneId = @var.Cloudflare_zone_id,
        Target = $"sub.{@var.Cloudflare_zone}/page",
        Priority = 1,
        Actions = new Cloudflare.Inputs.PageRuleActionsArgs
        {
            Ssl = "flexible",
            EmailObfuscation = "on",
            Minify = 
            {

                {
                    { "html", "off" },
                    { "css", "on" },
                    { "js", "on" },
                },
            },
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
PageRule
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Cloudflare
Assembly: Pulumi.Cloudflare.dll
Syntax
public class PageRule : CustomResource

Constructors

View Source

PageRule(String, PageRuleArgs, CustomResourceOptions)

Create a PageRule resource with the given unique name, arguments, and options.

Declaration
public PageRule(string name, PageRuleArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

PageRuleArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Actions

The actions taken by the page rule, options given below.

Declaration
public Output<PageRuleActions> Actions { get; }
Property Value
Type Description
Output<PageRuleActions>
View Source

Priority

The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.

Declaration
public Output<int?> Priority { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Status

Whether the page rule is active or disabled.

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>
View Source

Target

The URL pattern to target with the page rule.

Declaration
public Output<string> Target { get; }
Property Value
Type Description
Output<System.String>
View Source

ZoneId

The DNS zone ID to which the page rule should be added.

Declaration
public Output<string> ZoneId { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, PageRuleState, CustomResourceOptions)

Get an existing PageRule resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static PageRule Get(string name, Input<string> id, PageRuleState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

PageRuleState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
PageRule
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.