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

cloudflare.PageRule

Explore with Pulumi AI

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  examplePageRule:
    type: cloudflare:PageRule
    name: example_page_rule
    properties:
      zoneId: 023e105f4ecef8ad9ca31a8372d0c353
      target: example.com/*
      priority: 1
      status: active
      actions:
        forwarding_url: https://example.com/foo
        status_code: 301
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. PageRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. PageRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PageRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 = 0,
        BrowserCheck = "string",
        BypassCacheOnCookie = "string",
        CacheByDeviceType = "string",
        CacheDeceptionArmor = "string",
        CacheKeyFields = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsArgs
        {
            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",
                },
            },
            Host = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsHostArgs
            {
                Resolved = false,
            },
            QueryString = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsQueryStringArgs
            {
                Excludes = new[]
                {
                    "string",
                },
                Includes = new[]
                {
                    "string",
                },
            },
            User = new Cloudflare.Inputs.PageRuleActionsCacheKeyFieldsUserArgs
            {
                DeviceType = false,
                Geo = false,
                Lang = false,
            },
        },
        CacheLevel = "string",
        CacheOnCookie = "string",
        CacheTtlByStatus = "any",
        DisableApps = false,
        DisablePerformance = false,
        DisableSecurity = false,
        DisableZaraz = false,
        EdgeCacheTtl = 0,
        EmailObfuscation = "string",
        ExplicitCacheControl = "string",
        ForwardingUrl = new Cloudflare.Inputs.PageRuleActionsForwardingUrlArgs
        {
            StatusCode = 0,
            Url = "string",
        },
        HostHeaderOverride = "string",
        IpGeolocation = "string",
        Mirage = "string",
        OpportunisticEncryption = "string",
        OriginErrorPagePassThru = "string",
        Polish = "string",
        ResolveOverride = "string",
        RespectStrongEtag = "string",
        ResponseBuffering = "string",
        RocketLoader = "string",
        SecurityLevel = "string",
        SortQueryStringForCache = "string",
        Ssl = "string",
        TrueClientIpHeader = "string",
        Waf = "string",
    },
    Target = "string",
    ZoneId = "string",
    Priority = 0,
    Status = "string",
});
Copy
example, err := cloudflare.NewPageRule(ctx, "pageRuleResource", &cloudflare.PageRuleArgs{
	Actions: &cloudflare.PageRuleActionsArgs{
		AlwaysUseHttps:         pulumi.Bool(false),
		AutomaticHttpsRewrites: pulumi.String("string"),
		BrowserCacheTtl:        pulumi.Int(0),
		BrowserCheck:           pulumi.String("string"),
		BypassCacheOnCookie:    pulumi.String("string"),
		CacheByDeviceType:      pulumi.String("string"),
		CacheDeceptionArmor:    pulumi.String("string"),
		CacheKeyFields: &cloudflare.PageRuleActionsCacheKeyFieldsArgs{
			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"),
				},
			},
			Host: &cloudflare.PageRuleActionsCacheKeyFieldsHostArgs{
				Resolved: pulumi.Bool(false),
			},
			QueryString: &cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs{
				Excludes: pulumi.StringArray{
					pulumi.String("string"),
				},
				Includes: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
			User: &cloudflare.PageRuleActionsCacheKeyFieldsUserArgs{
				DeviceType: pulumi.Bool(false),
				Geo:        pulumi.Bool(false),
				Lang:       pulumi.Bool(false),
			},
		},
		CacheLevel:           pulumi.String("string"),
		CacheOnCookie:        pulumi.String("string"),
		CacheTtlByStatus:     pulumi.Any("any"),
		DisableApps:          pulumi.Bool(false),
		DisablePerformance:   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"),
		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"),
		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"),
})
Copy
var pageRuleResource = new PageRule("pageRuleResource", PageRuleArgs.builder()
    .actions(PageRuleActionsArgs.builder()
        .alwaysUseHttps(false)
        .automaticHttpsRewrites("string")
        .browserCacheTtl(0)
        .browserCheck("string")
        .bypassCacheOnCookie("string")
        .cacheByDeviceType("string")
        .cacheDeceptionArmor("string")
        .cacheKeyFields(PageRuleActionsCacheKeyFieldsArgs.builder()
            .cookie(PageRuleActionsCacheKeyFieldsCookieArgs.builder()
                .checkPresences("string")
                .includes("string")
                .build())
            .header(PageRuleActionsCacheKeyFieldsHeaderArgs.builder()
                .checkPresences("string")
                .excludes("string")
                .includes("string")
                .build())
            .host(PageRuleActionsCacheKeyFieldsHostArgs.builder()
                .resolved(false)
                .build())
            .queryString(PageRuleActionsCacheKeyFieldsQueryStringArgs.builder()
                .excludes("string")
                .includes("string")
                .build())
            .user(PageRuleActionsCacheKeyFieldsUserArgs.builder()
                .deviceType(false)
                .geo(false)
                .lang(false)
                .build())
            .build())
        .cacheLevel("string")
        .cacheOnCookie("string")
        .cacheTtlByStatus("any")
        .disableApps(false)
        .disablePerformance(false)
        .disableSecurity(false)
        .disableZaraz(false)
        .edgeCacheTtl(0)
        .emailObfuscation("string")
        .explicitCacheControl("string")
        .forwardingUrl(PageRuleActionsForwardingUrlArgs.builder()
            .statusCode(0)
            .url("string")
            .build())
        .hostHeaderOverride("string")
        .ipGeolocation("string")
        .mirage("string")
        .opportunisticEncryption("string")
        .originErrorPagePassThru("string")
        .polish("string")
        .resolveOverride("string")
        .respectStrongEtag("string")
        .responseBuffering("string")
        .rocketLoader("string")
        .securityLevel("string")
        .sortQueryStringForCache("string")
        .ssl("string")
        .trueClientIpHeader("string")
        .waf("string")
        .build())
    .target("string")
    .zoneId("string")
    .priority(0)
    .status("string")
    .build());
Copy
page_rule_resource = cloudflare.PageRule("pageRuleResource",
    actions={
        "always_use_https": False,
        "automatic_https_rewrites": "string",
        "browser_cache_ttl": 0,
        "browser_check": "string",
        "bypass_cache_on_cookie": "string",
        "cache_by_device_type": "string",
        "cache_deception_armor": "string",
        "cache_key_fields": {
            "cookie": {
                "check_presences": ["string"],
                "includes": ["string"],
            },
            "header": {
                "check_presences": ["string"],
                "excludes": ["string"],
                "includes": ["string"],
            },
            "host": {
                "resolved": False,
            },
            "query_string": {
                "excludes": ["string"],
                "includes": ["string"],
            },
            "user": {
                "device_type": False,
                "geo": False,
                "lang": False,
            },
        },
        "cache_level": "string",
        "cache_on_cookie": "string",
        "cache_ttl_by_status": "any",
        "disable_apps": False,
        "disable_performance": 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",
        "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",
        "sort_query_string_for_cache": "string",
        "ssl": "string",
        "true_client_ip_header": "string",
        "waf": "string",
    },
    target="string",
    zone_id="string",
    priority=0,
    status="string")
Copy
const pageRuleResource = new cloudflare.PageRule("pageRuleResource", {
    actions: {
        alwaysUseHttps: false,
        automaticHttpsRewrites: "string",
        browserCacheTtl: 0,
        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"],
                includes: ["string"],
            },
            user: {
                deviceType: false,
                geo: false,
                lang: false,
            },
        },
        cacheLevel: "string",
        cacheOnCookie: "string",
        cacheTtlByStatus: "any",
        disableApps: false,
        disablePerformance: false,
        disableSecurity: false,
        disableZaraz: false,
        edgeCacheTtl: 0,
        emailObfuscation: "string",
        explicitCacheControl: "string",
        forwardingUrl: {
            statusCode: 0,
            url: "string",
        },
        hostHeaderOverride: "string",
        ipGeolocation: "string",
        mirage: "string",
        opportunisticEncryption: "string",
        originErrorPagePassThru: "string",
        polish: "string",
        resolveOverride: "string",
        respectStrongEtag: "string",
        responseBuffering: "string",
        rocketLoader: "string",
        securityLevel: "string",
        sortQueryStringForCache: "string",
        ssl: "string",
        trueClientIpHeader: "string",
        waf: "string",
    },
    target: "string",
    zoneId: "string",
    priority: 0,
    status: "string",
});
Copy
type: cloudflare:PageRule
properties:
    actions:
        alwaysUseHttps: false
        automaticHttpsRewrites: string
        browserCacheTtl: 0
        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
                includes:
                    - string
            user:
                deviceType: false
                geo: false
                lang: false
        cacheLevel: string
        cacheOnCookie: string
        cacheTtlByStatus: any
        disableApps: false
        disablePerformance: false
        disableSecurity: false
        disableZaraz: false
        edgeCacheTtl: 0
        emailObfuscation: string
        explicitCacheControl: string
        forwardingUrl:
            statusCode: 0
            url: string
        hostHeaderOverride: string
        ipGeolocation: string
        mirage: string
        opportunisticEncryption: string
        originErrorPagePassThru: string
        polish: string
        resolveOverride: string
        respectStrongEtag: string
        responseBuffering: string
        rocketLoader: string
        securityLevel: string
        sortQueryStringForCache: string
        ssl: string
        trueClientIpHeader: string
        waf: string
    priority: 0
    status: string
    target: string
    zoneId: string
Copy

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 This property is required. PageRuleActions
Target This property is required. string
ZoneId This property is required. string
Identifier
Priority int
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
Status string
The status of the Page Rule. Available values: "active", "disabled".
Actions This property is required. PageRuleActionsArgs
Target This property is required. string
ZoneId This property is required. string
Identifier
Priority int
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
Status string
The status of the Page Rule. Available values: "active", "disabled".
actions This property is required. PageRuleActions
target This property is required. String
zoneId This property is required. String
Identifier
priority Integer
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
status String
The status of the Page Rule. Available values: "active", "disabled".
actions This property is required. PageRuleActions
target This property is required. string
zoneId This property is required. string
Identifier
priority number
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
status string
The status of the Page Rule. Available values: "active", "disabled".
actions This property is required. PageRuleActionsArgs
target This property is required. str
zone_id This property is required. str
Identifier
priority int
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
status str
The status of the Page Rule. Available values: "active", "disabled".
actions This property is required. Property Map
target This property is required. String
zoneId This property is required. String
Identifier
priority Number
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
status String
The status of the Page Rule. Available values: "active", "disabled".

Outputs

All input properties are implicitly available as output properties. Additionally, the PageRule resource produces the following output properties:

CreatedOn string
The timestamp of when the Page Rule was created.
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
The timestamp of when the Page Rule was last modified.
CreatedOn string
The timestamp of when the Page Rule was created.
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
The timestamp of when the Page Rule was last modified.
createdOn String
The timestamp of when the Page Rule was created.
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
The timestamp of when the Page Rule was last modified.
createdOn string
The timestamp of when the Page Rule was created.
id string
The provider-assigned unique ID for this managed resource.
modifiedOn string
The timestamp of when the Page Rule was last modified.
created_on str
The timestamp of when the Page Rule was created.
id str
The provider-assigned unique ID for this managed resource.
modified_on str
The timestamp of when the Page Rule was last modified.
createdOn String
The timestamp of when the Page Rule was created.
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
The timestamp of when the Page Rule was last modified.

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,
        created_on: Optional[str] = None,
        modified_on: Optional[str] = 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)
resources:  _:    type: cloudflare:PageRule    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Actions PageRuleActions
CreatedOn string
The timestamp of when the Page Rule was created.
ModifiedOn string
The timestamp of when the Page Rule was last modified.
Priority int
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
Status string
The status of the Page Rule. Available values: "active", "disabled".
Target string
ZoneId string
Identifier
Actions PageRuleActionsArgs
CreatedOn string
The timestamp of when the Page Rule was created.
ModifiedOn string
The timestamp of when the Page Rule was last modified.
Priority int
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
Status string
The status of the Page Rule. Available values: "active", "disabled".
Target string
ZoneId string
Identifier
actions PageRuleActions
createdOn String
The timestamp of when the Page Rule was created.
modifiedOn String
The timestamp of when the Page Rule was last modified.
priority Integer
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
status String
The status of the Page Rule. Available values: "active", "disabled".
target String
zoneId String
Identifier
actions PageRuleActions
createdOn string
The timestamp of when the Page Rule was created.
modifiedOn string
The timestamp of when the Page Rule was last modified.
priority number
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
status string
The status of the Page Rule. Available values: "active", "disabled".
target string
zoneId string
Identifier
actions PageRuleActionsArgs
created_on str
The timestamp of when the Page Rule was created.
modified_on str
The timestamp of when the Page Rule was last modified.
priority int
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
status str
The status of the Page Rule. Available values: "active", "disabled".
target str
zone_id str
Identifier
actions Property Map
createdOn String
The timestamp of when the Page Rule was created.
modifiedOn String
The timestamp of when the Page Rule was last modified.
priority Number
The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: /images/*) but want a more specific Page Rule to take precedence (rule B: /images/special/*), specify a higher priority for rule B so it overrides rule A.
status String
The status of the Page Rule. Available values: "active", "disabled".
target String
zoneId String
Identifier

Supporting Types

PageRuleActions
, PageRuleActionsArgs

PageRuleActionsCacheKeyFields
, PageRuleActionsCacheKeyFieldsArgs

PageRuleActionsCacheKeyFieldsCookie
, PageRuleActionsCacheKeyFieldsCookieArgs

CheckPresences List<string>
Includes List<string>
CheckPresences []string
Includes []string
checkPresences List<String>
includes List<String>
checkPresences string[]
includes string[]
check_presences Sequence[str]
includes Sequence[str]
checkPresences List<String>
includes List<String>

PageRuleActionsCacheKeyFieldsHeader
, PageRuleActionsCacheKeyFieldsHeaderArgs

CheckPresences List<string>
Excludes List<string>
Includes List<string>
CheckPresences []string
Excludes []string
Includes []string
checkPresences List<String>
excludes List<String>
includes List<String>
checkPresences string[]
excludes string[]
includes string[]
check_presences Sequence[str]
excludes Sequence[str]
includes Sequence[str]
checkPresences List<String>
excludes List<String>
includes List<String>

PageRuleActionsCacheKeyFieldsHost
, PageRuleActionsCacheKeyFieldsHostArgs

resolved Boolean
resolved boolean
resolved Boolean

PageRuleActionsCacheKeyFieldsQueryString
, PageRuleActionsCacheKeyFieldsQueryStringArgs

Excludes List<string>
Includes List<string>
Excludes []string
Includes []string
excludes List<String>
includes List<String>
excludes string[]
includes string[]
excludes Sequence[str]
includes Sequence[str]
excludes List<String>
includes List<String>

PageRuleActionsCacheKeyFieldsUser
, PageRuleActionsCacheKeyFieldsUserArgs

DeviceType bool
Geo bool
Lang bool
DeviceType bool
Geo bool
Lang bool
deviceType Boolean
geo Boolean
lang Boolean
deviceType boolean
geo boolean
lang boolean
device_type bool
geo bool
lang bool
deviceType Boolean
geo Boolean
lang Boolean

PageRuleActionsForwardingUrl
, PageRuleActionsForwardingUrlArgs

StatusCode This property is required. int
Url This property is required. string
StatusCode This property is required. int
Url This property is required. string
statusCode This property is required. Integer
url This property is required. String
statusCode This property is required. number
url This property is required. string
status_code This property is required. int
url This property is required. str
statusCode This property is required. Number
url This property is required. String

Import

$ pulumi import cloudflare:index/pageRule:PageRule example '<zone_id>/<pagerule_id>'
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.