1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. PageRule
Cloudflare v5.44.0 published on Wednesday, Nov 27, 2024 by Pulumi

cloudflare.PageRule

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.44.0 published on Wednesday, Nov 27, 2024 by Pulumi

    Provides a Cloudflare page rule resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    // Add a page rule to the domain
    const foobar = new cloudflare.PageRule("foobar", {
        zoneId: cloudflareZoneId,
        target: `sub.${cloudflareZone}/page`,
        priority: 1,
        actions: {
            ssl: "flexible",
            emailObfuscation: "on",
            minifies: [{
                html: "off",
                css: "on",
                js: "on",
            }],
        },
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Add a page rule to the domain
    foobar = cloudflare.PageRule("foobar",
        zone_id=cloudflare_zone_id,
        target=f"sub.{cloudflare_zone}/page",
        priority=1,
        actions={
            "ssl": "flexible",
            "email_obfuscation": "on",
            "minifies": [{
                "html": "off",
                "css": "on",
                "js": "on",
            }],
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Add a page rule to the domain
    		_, err := cloudflare.NewPageRule(ctx, "foobar", &cloudflare.PageRuleArgs{
    			ZoneId:   pulumi.Any(cloudflareZoneId),
    			Target:   pulumi.Sprintf("sub.%v/page", cloudflareZone),
    			Priority: pulumi.Int(1),
    			Actions: &cloudflare.PageRuleActionsArgs{
    				Ssl:              pulumi.String("flexible"),
    				EmailObfuscation: pulumi.String("on"),
    				Minifies: cloudflare.PageRuleActionsMinifyArray{
    					&cloudflare.PageRuleActionsMinifyArgs{
    						Html: pulumi.String("off"),
    						Css:  pulumi.String("on"),
    						Js:   pulumi.String("on"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Add a page rule to the domain
        var foobar = new Cloudflare.PageRule("foobar", new()
        {
            ZoneId = cloudflareZoneId,
            Target = $"sub.{cloudflareZone}/page",
            Priority = 1,
            Actions = new Cloudflare.Inputs.PageRuleActionsArgs
            {
                Ssl = "flexible",
                EmailObfuscation = "on",
                Minifies = new[]
                {
                    new Cloudflare.Inputs.PageRuleActionsMinifyArgs
                    {
                        Html = "off",
                        Css = "on",
                        Js = "on",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.PageRule;
    import com.pulumi.cloudflare.PageRuleArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsArgs;
    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) {
            // Add a page rule to the domain
            var foobar = new PageRule("foobar", PageRuleArgs.builder()
                .zoneId(cloudflareZoneId)
                .target(String.format("sub.%s/page", cloudflareZone))
                .priority(1)
                .actions(PageRuleActionsArgs.builder()
                    .ssl("flexible")
                    .emailObfuscation("on")
                    .minifies(PageRuleActionsMinifyArgs.builder()
                        .html("off")
                        .css("on")
                        .js("on")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Add a page rule to the domain
      foobar:
        type: cloudflare:PageRule
        properties:
          zoneId: ${cloudflareZoneId}
          target: sub.${cloudflareZone}/page
          priority: 1
          actions:
            ssl: flexible
            emailObfuscation: on
            minifies:
              - html: off
                css: on
                js: on
    

    Create PageRule Resource

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

    Constructor syntax

    new PageRule(name: string, args: PageRuleArgs, opts?: CustomResourceOptions);
    @overload
    def PageRule(resource_name: str,
                 args: PageRuleArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def PageRule(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 actions: Optional[PageRuleActionsArgs] = None,
                 target: Optional[str] = None,
                 zone_id: Optional[str] = None,
                 priority: Optional[int] = None,
                 status: Optional[str] = None)
    func NewPageRule(ctx *Context, name string, args PageRuleArgs, opts ...ResourceOption) (*PageRule, error)
    public PageRule(string name, PageRuleArgs args, CustomResourceOptions? opts = null)
    public PageRule(String name, PageRuleArgs args)
    public PageRule(String name, PageRuleArgs args, CustomResourceOptions options)
    
    type: cloudflare:PageRule
    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 PageRuleArgs
    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 PageRuleArgs
    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 PageRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PageRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PageRuleArgs
    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 pageRuleResource = new Cloudflare.PageRule("pageRuleResource", new()
    {
        Actions = new Cloudflare.Inputs.PageRuleActionsArgs
        {
            AlwaysUseHttps = false,
            AutomaticHttpsRewrites = "string",
            BrowserCacheTtl = "string",
            BrowserCheck = "string",
            BypassCacheOnCookie = "string",
            CacheByDeviceType = "string",
            CacheDeceptionArmor = "string",
            CacheKeyFields = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsArgs
            {
                Host = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHostArgs
                {
                    Resolved = false,
                },
                QueryString = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs
                {
                    Excludes = new[]
                    {
                        "string",
                    },
                    Ignore = false,
                    Includes = new[]
                    {
                        "string",
                    },
                },
                User = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsUserArgs
                {
                    DeviceType = false,
                    Geo = false,
                    Lang = false,
                },
                Cookie = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsCookieArgs
                {
                    CheckPresences = new[]
                    {
                        "string",
                    },
                    Includes = new[]
                    {
                        "string",
                    },
                },
                Header = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHeaderArgs
                {
                    CheckPresences = new[]
                    {
                        "string",
                    },
                    Excludes = new[]
                    {
                        "string",
                    },
                    Includes = new[]
                    {
                        "string",
                    },
                },
            },
            CacheLevel = "string",
            CacheOnCookie = "string",
            CacheTtlByStatuses = new[]
            {
                new Cloudflare.Inputs.PageRuleActionsCacheTtlByStatusArgs
                {
                    Codes = "string",
                    Ttl = 0,
                },
            },
            DisableApps = false,
            DisablePerformance = false,
            DisableRailgun = false,
            DisableSecurity = false,
            DisableZaraz = false,
            EdgeCacheTtl = 0,
            EmailObfuscation = "string",
            ExplicitCacheControl = "string",
            ForwardingUrl = new Cloudflare.Inputs.PageRuleActionsForwardingUrlArgs
            {
                StatusCode = 0,
                Url = "string",
            },
            HostHeaderOverride = "string",
            IpGeolocation = "string",
            Minifies = new[]
            {
                new Cloudflare.Inputs.PageRuleActionsMinifyArgs
                {
                    Css = "string",
                    Html = "string",
                    Js = "string",
                },
            },
            Mirage = "string",
            OpportunisticEncryption = "string",
            OriginErrorPagePassThru = "string",
            Polish = "string",
            ResolveOverride = "string",
            RespectStrongEtag = "string",
            ResponseBuffering = "string",
            RocketLoader = "string",
            SecurityLevel = "string",
            ServerSideExclude = "string",
            SortQueryStringForCache = "string",
            Ssl = "string",
            TrueClientIpHeader = "string",
            Waf = "string",
        },
        Target = "string",
        ZoneId = "string",
        Priority = 0,
        Status = "string",
    });
    
    example, err := cloudflare.NewPageRule(ctx, "pageRuleResource", &cloudflare.PageRuleArgs{
    	Actions: &cloudflare.PageRuleActionsArgs{
    		AlwaysUseHttps:         pulumi.Bool(false),
    		AutomaticHttpsRewrites: pulumi.String("string"),
    		BrowserCacheTtl:        pulumi.String("string"),
    		BrowserCheck:           pulumi.String("string"),
    		BypassCacheOnCookie:    pulumi.String("string"),
    		CacheByDeviceType:      pulumi.String("string"),
    		CacheDeceptionArmor:    pulumi.String("string"),
    		CacheKeyFields: &cloudflare.PageRuleActionsCacheKeyFieldsArgs{
    			Host: &cloudflare.PageRuleActionsCacheKeyFieldsHostArgs{
    				Resolved: pulumi.Bool(false),
    			},
    			QueryString: &cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs{
    				Excludes: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Ignore: pulumi.Bool(false),
    				Includes: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    			User: &cloudflare.PageRuleActionsCacheKeyFieldsUserArgs{
    				DeviceType: pulumi.Bool(false),
    				Geo:        pulumi.Bool(false),
    				Lang:       pulumi.Bool(false),
    			},
    			Cookie: &cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs{
    				CheckPresences: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Includes: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    			Header: &cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs{
    				CheckPresences: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Excludes: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Includes: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		CacheLevel:    pulumi.String("string"),
    		CacheOnCookie: pulumi.String("string"),
    		CacheTtlByStatuses: cloudflare.PageRuleActionsCacheTtlByStatusArray{
    			&cloudflare.PageRuleActionsCacheTtlByStatusArgs{
    				Codes: pulumi.String("string"),
    				Ttl:   pulumi.Int(0),
    			},
    		},
    		DisableApps:          pulumi.Bool(false),
    		DisablePerformance:   pulumi.Bool(false),
    		DisableRailgun:       pulumi.Bool(false),
    		DisableSecurity:      pulumi.Bool(false),
    		DisableZaraz:         pulumi.Bool(false),
    		EdgeCacheTtl:         pulumi.Int(0),
    		EmailObfuscation:     pulumi.String("string"),
    		ExplicitCacheControl: pulumi.String("string"),
    		ForwardingUrl: &cloudflare.PageRuleActionsForwardingUrlArgs{
    			StatusCode: pulumi.Int(0),
    			Url:        pulumi.String("string"),
    		},
    		HostHeaderOverride: pulumi.String("string"),
    		IpGeolocation:      pulumi.String("string"),
    		Minifies: cloudflare.PageRuleActionsMinifyArray{
    			&cloudflare.PageRuleActionsMinifyArgs{
    				Css:  pulumi.String("string"),
    				Html: pulumi.String("string"),
    				Js:   pulumi.String("string"),
    			},
    		},
    		Mirage:                  pulumi.String("string"),
    		OpportunisticEncryption: pulumi.String("string"),
    		OriginErrorPagePassThru: pulumi.String("string"),
    		Polish:                  pulumi.String("string"),
    		ResolveOverride:         pulumi.String("string"),
    		RespectStrongEtag:       pulumi.String("string"),
    		ResponseBuffering:       pulumi.String("string"),
    		RocketLoader:            pulumi.String("string"),
    		SecurityLevel:           pulumi.String("string"),
    		ServerSideExclude:       pulumi.String("string"),
    		SortQueryStringForCache: pulumi.String("string"),
    		Ssl:                     pulumi.String("string"),
    		TrueClientIpHeader:      pulumi.String("string"),
    		Waf:                     pulumi.String("string"),
    	},
    	Target:   pulumi.String("string"),
    	ZoneId:   pulumi.String("string"),
    	Priority: pulumi.Int(0),
    	Status:   pulumi.String("string"),
    })
    
    var pageRuleResource = new PageRule("pageRuleResource", PageRuleArgs.builder()
        .actions(PageRuleActionsArgs.builder()
            .alwaysUseHttps(false)
            .automaticHttpsRewrites("string")
            .browserCacheTtl("string")
            .browserCheck("string")
            .bypassCacheOnCookie("string")
            .cacheByDeviceType("string")
            .cacheDeceptionArmor("string")
            .cacheKeyFields(PageRuleActionsCacheKeyFieldsArgs.builder()
                .host(PageRuleActionsCacheKeyFieldsHostArgs.builder()
                    .resolved(false)
                    .build())
                .queryString(PageRuleActionsCacheKeyFieldsQueryStringArgs.builder()
                    .excludes("string")
                    .ignore(false)
                    .includes("string")
                    .build())
                .user(PageRuleActionsCacheKeyFieldsUserArgs.builder()
                    .deviceType(false)
                    .geo(false)
                    .lang(false)
                    .build())
                .cookie(PageRuleActionsCacheKeyFieldsCookieArgs.builder()
                    .checkPresences("string")
                    .includes("string")
                    .build())
                .header(PageRuleActionsCacheKeyFieldsHeaderArgs.builder()
                    .checkPresences("string")
                    .excludes("string")
                    .includes("string")
                    .build())
                .build())
            .cacheLevel("string")
            .cacheOnCookie("string")
            .cacheTtlByStatuses(PageRuleActionsCacheTtlByStatusArgs.builder()
                .codes("string")
                .ttl(0)
                .build())
            .disableApps(false)
            .disablePerformance(false)
            .disableRailgun(false)
            .disableSecurity(false)
            .disableZaraz(false)
            .edgeCacheTtl(0)
            .emailObfuscation("string")
            .explicitCacheControl("string")
            .forwardingUrl(PageRuleActionsForwardingUrlArgs.builder()
                .statusCode(0)
                .url("string")
                .build())
            .hostHeaderOverride("string")
            .ipGeolocation("string")
            .minifies(PageRuleActionsMinifyArgs.builder()
                .css("string")
                .html("string")
                .js("string")
                .build())
            .mirage("string")
            .opportunisticEncryption("string")
            .originErrorPagePassThru("string")
            .polish("string")
            .resolveOverride("string")
            .respectStrongEtag("string")
            .responseBuffering("string")
            .rocketLoader("string")
            .securityLevel("string")
            .serverSideExclude("string")
            .sortQueryStringForCache("string")
            .ssl("string")
            .trueClientIpHeader("string")
            .waf("string")
            .build())
        .target("string")
        .zoneId("string")
        .priority(0)
        .status("string")
        .build());
    
    page_rule_resource = cloudflare.PageRule("pageRuleResource",
        actions={
            "always_use_https": False,
            "automatic_https_rewrites": "string",
            "browser_cache_ttl": "string",
            "browser_check": "string",
            "bypass_cache_on_cookie": "string",
            "cache_by_device_type": "string",
            "cache_deception_armor": "string",
            "cache_key_fields": {
                "host": {
                    "resolved": False,
                },
                "query_string": {
                    "excludes": ["string"],
                    "ignore": False,
                    "includes": ["string"],
                },
                "user": {
                    "device_type": False,
                    "geo": False,
                    "lang": False,
                },
                "cookie": {
                    "check_presences": ["string"],
                    "includes": ["string"],
                },
                "header": {
                    "check_presences": ["string"],
                    "excludes": ["string"],
                    "includes": ["string"],
                },
            },
            "cache_level": "string",
            "cache_on_cookie": "string",
            "cache_ttl_by_statuses": [{
                "codes": "string",
                "ttl": 0,
            }],
            "disable_apps": False,
            "disable_performance": False,
            "disable_railgun": False,
            "disable_security": False,
            "disable_zaraz": False,
            "edge_cache_ttl": 0,
            "email_obfuscation": "string",
            "explicit_cache_control": "string",
            "forwarding_url": {
                "status_code": 0,
                "url": "string",
            },
            "host_header_override": "string",
            "ip_geolocation": "string",
            "minifies": [{
                "css": "string",
                "html": "string",
                "js": "string",
            }],
            "mirage": "string",
            "opportunistic_encryption": "string",
            "origin_error_page_pass_thru": "string",
            "polish": "string",
            "resolve_override": "string",
            "respect_strong_etag": "string",
            "response_buffering": "string",
            "rocket_loader": "string",
            "security_level": "string",
            "server_side_exclude": "string",
            "sort_query_string_for_cache": "string",
            "ssl": "string",
            "true_client_ip_header": "string",
            "waf": "string",
        },
        target="string",
        zone_id="string",
        priority=0,
        status="string")
    
    const pageRuleResource = new cloudflare.PageRule("pageRuleResource", {
        actions: {
            alwaysUseHttps: false,
            automaticHttpsRewrites: "string",
            browserCacheTtl: "string",
            browserCheck: "string",
            bypassCacheOnCookie: "string",
            cacheByDeviceType: "string",
            cacheDeceptionArmor: "string",
            cacheKeyFields: {
                host: {
                    resolved: false,
                },
                queryString: {
                    excludes: ["string"],
                    ignore: false,
                    includes: ["string"],
                },
                user: {
                    deviceType: false,
                    geo: false,
                    lang: false,
                },
                cookie: {
                    checkPresences: ["string"],
                    includes: ["string"],
                },
                header: {
                    checkPresences: ["string"],
                    excludes: ["string"],
                    includes: ["string"],
                },
            },
            cacheLevel: "string",
            cacheOnCookie: "string",
            cacheTtlByStatuses: [{
                codes: "string",
                ttl: 0,
            }],
            disableApps: false,
            disablePerformance: false,
            disableRailgun: false,
            disableSecurity: false,
            disableZaraz: false,
            edgeCacheTtl: 0,
            emailObfuscation: "string",
            explicitCacheControl: "string",
            forwardingUrl: {
                statusCode: 0,
                url: "string",
            },
            hostHeaderOverride: "string",
            ipGeolocation: "string",
            minifies: [{
                css: "string",
                html: "string",
                js: "string",
            }],
            mirage: "string",
            opportunisticEncryption: "string",
            originErrorPagePassThru: "string",
            polish: "string",
            resolveOverride: "string",
            respectStrongEtag: "string",
            responseBuffering: "string",
            rocketLoader: "string",
            securityLevel: "string",
            serverSideExclude: "string",
            sortQueryStringForCache: "string",
            ssl: "string",
            trueClientIpHeader: "string",
            waf: "string",
        },
        target: "string",
        zoneId: "string",
        priority: 0,
        status: "string",
    });
    
    type: cloudflare:PageRule
    properties:
        actions:
            alwaysUseHttps: false
            automaticHttpsRewrites: string
            browserCacheTtl: string
            browserCheck: string
            bypassCacheOnCookie: string
            cacheByDeviceType: string
            cacheDeceptionArmor: string
            cacheKeyFields:
                cookie:
                    checkPresences:
                        - string
                    includes:
                        - string
                header:
                    checkPresences:
                        - string
                    excludes:
                        - string
                    includes:
                        - string
                host:
                    resolved: false
                queryString:
                    excludes:
                        - string
                    ignore: false
                    includes:
                        - string
                user:
                    deviceType: false
                    geo: false
                    lang: false
            cacheLevel: string
            cacheOnCookie: string
            cacheTtlByStatuses:
                - codes: string
                  ttl: 0
            disableApps: false
            disablePerformance: false
            disableRailgun: false
            disableSecurity: false
            disableZaraz: false
            edgeCacheTtl: 0
            emailObfuscation: string
            explicitCacheControl: string
            forwardingUrl:
                statusCode: 0
                url: string
            hostHeaderOverride: string
            ipGeolocation: string
            minifies:
                - css: string
                  html: string
                  js: string
            mirage: string
            opportunisticEncryption: string
            originErrorPagePassThru: string
            polish: string
            resolveOverride: string
            respectStrongEtag: string
            responseBuffering: string
            rocketLoader: string
            securityLevel: string
            serverSideExclude: string
            sortQueryStringForCache: string
            ssl: string
            trueClientIpHeader: string
            waf: string
        priority: 0
        status: string
        target: string
        zoneId: string
    

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

    Actions PageRuleActions
    The actions taken by the page rule, options given below.
    Target string
    The URL pattern to target with the page rule.
    ZoneId string
    The DNS zone ID to which the page rule should be added.
    Priority int
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    Status string
    Whether the page rule is active or disabled.
    Actions PageRuleActionsArgs
    The actions taken by the page rule, options given below.
    Target string
    The URL pattern to target with the page rule.
    ZoneId string
    The DNS zone ID to which the page rule should be added.
    Priority int
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    Status string
    Whether the page rule is active or disabled.
    actions PageRuleActions
    The actions taken by the page rule, options given below.
    target String
    The URL pattern to target with the page rule.
    zoneId String
    The DNS zone ID to which the page rule should be added.
    priority Integer
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    status String
    Whether the page rule is active or disabled.
    actions PageRuleActions
    The actions taken by the page rule, options given below.
    target string
    The URL pattern to target with the page rule.
    zoneId string
    The DNS zone ID to which the page rule should be added.
    priority number
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    status string
    Whether the page rule is active or disabled.
    actions PageRuleActionsArgs
    The actions taken by the page rule, options given below.
    target str
    The URL pattern to target with the page rule.
    zone_id str
    The DNS zone ID to which the page rule should be added.
    priority int
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    status str
    Whether the page rule is active or disabled.
    actions Property Map
    The actions taken by the page rule, options given below.
    target String
    The URL pattern to target with the page rule.
    zoneId String
    The DNS zone ID to which the page rule should be added.
    priority Number
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    status String
    Whether the page rule is active or disabled.

    Outputs

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

    Get an existing PageRule 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?: PageRuleState, opts?: CustomResourceOptions): PageRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[PageRuleActionsArgs] = None,
            priority: Optional[int] = None,
            status: Optional[str] = None,
            target: Optional[str] = None,
            zone_id: Optional[str] = None) -> PageRule
    func GetPageRule(ctx *Context, name string, id IDInput, state *PageRuleState, opts ...ResourceOption) (*PageRule, error)
    public static PageRule Get(string name, Input<string> id, PageRuleState? state, CustomResourceOptions? opts = null)
    public static PageRule get(String name, Output<String> id, PageRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Actions PageRuleActions
    The actions taken by the page rule, options given below.
    Priority int
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    Status string
    Whether the page rule is active or disabled.
    Target string
    The URL pattern to target with the page rule.
    ZoneId string
    The DNS zone ID to which the page rule should be added.
    Actions PageRuleActionsArgs
    The actions taken by the page rule, options given below.
    Priority int
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    Status string
    Whether the page rule is active or disabled.
    Target string
    The URL pattern to target with the page rule.
    ZoneId string
    The DNS zone ID to which the page rule should be added.
    actions PageRuleActions
    The actions taken by the page rule, options given below.
    priority Integer
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    status String
    Whether the page rule is active or disabled.
    target String
    The URL pattern to target with the page rule.
    zoneId String
    The DNS zone ID to which the page rule should be added.
    actions PageRuleActions
    The actions taken by the page rule, options given below.
    priority number
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    status string
    Whether the page rule is active or disabled.
    target string
    The URL pattern to target with the page rule.
    zoneId string
    The DNS zone ID to which the page rule should be added.
    actions PageRuleActionsArgs
    The actions taken by the page rule, options given below.
    priority int
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    status str
    Whether the page rule is active or disabled.
    target str
    The URL pattern to target with the page rule.
    zone_id str
    The DNS zone ID to which the page rule should be added.
    actions Property Map
    The actions taken by the page rule, options given below.
    priority Number
    The priority of the page rule among others for this target, the higher the number the higher the priority as per API documentation.
    status String
    Whether the page rule is active or disabled.
    target String
    The URL pattern to target with the page rule.
    zoneId String
    The DNS zone ID to which the page rule should be added.

    Supporting Types

    PageRuleActions, PageRuleActionsArgs

    AlwaysUseHttps bool
    Boolean of whether this action is enabled. Default: false.
    AutomaticHttpsRewrites string
    Whether this action is "on" or "off".
    BrowserCacheTtl string
    The Time To Live for the browser cache. 0 means 'Respect Existing Headers'
    BrowserCheck string
    Whether this action is "on" or "off".
    BypassCacheOnCookie string
    String value of cookie name to conditionally bypass cache the page.
    CacheByDeviceType string
    Whether this action is "on" or "off".
    CacheDeceptionArmor string
    Whether this action is "on" or "off".
    CacheKeyFields PageRuleActionsCacheKeyFields
    Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
    CacheLevel string
    Whether to set the cache level to "bypass", "basic", "simplified", "aggressive", or "cache_everything".
    CacheOnCookie string
    String value of cookie name to conditionally cache the page.
    CacheTtlByStatuses List<PageRuleActionsCacheTtlByStatus>
    Set cache TTL based on the response status from the origin web server. Can be specified multiple times. See below for full description.
    DisableApps bool
    Boolean of whether this action is enabled. Default: false.
    DisablePerformance bool
    Boolean of whether this action is enabled. Default: false.
    DisableRailgun bool
    Boolean of whether this action is enabled. Default: false.
    DisableSecurity bool
    Boolean of whether this action is enabled. Default: false.
    DisableZaraz bool
    Boolean of whether this action is enabled. Default: false.
    EdgeCacheTtl int
    The Time To Live for the edge cache.
    EmailObfuscation string
    Whether this action is "on" or "off".
    ExplicitCacheControl string
    Whether origin Cache-Control action is "on" or "off".
    ForwardingUrl PageRuleActionsForwardingUrl
    The URL to forward to, and with what status. See below.
    HostHeaderOverride string
    Value of the Host header to send.
    IpGeolocation string
    Whether this action is "on" or "off".
    Minifies List<PageRuleActionsMinify>
    The configuration for HTML, CSS and JS minification. See below for full list of options.
    Mirage string
    Whether this action is "on" or "off".
    OpportunisticEncryption string
    Whether this action is "on" or "off".
    OriginErrorPagePassThru string
    Whether this action is "on" or "off".
    Polish string
    Whether this action is "off", "lossless" or "lossy".
    ResolveOverride string
    Overridden origin server name.
    RespectStrongEtag string
    Whether this action is "on" or "off".
    ResponseBuffering string
    Whether this action is "on" or "off".
    RocketLoader string
    Whether to set the rocket loader to "on", "off".
    SecurityLevel string
    Whether to set the security level to "off", "essentially_off", "low", "medium", "high", or "under_attack".
    ServerSideExclude string
    Whether this action is "on" or "off".
    SortQueryStringForCache string
    Whether this action is "on" or "off".
    Ssl string
    Whether to set the SSL mode to "off", "flexible", "full", "strict", or "origin_pull".
    TrueClientIpHeader string
    Whether this action is "on" or "off".
    Waf string
    Whether this action is "on" or "off".
    AlwaysUseHttps bool
    Boolean of whether this action is enabled. Default: false.
    AutomaticHttpsRewrites string
    Whether this action is "on" or "off".
    BrowserCacheTtl string
    The Time To Live for the browser cache. 0 means 'Respect Existing Headers'
    BrowserCheck string
    Whether this action is "on" or "off".
    BypassCacheOnCookie string
    String value of cookie name to conditionally bypass cache the page.
    CacheByDeviceType string
    Whether this action is "on" or "off".
    CacheDeceptionArmor string
    Whether this action is "on" or "off".
    CacheKeyFields PageRuleActionsCacheKeyFields
    Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
    CacheLevel string
    Whether to set the cache level to "bypass", "basic", "simplified", "aggressive", or "cache_everything".
    CacheOnCookie string
    String value of cookie name to conditionally cache the page.
    CacheTtlByStatuses []PageRuleActionsCacheTtlByStatus
    Set cache TTL based on the response status from the origin web server. Can be specified multiple times. See below for full description.
    DisableApps bool
    Boolean of whether this action is enabled. Default: false.
    DisablePerformance bool
    Boolean of whether this action is enabled. Default: false.
    DisableRailgun bool
    Boolean of whether this action is enabled. Default: false.
    DisableSecurity bool
    Boolean of whether this action is enabled. Default: false.
    DisableZaraz bool
    Boolean of whether this action is enabled. Default: false.
    EdgeCacheTtl int
    The Time To Live for the edge cache.
    EmailObfuscation string
    Whether this action is "on" or "off".
    ExplicitCacheControl string
    Whether origin Cache-Control action is "on" or "off".
    ForwardingUrl PageRuleActionsForwardingUrl
    The URL to forward to, and with what status. See below.
    HostHeaderOverride string
    Value of the Host header to send.
    IpGeolocation string
    Whether this action is "on" or "off".
    Minifies []PageRuleActionsMinify
    The configuration for HTML, CSS and JS minification. See below for full list of options.
    Mirage string
    Whether this action is "on" or "off".
    OpportunisticEncryption string
    Whether this action is "on" or "off".
    OriginErrorPagePassThru string
    Whether this action is "on" or "off".
    Polish string
    Whether this action is "off", "lossless" or "lossy".
    ResolveOverride string
    Overridden origin server name.
    RespectStrongEtag string
    Whether this action is "on" or "off".
    ResponseBuffering string
    Whether this action is "on" or "off".
    RocketLoader string
    Whether to set the rocket loader to "on", "off".
    SecurityLevel string
    Whether to set the security level to "off", "essentially_off", "low", "medium", "high", or "under_attack".
    ServerSideExclude string
    Whether this action is "on" or "off".
    SortQueryStringForCache string
    Whether this action is "on" or "off".
    Ssl string
    Whether to set the SSL mode to "off", "flexible", "full", "strict", or "origin_pull".
    TrueClientIpHeader string
    Whether this action is "on" or "off".
    Waf string
    Whether this action is "on" or "off".
    alwaysUseHttps Boolean
    Boolean of whether this action is enabled. Default: false.
    automaticHttpsRewrites String
    Whether this action is "on" or "off".
    browserCacheTtl String
    The Time To Live for the browser cache. 0 means 'Respect Existing Headers'
    browserCheck String
    Whether this action is "on" or "off".
    bypassCacheOnCookie String
    String value of cookie name to conditionally bypass cache the page.
    cacheByDeviceType String
    Whether this action is "on" or "off".
    cacheDeceptionArmor String
    Whether this action is "on" or "off".
    cacheKeyFields PageRuleActionsCacheKeyFields
    Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
    cacheLevel String
    Whether to set the cache level to "bypass", "basic", "simplified", "aggressive", or "cache_everything".
    cacheOnCookie String
    String value of cookie name to conditionally cache the page.
    cacheTtlByStatuses List<PageRuleActionsCacheTtlByStatus>
    Set cache TTL based on the response status from the origin web server. Can be specified multiple times. See below for full description.
    disableApps Boolean
    Boolean of whether this action is enabled. Default: false.
    disablePerformance Boolean
    Boolean of whether this action is enabled. Default: false.
    disableRailgun Boolean
    Boolean of whether this action is enabled. Default: false.
    disableSecurity Boolean
    Boolean of whether this action is enabled. Default: false.
    disableZaraz Boolean
    Boolean of whether this action is enabled. Default: false.
    edgeCacheTtl Integer
    The Time To Live for the edge cache.
    emailObfuscation String
    Whether this action is "on" or "off".
    explicitCacheControl String
    Whether origin Cache-Control action is "on" or "off".
    forwardingUrl PageRuleActionsForwardingUrl
    The URL to forward to, and with what status. See below.
    hostHeaderOverride String
    Value of the Host header to send.
    ipGeolocation String
    Whether this action is "on" or "off".
    minifies List<PageRuleActionsMinify>
    The configuration for HTML, CSS and JS minification. See below for full list of options.
    mirage String
    Whether this action is "on" or "off".
    opportunisticEncryption String
    Whether this action is "on" or "off".
    originErrorPagePassThru String
    Whether this action is "on" or "off".
    polish String
    Whether this action is "off", "lossless" or "lossy".
    resolveOverride String
    Overridden origin server name.
    respectStrongEtag String
    Whether this action is "on" or "off".
    responseBuffering String
    Whether this action is "on" or "off".
    rocketLoader String
    Whether to set the rocket loader to "on", "off".
    securityLevel String
    Whether to set the security level to "off", "essentially_off", "low", "medium", "high", or "under_attack".
    serverSideExclude String
    Whether this action is "on" or "off".
    sortQueryStringForCache String
    Whether this action is "on" or "off".
    ssl String
    Whether to set the SSL mode to "off", "flexible", "full", "strict", or "origin_pull".
    trueClientIpHeader String
    Whether this action is "on" or "off".
    waf String
    Whether this action is "on" or "off".
    alwaysUseHttps boolean
    Boolean of whether this action is enabled. Default: false.
    automaticHttpsRewrites string
    Whether this action is "on" or "off".
    browserCacheTtl string
    The Time To Live for the browser cache. 0 means 'Respect Existing Headers'
    browserCheck string
    Whether this action is "on" or "off".
    bypassCacheOnCookie string
    String value of cookie name to conditionally bypass cache the page.
    cacheByDeviceType string
    Whether this action is "on" or "off".
    cacheDeceptionArmor string
    Whether this action is "on" or "off".
    cacheKeyFields PageRuleActionsCacheKeyFields
    Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
    cacheLevel string
    Whether to set the cache level to "bypass", "basic", "simplified", "aggressive", or "cache_everything".
    cacheOnCookie string
    String value of cookie name to conditionally cache the page.
    cacheTtlByStatuses PageRuleActionsCacheTtlByStatus[]
    Set cache TTL based on the response status from the origin web server. Can be specified multiple times. See below for full description.
    disableApps boolean
    Boolean of whether this action is enabled. Default: false.
    disablePerformance boolean
    Boolean of whether this action is enabled. Default: false.
    disableRailgun boolean
    Boolean of whether this action is enabled. Default: false.
    disableSecurity boolean
    Boolean of whether this action is enabled. Default: false.
    disableZaraz boolean
    Boolean of whether this action is enabled. Default: false.
    edgeCacheTtl number
    The Time To Live for the edge cache.
    emailObfuscation string
    Whether this action is "on" or "off".
    explicitCacheControl string
    Whether origin Cache-Control action is "on" or "off".
    forwardingUrl PageRuleActionsForwardingUrl
    The URL to forward to, and with what status. See below.
    hostHeaderOverride string
    Value of the Host header to send.
    ipGeolocation string
    Whether this action is "on" or "off".
    minifies PageRuleActionsMinify[]
    The configuration for HTML, CSS and JS minification. See below for full list of options.
    mirage string
    Whether this action is "on" or "off".
    opportunisticEncryption string
    Whether this action is "on" or "off".
    originErrorPagePassThru string
    Whether this action is "on" or "off".
    polish string
    Whether this action is "off", "lossless" or "lossy".
    resolveOverride string
    Overridden origin server name.
    respectStrongEtag string
    Whether this action is "on" or "off".
    responseBuffering string
    Whether this action is "on" or "off".
    rocketLoader string
    Whether to set the rocket loader to "on", "off".
    securityLevel string
    Whether to set the security level to "off", "essentially_off", "low", "medium", "high", or "under_attack".
    serverSideExclude string
    Whether this action is "on" or "off".
    sortQueryStringForCache string
    Whether this action is "on" or "off".
    ssl string
    Whether to set the SSL mode to "off", "flexible", "full", "strict", or "origin_pull".
    trueClientIpHeader string
    Whether this action is "on" or "off".
    waf string
    Whether this action is "on" or "off".
    always_use_https bool
    Boolean of whether this action is enabled. Default: false.
    automatic_https_rewrites str
    Whether this action is "on" or "off".
    browser_cache_ttl str
    The Time To Live for the browser cache. 0 means 'Respect Existing Headers'
    browser_check str
    Whether this action is "on" or "off".
    bypass_cache_on_cookie str
    String value of cookie name to conditionally bypass cache the page.
    cache_by_device_type str
    Whether this action is "on" or "off".
    cache_deception_armor str
    Whether this action is "on" or "off".
    cache_key_fields PageRuleActionsCacheKeyFields
    Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
    cache_level str
    Whether to set the cache level to "bypass", "basic", "simplified", "aggressive", or "cache_everything".
    cache_on_cookie str
    String value of cookie name to conditionally cache the page.
    cache_ttl_by_statuses Sequence[PageRuleActionsCacheTtlByStatus]
    Set cache TTL based on the response status from the origin web server. Can be specified multiple times. See below for full description.
    disable_apps bool
    Boolean of whether this action is enabled. Default: false.
    disable_performance bool
    Boolean of whether this action is enabled. Default: false.
    disable_railgun bool
    Boolean of whether this action is enabled. Default: false.
    disable_security bool
    Boolean of whether this action is enabled. Default: false.
    disable_zaraz bool
    Boolean of whether this action is enabled. Default: false.
    edge_cache_ttl int
    The Time To Live for the edge cache.
    email_obfuscation str
    Whether this action is "on" or "off".
    explicit_cache_control str
    Whether origin Cache-Control action is "on" or "off".
    forwarding_url PageRuleActionsForwardingUrl
    The URL to forward to, and with what status. See below.
    host_header_override str
    Value of the Host header to send.
    ip_geolocation str
    Whether this action is "on" or "off".
    minifies Sequence[PageRuleActionsMinify]
    The configuration for HTML, CSS and JS minification. See below for full list of options.
    mirage str
    Whether this action is "on" or "off".
    opportunistic_encryption str
    Whether this action is "on" or "off".
    origin_error_page_pass_thru str
    Whether this action is "on" or "off".
    polish str
    Whether this action is "off", "lossless" or "lossy".
    resolve_override str
    Overridden origin server name.
    respect_strong_etag str
    Whether this action is "on" or "off".
    response_buffering str
    Whether this action is "on" or "off".
    rocket_loader str
    Whether to set the rocket loader to "on", "off".
    security_level str
    Whether to set the security level to "off", "essentially_off", "low", "medium", "high", or "under_attack".
    server_side_exclude str
    Whether this action is "on" or "off".
    sort_query_string_for_cache str
    Whether this action is "on" or "off".
    ssl str
    Whether to set the SSL mode to "off", "flexible", "full", "strict", or "origin_pull".
    true_client_ip_header str
    Whether this action is "on" or "off".
    waf str
    Whether this action is "on" or "off".
    alwaysUseHttps Boolean
    Boolean of whether this action is enabled. Default: false.
    automaticHttpsRewrites String
    Whether this action is "on" or "off".
    browserCacheTtl String
    The Time To Live for the browser cache. 0 means 'Respect Existing Headers'
    browserCheck String
    Whether this action is "on" or "off".
    bypassCacheOnCookie String
    String value of cookie name to conditionally bypass cache the page.
    cacheByDeviceType String
    Whether this action is "on" or "off".
    cacheDeceptionArmor String
    Whether this action is "on" or "off".
    cacheKeyFields Property Map
    Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
    cacheLevel String
    Whether to set the cache level to "bypass", "basic", "simplified", "aggressive", or "cache_everything".
    cacheOnCookie String
    String value of cookie name to conditionally cache the page.
    cacheTtlByStatuses List<Property Map>
    Set cache TTL based on the response status from the origin web server. Can be specified multiple times. See below for full description.
    disableApps Boolean
    Boolean of whether this action is enabled. Default: false.
    disablePerformance Boolean
    Boolean of whether this action is enabled. Default: false.
    disableRailgun Boolean
    Boolean of whether this action is enabled. Default: false.
    disableSecurity Boolean
    Boolean of whether this action is enabled. Default: false.
    disableZaraz Boolean
    Boolean of whether this action is enabled. Default: false.
    edgeCacheTtl Number
    The Time To Live for the edge cache.
    emailObfuscation String
    Whether this action is "on" or "off".
    explicitCacheControl String
    Whether origin Cache-Control action is "on" or "off".
    forwardingUrl Property Map
    The URL to forward to, and with what status. See below.
    hostHeaderOverride String
    Value of the Host header to send.
    ipGeolocation String
    Whether this action is "on" or "off".
    minifies List<Property Map>
    The configuration for HTML, CSS and JS minification. See below for full list of options.
    mirage String
    Whether this action is "on" or "off".
    opportunisticEncryption String
    Whether this action is "on" or "off".
    originErrorPagePassThru String
    Whether this action is "on" or "off".
    polish String
    Whether this action is "off", "lossless" or "lossy".
    resolveOverride String
    Overridden origin server name.
    respectStrongEtag String
    Whether this action is "on" or "off".
    responseBuffering String
    Whether this action is "on" or "off".
    rocketLoader String
    Whether to set the rocket loader to "on", "off".
    securityLevel String
    Whether to set the security level to "off", "essentially_off", "low", "medium", "high", or "under_attack".
    serverSideExclude String
    Whether this action is "on" or "off".
    sortQueryStringForCache String
    Whether this action is "on" or "off".
    ssl String
    Whether to set the SSL mode to "off", "flexible", "full", "strict", or "origin_pull".
    trueClientIpHeader String
    Whether this action is "on" or "off".
    waf String
    Whether this action is "on" or "off".

    PageRuleActionsCacheKeyFields, PageRuleActionsCacheKeyFieldsArgs

    Host PageRuleActionsCacheKeyFieldsHost
    Controls which Host header goes into Cache Key:
    QueryString PageRuleActionsCacheKeyFieldsQueryString
    Controls which URL query string parameters go into the Cache Key.
    User PageRuleActionsCacheKeyFieldsUser
    Controls which end user-related features go into the Cache Key.
    Cookie PageRuleActionsCacheKeyFieldsCookie
    Controls what cookies go into Cache Key:
    Header PageRuleActionsCacheKeyFieldsHeader
    Controls what HTTP headers go into Cache Key:
    Host PageRuleActionsCacheKeyFieldsHost
    Controls which Host header goes into Cache Key:
    QueryString PageRuleActionsCacheKeyFieldsQueryString
    Controls which URL query string parameters go into the Cache Key.
    User PageRuleActionsCacheKeyFieldsUser
    Controls which end user-related features go into the Cache Key.
    Cookie PageRuleActionsCacheKeyFieldsCookie
    Controls what cookies go into Cache Key:
    Header PageRuleActionsCacheKeyFieldsHeader
    Controls what HTTP headers go into Cache Key:
    host PageRuleActionsCacheKeyFieldsHost
    Controls which Host header goes into Cache Key:
    queryString PageRuleActionsCacheKeyFieldsQueryString
    Controls which URL query string parameters go into the Cache Key.
    user PageRuleActionsCacheKeyFieldsUser
    Controls which end user-related features go into the Cache Key.
    cookie PageRuleActionsCacheKeyFieldsCookie
    Controls what cookies go into Cache Key:
    header PageRuleActionsCacheKeyFieldsHeader
    Controls what HTTP headers go into Cache Key:
    host PageRuleActionsCacheKeyFieldsHost
    Controls which Host header goes into Cache Key:
    queryString PageRuleActionsCacheKeyFieldsQueryString
    Controls which URL query string parameters go into the Cache Key.
    user PageRuleActionsCacheKeyFieldsUser
    Controls which end user-related features go into the Cache Key.
    cookie PageRuleActionsCacheKeyFieldsCookie
    Controls what cookies go into Cache Key:
    header PageRuleActionsCacheKeyFieldsHeader
    Controls what HTTP headers go into Cache Key:
    host PageRuleActionsCacheKeyFieldsHost
    Controls which Host header goes into Cache Key:
    query_string PageRuleActionsCacheKeyFieldsQueryString
    Controls which URL query string parameters go into the Cache Key.
    user PageRuleActionsCacheKeyFieldsUser
    Controls which end user-related features go into the Cache Key.
    cookie PageRuleActionsCacheKeyFieldsCookie
    Controls what cookies go into Cache Key:
    header PageRuleActionsCacheKeyFieldsHeader
    Controls what HTTP headers go into Cache Key:
    host Property Map
    Controls which Host header goes into Cache Key:
    queryString Property Map
    Controls which URL query string parameters go into the Cache Key.
    user Property Map
    Controls which end user-related features go into the Cache Key.
    cookie Property Map
    Controls what cookies go into Cache Key:
    header Property Map
    Controls what HTTP headers go into Cache Key:

    PageRuleActionsCacheKeyFieldsCookie, PageRuleActionsCacheKeyFieldsCookieArgs

    CheckPresences List<string>
    Check for presence of specified cookies, without including their actual values.
    Includes List<string>
    Use values of specified cookies in Cache Key.
    CheckPresences []string
    Check for presence of specified cookies, without including their actual values.
    Includes []string
    Use values of specified cookies in Cache Key.
    checkPresences List<String>
    Check for presence of specified cookies, without including their actual values.
    includes List<String>
    Use values of specified cookies in Cache Key.
    checkPresences string[]
    Check for presence of specified cookies, without including their actual values.
    includes string[]
    Use values of specified cookies in Cache Key.
    check_presences Sequence[str]
    Check for presence of specified cookies, without including their actual values.
    includes Sequence[str]
    Use values of specified cookies in Cache Key.
    checkPresences List<String>
    Check for presence of specified cookies, without including their actual values.
    includes List<String>
    Use values of specified cookies in Cache Key.

    PageRuleActionsCacheKeyFieldsHeader, PageRuleActionsCacheKeyFieldsHeaderArgs

    CheckPresences List<string>
    Check for presence of specified HTTP headers, without including their actual values.
    Excludes List<string>
    Exclude these HTTP headers from Cache Key. Currently, only the Origin header can be excluded.
    Includes List<string>
    Use values of specified HTTP headers in Cache Key. Please refer to Support article for the list of HTTP headers that cannot be included. The Origin header is always included unless explicitly excluded.
    CheckPresences []string
    Check for presence of specified HTTP headers, without including their actual values.
    Excludes []string
    Exclude these HTTP headers from Cache Key. Currently, only the Origin header can be excluded.
    Includes []string
    Use values of specified HTTP headers in Cache Key. Please refer to Support article for the list of HTTP headers that cannot be included. The Origin header is always included unless explicitly excluded.
    checkPresences List<String>
    Check for presence of specified HTTP headers, without including their actual values.
    excludes List<String>
    Exclude these HTTP headers from Cache Key. Currently, only the Origin header can be excluded.
    includes List<String>
    Use values of specified HTTP headers in Cache Key. Please refer to Support article for the list of HTTP headers that cannot be included. The Origin header is always included unless explicitly excluded.
    checkPresences string[]
    Check for presence of specified HTTP headers, without including their actual values.
    excludes string[]
    Exclude these HTTP headers from Cache Key. Currently, only the Origin header can be excluded.
    includes string[]
    Use values of specified HTTP headers in Cache Key. Please refer to Support article for the list of HTTP headers that cannot be included. The Origin header is always included unless explicitly excluded.
    check_presences Sequence[str]
    Check for presence of specified HTTP headers, without including their actual values.
    excludes Sequence[str]
    Exclude these HTTP headers from Cache Key. Currently, only the Origin header can be excluded.
    includes Sequence[str]
    Use values of specified HTTP headers in Cache Key. Please refer to Support article for the list of HTTP headers that cannot be included. The Origin header is always included unless explicitly excluded.
    checkPresences List<String>
    Check for presence of specified HTTP headers, without including their actual values.
    excludes List<String>
    Exclude these HTTP headers from Cache Key. Currently, only the Origin header can be excluded.
    includes List<String>
    Use values of specified HTTP headers in Cache Key. Please refer to Support article for the list of HTTP headers that cannot be included. The Origin header is always included unless explicitly excluded.

    PageRuleActionsCacheKeyFieldsHost, PageRuleActionsCacheKeyFieldsHostArgs

    Resolved bool
    false (default) - includes the Host header in the HTTP request sent to the origin; true - includes the Host header that was resolved to get the origin IP for the request (e.g. changed with Resolve Override Page Rule).
    Resolved bool
    false (default) - includes the Host header in the HTTP request sent to the origin; true - includes the Host header that was resolved to get the origin IP for the request (e.g. changed with Resolve Override Page Rule).
    resolved Boolean
    false (default) - includes the Host header in the HTTP request sent to the origin; true - includes the Host header that was resolved to get the origin IP for the request (e.g. changed with Resolve Override Page Rule).
    resolved boolean
    false (default) - includes the Host header in the HTTP request sent to the origin; true - includes the Host header that was resolved to get the origin IP for the request (e.g. changed with Resolve Override Page Rule).
    resolved bool
    false (default) - includes the Host header in the HTTP request sent to the origin; true - includes the Host header that was resolved to get the origin IP for the request (e.g. changed with Resolve Override Page Rule).
    resolved Boolean
    false (default) - includes the Host header in the HTTP request sent to the origin; true - includes the Host header that was resolved to get the origin IP for the request (e.g. changed with Resolve Override Page Rule).

    PageRuleActionsCacheKeyFieldsQueryString, PageRuleActionsCacheKeyFieldsQueryStringArgs

    Excludes List<string>
    Exclude these query string parameters from Cache Key.
    Ignore bool
    false (default) - all query string parameters are used for Cache Key, unless explicitly excluded; true - all query string parameters are ignored; value should be false if any of exclude or include is non-empty.
    Includes List<string>
    Only use values of specified query string parameters in Cache Key.
    Excludes []string
    Exclude these query string parameters from Cache Key.
    Ignore bool
    false (default) - all query string parameters are used for Cache Key, unless explicitly excluded; true - all query string parameters are ignored; value should be false if any of exclude or include is non-empty.
    Includes []string
    Only use values of specified query string parameters in Cache Key.
    excludes List<String>
    Exclude these query string parameters from Cache Key.
    ignore Boolean
    false (default) - all query string parameters are used for Cache Key, unless explicitly excluded; true - all query string parameters are ignored; value should be false if any of exclude or include is non-empty.
    includes List<String>
    Only use values of specified query string parameters in Cache Key.
    excludes string[]
    Exclude these query string parameters from Cache Key.
    ignore boolean
    false (default) - all query string parameters are used for Cache Key, unless explicitly excluded; true - all query string parameters are ignored; value should be false if any of exclude or include is non-empty.
    includes string[]
    Only use values of specified query string parameters in Cache Key.
    excludes Sequence[str]
    Exclude these query string parameters from Cache Key.
    ignore bool
    false (default) - all query string parameters are used for Cache Key, unless explicitly excluded; true - all query string parameters are ignored; value should be false if any of exclude or include is non-empty.
    includes Sequence[str]
    Only use values of specified query string parameters in Cache Key.
    excludes List<String>
    Exclude these query string parameters from Cache Key.
    ignore Boolean
    false (default) - all query string parameters are used for Cache Key, unless explicitly excluded; true - all query string parameters are ignored; value should be false if any of exclude or include is non-empty.
    includes List<String>
    Only use values of specified query string parameters in Cache Key.

    PageRuleActionsCacheKeyFieldsUser, PageRuleActionsCacheKeyFieldsUserArgs

    DeviceType bool
    true - classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults to false.
    Geo bool
    true - includes the client’s country, derived from the IP address; defaults to false.
    Lang bool

    true - includes the first language code contained in the Accept-Language header sent by the client; defaults to false.

    Example:

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

    // Unrealistic example with all features used const foobar = new cloudflare.PageRule("foobar", { zoneId: cloudflareZoneId, target: ${cloudflareZone}/app/*, priority: 1, actions: { cacheKeyFields: { cookie: { checkPresences: ["wordpress_test_cookie"], }, header: { checkPresences: ["header_present"], excludes: ["origin"], includes: [ "api-key", "dnt", ], }, host: { resolved: true, }, queryString: { ignore: true, }, user: { deviceType: false, geo: true, lang: true, }, }, }, });

    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Unrealistic example with all features used
    foobar = cloudflare.PageRule("foobar",
        zone_id=cloudflare_zone_id,
        target=f"{cloudflare_zone}/app/*",
        priority=1,
        actions={
            "cache_key_fields": {
                "cookie": {
                    "check_presences": ["wordpress_test_cookie"],
                },
                "header": {
                    "check_presences": ["header_present"],
                    "excludes": ["origin"],
                    "includes": [
                        "api-key",
                        "dnt",
                    ],
                },
                "host": {
                    "resolved": True,
                },
                "query_string": {
                    "ignore": True,
                },
                "user": {
                    "device_type": False,
                    "geo": True,
                    "lang": True,
                },
            },
        })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Unrealistic example with all features used
        var foobar = new Cloudflare.PageRule("foobar", new()
        {
            ZoneId = cloudflareZoneId,
            Target = $"{cloudflareZone}/app/*",
            Priority = 1,
            Actions = new Cloudflare.Inputs.PageRuleActionsArgs
            {
                CacheKeyFields = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsArgs
                {
                    Cookie = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsCookieArgs
                    {
                        CheckPresences = new[]
                        {
                            "wordpress_test_cookie",
                        },
                    },
                    Header = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHeaderArgs
                    {
                        CheckPresences = new[]
                        {
                            "header_present",
                        },
                        Excludes = new[]
                        {
                            "origin",
                        },
                        Includes = new[]
                        {
                            "api-key",
                            "dnt",
                        },
                    },
                    Host = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHostArgs
                    {
                        Resolved = true,
                    },
                    QueryString = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs
                    {
                        Ignore = true,
                    },
                    User = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsUserArgs
                    {
                        DeviceType = false,
                        Geo = true,
                        Lang = true,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Unrealistic example with all features used
    		_, err := cloudflare.NewPageRule(ctx, "foobar", &cloudflare.PageRuleArgs{
    			ZoneId:   pulumi.Any(cloudflareZoneId),
    			Target:   pulumi.Sprintf("%v/app/*", cloudflareZone),
    			Priority: pulumi.Int(1),
    			Actions: &cloudflare.PageRuleActionsArgs{
    				CacheKeyFields: &cloudflare.PageRuleActionsCacheKeyFieldsArgs{
    					Cookie: &cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("wordpress_test_cookie"),
    						},
    					},
    					Header: &cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("header_present"),
    						},
    						Excludes: pulumi.StringArray{
    							pulumi.String("origin"),
    						},
    						Includes: pulumi.StringArray{
    							pulumi.String("api-key"),
    							pulumi.String("dnt"),
    						},
    					},
    					Host: &cloudflare.PageRuleActionsCacheKeyFieldsHostArgs{
    						Resolved: pulumi.Bool(true),
    					},
    					QueryString: &cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs{
    						Ignore: pulumi.Bool(true),
    					},
    					User: &cloudflare.PageRuleActionsCacheKeyFieldsUserArgs{
    						DeviceType: pulumi.Bool(false),
    						Geo:        pulumi.Bool(true),
    						Lang:       pulumi.Bool(true),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.PageRule;
    import com.pulumi.cloudflare.PageRuleArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsCookieArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHeaderArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHostArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsUserArgs;
    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) {
            // Unrealistic example with all features used
            var foobar = new PageRule("foobar", PageRuleArgs.builder()
                .zoneId(cloudflareZoneId)
                .target(String.format("%s/app/*", cloudflareZone))
                .priority(1)
                .actions(PageRuleActionsArgs.builder()
                    .cacheKeyFields(PageRuleActionsCacheKeyFieldsArgs.builder()
                        .cookie(PageRuleActionsCacheKeyFieldsCookieArgs.builder()
                            .checkPresences("wordpress_test_cookie")
                            .build())
                        .header(PageRuleActionsCacheKeyFieldsHeaderArgs.builder()
                            .checkPresences("header_present")
                            .excludes("origin")
                            .includes(                        
                                "api-key",
                                "dnt")
                            .build())
                        .host(PageRuleActionsCacheKeyFieldsHostArgs.builder()
                            .resolved(true)
                            .build())
                        .queryString(PageRuleActionsCacheKeyFieldsQueryStringArgs.builder()
                            .ignore(true)
                            .build())
                        .user(PageRuleActionsCacheKeyFieldsUserArgs.builder()
                            .deviceType(false)
                            .geo(true)
                            .lang(true)
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Unrealistic example with all features used
      foobar:
        type: cloudflare:PageRule
        properties:
          zoneId: ${cloudflareZoneId}
          target: ${cloudflareZone}/app/*
          priority: 1
          actions:
            cacheKeyFields:
              cookie:
                checkPresences:
                  - wordpress_test_cookie
              header:
                checkPresences:
                  - header_present
                excludes:
                  - origin
                includes:
                  - api-key
                  - dnt
              host:
                resolved: true
              queryString:
                ignore: true
              user:
                deviceType: false
                geo: true
                lang: true
    
    DeviceType bool
    true - classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults to false.
    Geo bool
    true - includes the client’s country, derived from the IP address; defaults to false.
    Lang bool

    true - includes the first language code contained in the Accept-Language header sent by the client; defaults to false.

    Example:

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

    // Unrealistic example with all features used const foobar = new cloudflare.PageRule("foobar", { zoneId: cloudflareZoneId, target: ${cloudflareZone}/app/*, priority: 1, actions: { cacheKeyFields: { cookie: { checkPresences: ["wordpress_test_cookie"], }, header: { checkPresences: ["header_present"], excludes: ["origin"], includes: [ "api-key", "dnt", ], }, host: { resolved: true, }, queryString: { ignore: true, }, user: { deviceType: false, geo: true, lang: true, }, }, }, });

    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Unrealistic example with all features used
    foobar = cloudflare.PageRule("foobar",
        zone_id=cloudflare_zone_id,
        target=f"{cloudflare_zone}/app/*",
        priority=1,
        actions={
            "cache_key_fields": {
                "cookie": {
                    "check_presences": ["wordpress_test_cookie"],
                },
                "header": {
                    "check_presences": ["header_present"],
                    "excludes": ["origin"],
                    "includes": [
                        "api-key",
                        "dnt",
                    ],
                },
                "host": {
                    "resolved": True,
                },
                "query_string": {
                    "ignore": True,
                },
                "user": {
                    "device_type": False,
                    "geo": True,
                    "lang": True,
                },
            },
        })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Unrealistic example with all features used
        var foobar = new Cloudflare.PageRule("foobar", new()
        {
            ZoneId = cloudflareZoneId,
            Target = $"{cloudflareZone}/app/*",
            Priority = 1,
            Actions = new Cloudflare.Inputs.PageRuleActionsArgs
            {
                CacheKeyFields = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsArgs
                {
                    Cookie = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsCookieArgs
                    {
                        CheckPresences = new[]
                        {
                            "wordpress_test_cookie",
                        },
                    },
                    Header = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHeaderArgs
                    {
                        CheckPresences = new[]
                        {
                            "header_present",
                        },
                        Excludes = new[]
                        {
                            "origin",
                        },
                        Includes = new[]
                        {
                            "api-key",
                            "dnt",
                        },
                    },
                    Host = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHostArgs
                    {
                        Resolved = true,
                    },
                    QueryString = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs
                    {
                        Ignore = true,
                    },
                    User = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsUserArgs
                    {
                        DeviceType = false,
                        Geo = true,
                        Lang = true,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Unrealistic example with all features used
    		_, err := cloudflare.NewPageRule(ctx, "foobar", &cloudflare.PageRuleArgs{
    			ZoneId:   pulumi.Any(cloudflareZoneId),
    			Target:   pulumi.Sprintf("%v/app/*", cloudflareZone),
    			Priority: pulumi.Int(1),
    			Actions: &cloudflare.PageRuleActionsArgs{
    				CacheKeyFields: &cloudflare.PageRuleActionsCacheKeyFieldsArgs{
    					Cookie: &cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("wordpress_test_cookie"),
    						},
    					},
    					Header: &cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("header_present"),
    						},
    						Excludes: pulumi.StringArray{
    							pulumi.String("origin"),
    						},
    						Includes: pulumi.StringArray{
    							pulumi.String("api-key"),
    							pulumi.String("dnt"),
    						},
    					},
    					Host: &cloudflare.PageRuleActionsCacheKeyFieldsHostArgs{
    						Resolved: pulumi.Bool(true),
    					},
    					QueryString: &cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs{
    						Ignore: pulumi.Bool(true),
    					},
    					User: &cloudflare.PageRuleActionsCacheKeyFieldsUserArgs{
    						DeviceType: pulumi.Bool(false),
    						Geo:        pulumi.Bool(true),
    						Lang:       pulumi.Bool(true),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.PageRule;
    import com.pulumi.cloudflare.PageRuleArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsCookieArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHeaderArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHostArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsUserArgs;
    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) {
            // Unrealistic example with all features used
            var foobar = new PageRule("foobar", PageRuleArgs.builder()
                .zoneId(cloudflareZoneId)
                .target(String.format("%s/app/*", cloudflareZone))
                .priority(1)
                .actions(PageRuleActionsArgs.builder()
                    .cacheKeyFields(PageRuleActionsCacheKeyFieldsArgs.builder()
                        .cookie(PageRuleActionsCacheKeyFieldsCookieArgs.builder()
                            .checkPresences("wordpress_test_cookie")
                            .build())
                        .header(PageRuleActionsCacheKeyFieldsHeaderArgs.builder()
                            .checkPresences("header_present")
                            .excludes("origin")
                            .includes(                        
                                "api-key",
                                "dnt")
                            .build())
                        .host(PageRuleActionsCacheKeyFieldsHostArgs.builder()
                            .resolved(true)
                            .build())
                        .queryString(PageRuleActionsCacheKeyFieldsQueryStringArgs.builder()
                            .ignore(true)
                            .build())
                        .user(PageRuleActionsCacheKeyFieldsUserArgs.builder()
                            .deviceType(false)
                            .geo(true)
                            .lang(true)
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Unrealistic example with all features used
      foobar:
        type: cloudflare:PageRule
        properties:
          zoneId: ${cloudflareZoneId}
          target: ${cloudflareZone}/app/*
          priority: 1
          actions:
            cacheKeyFields:
              cookie:
                checkPresences:
                  - wordpress_test_cookie
              header:
                checkPresences:
                  - header_present
                excludes:
                  - origin
                includes:
                  - api-key
                  - dnt
              host:
                resolved: true
              queryString:
                ignore: true
              user:
                deviceType: false
                geo: true
                lang: true
    
    deviceType Boolean
    true - classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults to false.
    geo Boolean
    true - includes the client’s country, derived from the IP address; defaults to false.
    lang Boolean

    true - includes the first language code contained in the Accept-Language header sent by the client; defaults to false.

    Example:

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

    // Unrealistic example with all features used const foobar = new cloudflare.PageRule("foobar", { zoneId: cloudflareZoneId, target: ${cloudflareZone}/app/*, priority: 1, actions: { cacheKeyFields: { cookie: { checkPresences: ["wordpress_test_cookie"], }, header: { checkPresences: ["header_present"], excludes: ["origin"], includes: [ "api-key", "dnt", ], }, host: { resolved: true, }, queryString: { ignore: true, }, user: { deviceType: false, geo: true, lang: true, }, }, }, });

    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Unrealistic example with all features used
    foobar = cloudflare.PageRule("foobar",
        zone_id=cloudflare_zone_id,
        target=f"{cloudflare_zone}/app/*",
        priority=1,
        actions={
            "cache_key_fields": {
                "cookie": {
                    "check_presences": ["wordpress_test_cookie"],
                },
                "header": {
                    "check_presences": ["header_present"],
                    "excludes": ["origin"],
                    "includes": [
                        "api-key",
                        "dnt",
                    ],
                },
                "host": {
                    "resolved": True,
                },
                "query_string": {
                    "ignore": True,
                },
                "user": {
                    "device_type": False,
                    "geo": True,
                    "lang": True,
                },
            },
        })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Unrealistic example with all features used
        var foobar = new Cloudflare.PageRule("foobar", new()
        {
            ZoneId = cloudflareZoneId,
            Target = $"{cloudflareZone}/app/*",
            Priority = 1,
            Actions = new Cloudflare.Inputs.PageRuleActionsArgs
            {
                CacheKeyFields = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsArgs
                {
                    Cookie = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsCookieArgs
                    {
                        CheckPresences = new[]
                        {
                            "wordpress_test_cookie",
                        },
                    },
                    Header = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHeaderArgs
                    {
                        CheckPresences = new[]
                        {
                            "header_present",
                        },
                        Excludes = new[]
                        {
                            "origin",
                        },
                        Includes = new[]
                        {
                            "api-key",
                            "dnt",
                        },
                    },
                    Host = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHostArgs
                    {
                        Resolved = true,
                    },
                    QueryString = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs
                    {
                        Ignore = true,
                    },
                    User = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsUserArgs
                    {
                        DeviceType = false,
                        Geo = true,
                        Lang = true,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Unrealistic example with all features used
    		_, err := cloudflare.NewPageRule(ctx, "foobar", &cloudflare.PageRuleArgs{
    			ZoneId:   pulumi.Any(cloudflareZoneId),
    			Target:   pulumi.Sprintf("%v/app/*", cloudflareZone),
    			Priority: pulumi.Int(1),
    			Actions: &cloudflare.PageRuleActionsArgs{
    				CacheKeyFields: &cloudflare.PageRuleActionsCacheKeyFieldsArgs{
    					Cookie: &cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("wordpress_test_cookie"),
    						},
    					},
    					Header: &cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("header_present"),
    						},
    						Excludes: pulumi.StringArray{
    							pulumi.String("origin"),
    						},
    						Includes: pulumi.StringArray{
    							pulumi.String("api-key"),
    							pulumi.String("dnt"),
    						},
    					},
    					Host: &cloudflare.PageRuleActionsCacheKeyFieldsHostArgs{
    						Resolved: pulumi.Bool(true),
    					},
    					QueryString: &cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs{
    						Ignore: pulumi.Bool(true),
    					},
    					User: &cloudflare.PageRuleActionsCacheKeyFieldsUserArgs{
    						DeviceType: pulumi.Bool(false),
    						Geo:        pulumi.Bool(true),
    						Lang:       pulumi.Bool(true),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.PageRule;
    import com.pulumi.cloudflare.PageRuleArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsCookieArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHeaderArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHostArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsUserArgs;
    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) {
            // Unrealistic example with all features used
            var foobar = new PageRule("foobar", PageRuleArgs.builder()
                .zoneId(cloudflareZoneId)
                .target(String.format("%s/app/*", cloudflareZone))
                .priority(1)
                .actions(PageRuleActionsArgs.builder()
                    .cacheKeyFields(PageRuleActionsCacheKeyFieldsArgs.builder()
                        .cookie(PageRuleActionsCacheKeyFieldsCookieArgs.builder()
                            .checkPresences("wordpress_test_cookie")
                            .build())
                        .header(PageRuleActionsCacheKeyFieldsHeaderArgs.builder()
                            .checkPresences("header_present")
                            .excludes("origin")
                            .includes(                        
                                "api-key",
                                "dnt")
                            .build())
                        .host(PageRuleActionsCacheKeyFieldsHostArgs.builder()
                            .resolved(true)
                            .build())
                        .queryString(PageRuleActionsCacheKeyFieldsQueryStringArgs.builder()
                            .ignore(true)
                            .build())
                        .user(PageRuleActionsCacheKeyFieldsUserArgs.builder()
                            .deviceType(false)
                            .geo(true)
                            .lang(true)
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Unrealistic example with all features used
      foobar:
        type: cloudflare:PageRule
        properties:
          zoneId: ${cloudflareZoneId}
          target: ${cloudflareZone}/app/*
          priority: 1
          actions:
            cacheKeyFields:
              cookie:
                checkPresences:
                  - wordpress_test_cookie
              header:
                checkPresences:
                  - header_present
                excludes:
                  - origin
                includes:
                  - api-key
                  - dnt
              host:
                resolved: true
              queryString:
                ignore: true
              user:
                deviceType: false
                geo: true
                lang: true
    
    deviceType boolean
    true - classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults to false.
    geo boolean
    true - includes the client’s country, derived from the IP address; defaults to false.
    lang boolean

    true - includes the first language code contained in the Accept-Language header sent by the client; defaults to false.

    Example:

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

    // Unrealistic example with all features used const foobar = new cloudflare.PageRule("foobar", { zoneId: cloudflareZoneId, target: ${cloudflareZone}/app/*, priority: 1, actions: { cacheKeyFields: { cookie: { checkPresences: ["wordpress_test_cookie"], }, header: { checkPresences: ["header_present"], excludes: ["origin"], includes: [ "api-key", "dnt", ], }, host: { resolved: true, }, queryString: { ignore: true, }, user: { deviceType: false, geo: true, lang: true, }, }, }, });

    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Unrealistic example with all features used
    foobar = cloudflare.PageRule("foobar",
        zone_id=cloudflare_zone_id,
        target=f"{cloudflare_zone}/app/*",
        priority=1,
        actions={
            "cache_key_fields": {
                "cookie": {
                    "check_presences": ["wordpress_test_cookie"],
                },
                "header": {
                    "check_presences": ["header_present"],
                    "excludes": ["origin"],
                    "includes": [
                        "api-key",
                        "dnt",
                    ],
                },
                "host": {
                    "resolved": True,
                },
                "query_string": {
                    "ignore": True,
                },
                "user": {
                    "device_type": False,
                    "geo": True,
                    "lang": True,
                },
            },
        })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Unrealistic example with all features used
        var foobar = new Cloudflare.PageRule("foobar", new()
        {
            ZoneId = cloudflareZoneId,
            Target = $"{cloudflareZone}/app/*",
            Priority = 1,
            Actions = new Cloudflare.Inputs.PageRuleActionsArgs
            {
                CacheKeyFields = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsArgs
                {
                    Cookie = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsCookieArgs
                    {
                        CheckPresences = new[]
                        {
                            "wordpress_test_cookie",
                        },
                    },
                    Header = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHeaderArgs
                    {
                        CheckPresences = new[]
                        {
                            "header_present",
                        },
                        Excludes = new[]
                        {
                            "origin",
                        },
                        Includes = new[]
                        {
                            "api-key",
                            "dnt",
                        },
                    },
                    Host = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHostArgs
                    {
                        Resolved = true,
                    },
                    QueryString = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs
                    {
                        Ignore = true,
                    },
                    User = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsUserArgs
                    {
                        DeviceType = false,
                        Geo = true,
                        Lang = true,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Unrealistic example with all features used
    		_, err := cloudflare.NewPageRule(ctx, "foobar", &cloudflare.PageRuleArgs{
    			ZoneId:   pulumi.Any(cloudflareZoneId),
    			Target:   pulumi.Sprintf("%v/app/*", cloudflareZone),
    			Priority: pulumi.Int(1),
    			Actions: &cloudflare.PageRuleActionsArgs{
    				CacheKeyFields: &cloudflare.PageRuleActionsCacheKeyFieldsArgs{
    					Cookie: &cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("wordpress_test_cookie"),
    						},
    					},
    					Header: &cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("header_present"),
    						},
    						Excludes: pulumi.StringArray{
    							pulumi.String("origin"),
    						},
    						Includes: pulumi.StringArray{
    							pulumi.String("api-key"),
    							pulumi.String("dnt"),
    						},
    					},
    					Host: &cloudflare.PageRuleActionsCacheKeyFieldsHostArgs{
    						Resolved: pulumi.Bool(true),
    					},
    					QueryString: &cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs{
    						Ignore: pulumi.Bool(true),
    					},
    					User: &cloudflare.PageRuleActionsCacheKeyFieldsUserArgs{
    						DeviceType: pulumi.Bool(false),
    						Geo:        pulumi.Bool(true),
    						Lang:       pulumi.Bool(true),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.PageRule;
    import com.pulumi.cloudflare.PageRuleArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsCookieArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHeaderArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHostArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsUserArgs;
    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) {
            // Unrealistic example with all features used
            var foobar = new PageRule("foobar", PageRuleArgs.builder()
                .zoneId(cloudflareZoneId)
                .target(String.format("%s/app/*", cloudflareZone))
                .priority(1)
                .actions(PageRuleActionsArgs.builder()
                    .cacheKeyFields(PageRuleActionsCacheKeyFieldsArgs.builder()
                        .cookie(PageRuleActionsCacheKeyFieldsCookieArgs.builder()
                            .checkPresences("wordpress_test_cookie")
                            .build())
                        .header(PageRuleActionsCacheKeyFieldsHeaderArgs.builder()
                            .checkPresences("header_present")
                            .excludes("origin")
                            .includes(                        
                                "api-key",
                                "dnt")
                            .build())
                        .host(PageRuleActionsCacheKeyFieldsHostArgs.builder()
                            .resolved(true)
                            .build())
                        .queryString(PageRuleActionsCacheKeyFieldsQueryStringArgs.builder()
                            .ignore(true)
                            .build())
                        .user(PageRuleActionsCacheKeyFieldsUserArgs.builder()
                            .deviceType(false)
                            .geo(true)
                            .lang(true)
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Unrealistic example with all features used
      foobar:
        type: cloudflare:PageRule
        properties:
          zoneId: ${cloudflareZoneId}
          target: ${cloudflareZone}/app/*
          priority: 1
          actions:
            cacheKeyFields:
              cookie:
                checkPresences:
                  - wordpress_test_cookie
              header:
                checkPresences:
                  - header_present
                excludes:
                  - origin
                includes:
                  - api-key
                  - dnt
              host:
                resolved: true
              queryString:
                ignore: true
              user:
                deviceType: false
                geo: true
                lang: true
    
    device_type bool
    true - classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults to false.
    geo bool
    true - includes the client’s country, derived from the IP address; defaults to false.
    lang bool

    true - includes the first language code contained in the Accept-Language header sent by the client; defaults to false.

    Example:

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

    // Unrealistic example with all features used const foobar = new cloudflare.PageRule("foobar", { zoneId: cloudflareZoneId, target: ${cloudflareZone}/app/*, priority: 1, actions: { cacheKeyFields: { cookie: { checkPresences: ["wordpress_test_cookie"], }, header: { checkPresences: ["header_present"], excludes: ["origin"], includes: [ "api-key", "dnt", ], }, host: { resolved: true, }, queryString: { ignore: true, }, user: { deviceType: false, geo: true, lang: true, }, }, }, });

    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Unrealistic example with all features used
    foobar = cloudflare.PageRule("foobar",
        zone_id=cloudflare_zone_id,
        target=f"{cloudflare_zone}/app/*",
        priority=1,
        actions={
            "cache_key_fields": {
                "cookie": {
                    "check_presences": ["wordpress_test_cookie"],
                },
                "header": {
                    "check_presences": ["header_present"],
                    "excludes": ["origin"],
                    "includes": [
                        "api-key",
                        "dnt",
                    ],
                },
                "host": {
                    "resolved": True,
                },
                "query_string": {
                    "ignore": True,
                },
                "user": {
                    "device_type": False,
                    "geo": True,
                    "lang": True,
                },
            },
        })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Unrealistic example with all features used
        var foobar = new Cloudflare.PageRule("foobar", new()
        {
            ZoneId = cloudflareZoneId,
            Target = $"{cloudflareZone}/app/*",
            Priority = 1,
            Actions = new Cloudflare.Inputs.PageRuleActionsArgs
            {
                CacheKeyFields = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsArgs
                {
                    Cookie = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsCookieArgs
                    {
                        CheckPresences = new[]
                        {
                            "wordpress_test_cookie",
                        },
                    },
                    Header = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHeaderArgs
                    {
                        CheckPresences = new[]
                        {
                            "header_present",
                        },
                        Excludes = new[]
                        {
                            "origin",
                        },
                        Includes = new[]
                        {
                            "api-key",
                            "dnt",
                        },
                    },
                    Host = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHostArgs
                    {
                        Resolved = true,
                    },
                    QueryString = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs
                    {
                        Ignore = true,
                    },
                    User = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsUserArgs
                    {
                        DeviceType = false,
                        Geo = true,
                        Lang = true,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Unrealistic example with all features used
    		_, err := cloudflare.NewPageRule(ctx, "foobar", &cloudflare.PageRuleArgs{
    			ZoneId:   pulumi.Any(cloudflareZoneId),
    			Target:   pulumi.Sprintf("%v/app/*", cloudflareZone),
    			Priority: pulumi.Int(1),
    			Actions: &cloudflare.PageRuleActionsArgs{
    				CacheKeyFields: &cloudflare.PageRuleActionsCacheKeyFieldsArgs{
    					Cookie: &cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("wordpress_test_cookie"),
    						},
    					},
    					Header: &cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("header_present"),
    						},
    						Excludes: pulumi.StringArray{
    							pulumi.String("origin"),
    						},
    						Includes: pulumi.StringArray{
    							pulumi.String("api-key"),
    							pulumi.String("dnt"),
    						},
    					},
    					Host: &cloudflare.PageRuleActionsCacheKeyFieldsHostArgs{
    						Resolved: pulumi.Bool(true),
    					},
    					QueryString: &cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs{
    						Ignore: pulumi.Bool(true),
    					},
    					User: &cloudflare.PageRuleActionsCacheKeyFieldsUserArgs{
    						DeviceType: pulumi.Bool(false),
    						Geo:        pulumi.Bool(true),
    						Lang:       pulumi.Bool(true),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.PageRule;
    import com.pulumi.cloudflare.PageRuleArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsCookieArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHeaderArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHostArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsUserArgs;
    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) {
            // Unrealistic example with all features used
            var foobar = new PageRule("foobar", PageRuleArgs.builder()
                .zoneId(cloudflareZoneId)
                .target(String.format("%s/app/*", cloudflareZone))
                .priority(1)
                .actions(PageRuleActionsArgs.builder()
                    .cacheKeyFields(PageRuleActionsCacheKeyFieldsArgs.builder()
                        .cookie(PageRuleActionsCacheKeyFieldsCookieArgs.builder()
                            .checkPresences("wordpress_test_cookie")
                            .build())
                        .header(PageRuleActionsCacheKeyFieldsHeaderArgs.builder()
                            .checkPresences("header_present")
                            .excludes("origin")
                            .includes(                        
                                "api-key",
                                "dnt")
                            .build())
                        .host(PageRuleActionsCacheKeyFieldsHostArgs.builder()
                            .resolved(true)
                            .build())
                        .queryString(PageRuleActionsCacheKeyFieldsQueryStringArgs.builder()
                            .ignore(true)
                            .build())
                        .user(PageRuleActionsCacheKeyFieldsUserArgs.builder()
                            .deviceType(false)
                            .geo(true)
                            .lang(true)
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Unrealistic example with all features used
      foobar:
        type: cloudflare:PageRule
        properties:
          zoneId: ${cloudflareZoneId}
          target: ${cloudflareZone}/app/*
          priority: 1
          actions:
            cacheKeyFields:
              cookie:
                checkPresences:
                  - wordpress_test_cookie
              header:
                checkPresences:
                  - header_present
                excludes:
                  - origin
                includes:
                  - api-key
                  - dnt
              host:
                resolved: true
              queryString:
                ignore: true
              user:
                deviceType: false
                geo: true
                lang: true
    
    deviceType Boolean
    true - classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults to false.
    geo Boolean
    true - includes the client’s country, derived from the IP address; defaults to false.
    lang Boolean

    true - includes the first language code contained in the Accept-Language header sent by the client; defaults to false.

    Example:

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

    // Unrealistic example with all features used const foobar = new cloudflare.PageRule("foobar", { zoneId: cloudflareZoneId, target: ${cloudflareZone}/app/*, priority: 1, actions: { cacheKeyFields: { cookie: { checkPresences: ["wordpress_test_cookie"], }, header: { checkPresences: ["header_present"], excludes: ["origin"], includes: [ "api-key", "dnt", ], }, host: { resolved: true, }, queryString: { ignore: true, }, user: { deviceType: false, geo: true, lang: true, }, }, }, });

    import pulumi
    import pulumi_cloudflare as cloudflare
    
    # Unrealistic example with all features used
    foobar = cloudflare.PageRule("foobar",
        zone_id=cloudflare_zone_id,
        target=f"{cloudflare_zone}/app/*",
        priority=1,
        actions={
            "cache_key_fields": {
                "cookie": {
                    "check_presences": ["wordpress_test_cookie"],
                },
                "header": {
                    "check_presences": ["header_present"],
                    "excludes": ["origin"],
                    "includes": [
                        "api-key",
                        "dnt",
                    ],
                },
                "host": {
                    "resolved": True,
                },
                "query_string": {
                    "ignore": True,
                },
                "user": {
                    "device_type": False,
                    "geo": True,
                    "lang": True,
                },
            },
        })
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        // Unrealistic example with all features used
        var foobar = new Cloudflare.PageRule("foobar", new()
        {
            ZoneId = cloudflareZoneId,
            Target = $"{cloudflareZone}/app/*",
            Priority = 1,
            Actions = new Cloudflare.Inputs.PageRuleActionsArgs
            {
                CacheKeyFields = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsArgs
                {
                    Cookie = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsCookieArgs
                    {
                        CheckPresences = new[]
                        {
                            "wordpress_test_cookie",
                        },
                    },
                    Header = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHeaderArgs
                    {
                        CheckPresences = new[]
                        {
                            "header_present",
                        },
                        Excludes = new[]
                        {
                            "origin",
                        },
                        Includes = new[]
                        {
                            "api-key",
                            "dnt",
                        },
                    },
                    Host = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHostArgs
                    {
                        Resolved = true,
                    },
                    QueryString = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs
                    {
                        Ignore = true,
                    },
                    User = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsUserArgs
                    {
                        DeviceType = false,
                        Geo = true,
                        Lang = true,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Unrealistic example with all features used
    		_, err := cloudflare.NewPageRule(ctx, "foobar", &cloudflare.PageRuleArgs{
    			ZoneId:   pulumi.Any(cloudflareZoneId),
    			Target:   pulumi.Sprintf("%v/app/*", cloudflareZone),
    			Priority: pulumi.Int(1),
    			Actions: &cloudflare.PageRuleActionsArgs{
    				CacheKeyFields: &cloudflare.PageRuleActionsCacheKeyFieldsArgs{
    					Cookie: &cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("wordpress_test_cookie"),
    						},
    					},
    					Header: &cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs{
    						CheckPresences: pulumi.StringArray{
    							pulumi.String("header_present"),
    						},
    						Excludes: pulumi.StringArray{
    							pulumi.String("origin"),
    						},
    						Includes: pulumi.StringArray{
    							pulumi.String("api-key"),
    							pulumi.String("dnt"),
    						},
    					},
    					Host: &cloudflare.PageRuleActionsCacheKeyFieldsHostArgs{
    						Resolved: pulumi.Bool(true),
    					},
    					QueryString: &cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs{
    						Ignore: pulumi.Bool(true),
    					},
    					User: &cloudflare.PageRuleActionsCacheKeyFieldsUserArgs{
    						DeviceType: pulumi.Bool(false),
    						Geo:        pulumi.Bool(true),
    						Lang:       pulumi.Bool(true),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.PageRule;
    import com.pulumi.cloudflare.PageRuleArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsCookieArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHeaderArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsHostArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs;
    import com.pulumi.cloudflare.inputs.PageRuleActionsCacheKeyFieldsUserArgs;
    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) {
            // Unrealistic example with all features used
            var foobar = new PageRule("foobar", PageRuleArgs.builder()
                .zoneId(cloudflareZoneId)
                .target(String.format("%s/app/*", cloudflareZone))
                .priority(1)
                .actions(PageRuleActionsArgs.builder()
                    .cacheKeyFields(PageRuleActionsCacheKeyFieldsArgs.builder()
                        .cookie(PageRuleActionsCacheKeyFieldsCookieArgs.builder()
                            .checkPresences("wordpress_test_cookie")
                            .build())
                        .header(PageRuleActionsCacheKeyFieldsHeaderArgs.builder()
                            .checkPresences("header_present")
                            .excludes("origin")
                            .includes(                        
                                "api-key",
                                "dnt")
                            .build())
                        .host(PageRuleActionsCacheKeyFieldsHostArgs.builder()
                            .resolved(true)
                            .build())
                        .queryString(PageRuleActionsCacheKeyFieldsQueryStringArgs.builder()
                            .ignore(true)
                            .build())
                        .user(PageRuleActionsCacheKeyFieldsUserArgs.builder()
                            .deviceType(false)
                            .geo(true)
                            .lang(true)
                            .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Unrealistic example with all features used
      foobar:
        type: cloudflare:PageRule
        properties:
          zoneId: ${cloudflareZoneId}
          target: ${cloudflareZone}/app/*
          priority: 1
          actions:
            cacheKeyFields:
              cookie:
                checkPresences:
                  - wordpress_test_cookie
              header:
                checkPresences:
                  - header_present
                excludes:
                  - origin
                includes:
                  - api-key
                  - dnt
              host:
                resolved: true
              queryString:
                ignore: true
              user:
                deviceType: false
                geo: true
                lang: true
    

    PageRuleActionsCacheTtlByStatus, PageRuleActionsCacheTtlByStatusArgs

    Codes string
    A HTTP code (e.g. 404) or range of codes (e.g. 400-499)
    Ttl int
    Duration a resource lives in the Cloudflare cache.

    • positive number - cache for specified duration in seconds
    Codes string
    A HTTP code (e.g. 404) or range of codes (e.g. 400-499)
    Ttl int
    Duration a resource lives in the Cloudflare cache.

    • positive number - cache for specified duration in seconds
    codes String
    A HTTP code (e.g. 404) or range of codes (e.g. 400-499)
    ttl Integer
    Duration a resource lives in the Cloudflare cache.

    • positive number - cache for specified duration in seconds
    codes string
    A HTTP code (e.g. 404) or range of codes (e.g. 400-499)
    ttl number
    Duration a resource lives in the Cloudflare cache.

    • positive number - cache for specified duration in seconds
    codes str
    A HTTP code (e.g. 404) or range of codes (e.g. 400-499)
    ttl int
    Duration a resource lives in the Cloudflare cache.

    • positive number - cache for specified duration in seconds
    codes String
    A HTTP code (e.g. 404) or range of codes (e.g. 400-499)
    ttl Number
    Duration a resource lives in the Cloudflare cache.

    • positive number - cache for specified duration in seconds

    PageRuleActionsForwardingUrl, PageRuleActionsForwardingUrlArgs

    StatusCode int
    The status code to use for the redirection.
    Url string
    The URL to which the page rule should forward.
    StatusCode int
    The status code to use for the redirection.
    Url string
    The URL to which the page rule should forward.
    statusCode Integer
    The status code to use for the redirection.
    url String
    The URL to which the page rule should forward.
    statusCode number
    The status code to use for the redirection.
    url string
    The URL to which the page rule should forward.
    status_code int
    The status code to use for the redirection.
    url str
    The URL to which the page rule should forward.
    statusCode Number
    The status code to use for the redirection.
    url String
    The URL to which the page rule should forward.

    PageRuleActionsMinify, PageRuleActionsMinifyArgs

    Css string
    Whether CSS should be minified. Valid values are "on" or "off".
    Html string
    Whether HTML should be minified. Valid values are "on" or "off".
    Js string
    Whether Javascript should be minified. Valid values are "on" or "off".
    Css string
    Whether CSS should be minified. Valid values are "on" or "off".
    Html string
    Whether HTML should be minified. Valid values are "on" or "off".
    Js string
    Whether Javascript should be minified. Valid values are "on" or "off".
    css String
    Whether CSS should be minified. Valid values are "on" or "off".
    html String
    Whether HTML should be minified. Valid values are "on" or "off".
    js String
    Whether Javascript should be minified. Valid values are "on" or "off".
    css string
    Whether CSS should be minified. Valid values are "on" or "off".
    html string
    Whether HTML should be minified. Valid values are "on" or "off".
    js string
    Whether Javascript should be minified. Valid values are "on" or "off".
    css str
    Whether CSS should be minified. Valid values are "on" or "off".
    html str
    Whether HTML should be minified. Valid values are "on" or "off".
    js str
    Whether Javascript should be minified. Valid values are "on" or "off".
    css String
    Whether CSS should be minified. Valid values are "on" or "off".
    html String
    Whether HTML should be minified. Valid values are "on" or "off".
    js String
    Whether Javascript should be minified. Valid values are "on" or "off".

    Import

    Page rules can be imported using a composite ID formed of zone ID and page rule ID, e.g.

    $ pulumi import cloudflare:index/pageRule:PageRule default d41d8cd98f00b204e9800998ecf8427e/ch8374ftwdghsif43
    

    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.
    cloudflare logo
    Cloudflare v5.44.0 published on Wednesday, Nov 27, 2024 by Pulumi