cloudflare.PageRule
Explore with Pulumi AI
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=cloudflare.PageRuleActionsArgs(
ssl="flexible",
email_obfuscation="on",
minifies=[cloudflare.PageRuleActionsMinifyArgs(
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.String(fmt.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=cloudflare.PageRuleActionsArgs(
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=cloudflare.PageRuleActionsCacheKeyFieldsArgs(
host=cloudflare.PageRuleActionsCacheKeyFieldsHostArgs(
resolved=False,
),
query_string=cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs(
excludes=["string"],
ignore=False,
includes=["string"],
),
user=cloudflare.PageRuleActionsCacheKeyFieldsUserArgs(
device_type=False,
geo=False,
lang=False,
),
cookie=cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs(
check_presences=["string"],
includes=["string"],
),
header=cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs(
check_presences=["string"],
excludes=["string"],
includes=["string"],
),
),
cache_level="string",
cache_on_cookie="string",
cache_ttl_by_statuses=[cloudflare.PageRuleActionsCacheTtlByStatusArgs(
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=cloudflare.PageRuleActionsForwardingUrlArgs(
status_code=0,
url="string",
),
host_header_override="string",
ip_geolocation="string",
minifies=[cloudflare.PageRuleActionsMinifyArgs(
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
The PageRule resource accepts the following input properties:
- Actions
Page
Rule Actions - The actions taken by the page rule, options given below.
- Target string
- The URL pattern to target with the page rule.
- Zone
Id 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
Page
Rule Actions Args - The actions taken by the page rule, options given below.
- Target string
- The URL pattern to target with the page rule.
- Zone
Id 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
Page
Rule Actions - The actions taken by the page rule, options given below.
- target String
- The URL pattern to target with the page rule.
- zone
Id 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
Page
Rule Actions - The actions taken by the page rule, options given below.
- target string
- The URL pattern to target with the page rule.
- zone
Id 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
Page
Rule Actions Args - 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.
- zone
Id 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.
- Actions
Page
Rule Actions - 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.
- Zone
Id string - The DNS zone ID to which the page rule should be added.
- Actions
Page
Rule Actions Args - 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.
- Zone
Id string - The DNS zone ID to which the page rule should be added.
- actions
Page
Rule Actions - 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.
- zone
Id String - The DNS zone ID to which the page rule should be added.
- actions
Page
Rule Actions - 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.
- zone
Id string - The DNS zone ID to which the page rule should be added.
- actions
Page
Rule Actions Args - 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.
- zone
Id String - The DNS zone ID to which the page rule should be added.
Supporting Types
PageRuleActions, PageRuleActionsArgs
- Always
Use boolHttps - Boolean of whether this action is enabled. Default: false.
- Automatic
Https stringRewrites - Whether this action is
"on"
or"off"
. - Browser
Cache stringTtl - The Time To Live for the browser cache.
0
means 'Respect Existing Headers' - Browser
Check string - Whether this action is
"on"
or"off"
. - string
- String value of cookie name to conditionally bypass cache the page.
- Cache
By stringDevice Type - Whether this action is
"on"
or"off"
. - Cache
Deception stringArmor - Whether this action is
"on"
or"off"
. - Cache
Key PageFields Rule Actions Cache Key Fields - Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
- Cache
Level string - Whether to set the cache level to
"bypass"
,"basic"
,"simplified"
,"aggressive"
, or"cache_everything"
. - string
- String value of cookie name to conditionally cache the page.
- Cache
Ttl List<PageBy Statuses Rule Actions Cache Ttl By Status> - 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 intTtl - The Time To Live for the edge cache.
- Email
Obfuscation string - Whether this action is
"on"
or"off"
. - Explicit
Cache stringControl - Whether origin Cache-Control action is
"on"
or"off"
. - Forwarding
Url PageRule Actions Forwarding Url - The URL to forward to, and with what status. See below.
- Host
Header stringOverride - Value of the Host header to send.
- Ip
Geolocation string - Whether this action is
"on"
or"off"
. - Minifies
List<Page
Rule Actions Minify> - The configuration for HTML, CSS and JS minification. See below for full list of options.
- Mirage string
- Whether this action is
"on"
or"off"
. - Opportunistic
Encryption string - Whether this action is
"on"
or"off"
. - Origin
Error stringPage Pass Thru - Whether this action is
"on"
or"off"
. - Polish string
- Whether this action is
"off"
,"lossless"
or"lossy"
. - Resolve
Override string - Overridden origin server name.
- Respect
Strong stringEtag - Whether this action is
"on"
or"off"
. - Response
Buffering string - Whether this action is
"on"
or"off"
. - Rocket
Loader string - Whether to set the rocket loader to
"on"
,"off"
. - Security
Level string - Whether to set the security level to
"off"
,"essentially_off"
,"low"
,"medium"
,"high"
, or"under_attack"
. - Server
Side stringExclude - Whether this action is
"on"
or"off"
. - Sort
Query stringString For Cache - Whether this action is
"on"
or"off"
. - Ssl string
- Whether to set the SSL mode to
"off"
,"flexible"
,"full"
,"strict"
, or"origin_pull"
. - True
Client stringIp Header - Whether this action is
"on"
or"off"
. - Waf string
- Whether this action is
"on"
or"off"
.
- Always
Use boolHttps - Boolean of whether this action is enabled. Default: false.
- Automatic
Https stringRewrites - Whether this action is
"on"
or"off"
. - Browser
Cache stringTtl - The Time To Live for the browser cache.
0
means 'Respect Existing Headers' - Browser
Check string - Whether this action is
"on"
or"off"
. - string
- String value of cookie name to conditionally bypass cache the page.
- Cache
By stringDevice Type - Whether this action is
"on"
or"off"
. - Cache
Deception stringArmor - Whether this action is
"on"
or"off"
. - Cache
Key PageFields Rule Actions Cache Key Fields - Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
- Cache
Level string - Whether to set the cache level to
"bypass"
,"basic"
,"simplified"
,"aggressive"
, or"cache_everything"
. - string
- String value of cookie name to conditionally cache the page.
- Cache
Ttl []PageBy Statuses Rule Actions Cache Ttl By Status - 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 intTtl - The Time To Live for the edge cache.
- Email
Obfuscation string - Whether this action is
"on"
or"off"
. - Explicit
Cache stringControl - Whether origin Cache-Control action is
"on"
or"off"
. - Forwarding
Url PageRule Actions Forwarding Url - The URL to forward to, and with what status. See below.
- Host
Header stringOverride - Value of the Host header to send.
- Ip
Geolocation string - Whether this action is
"on"
or"off"
. - Minifies
[]Page
Rule Actions Minify - The configuration for HTML, CSS and JS minification. See below for full list of options.
- Mirage string
- Whether this action is
"on"
or"off"
. - Opportunistic
Encryption string - Whether this action is
"on"
or"off"
. - Origin
Error stringPage Pass Thru - Whether this action is
"on"
or"off"
. - Polish string
- Whether this action is
"off"
,"lossless"
or"lossy"
. - Resolve
Override string - Overridden origin server name.
- Respect
Strong stringEtag - Whether this action is
"on"
or"off"
. - Response
Buffering string - Whether this action is
"on"
or"off"
. - Rocket
Loader string - Whether to set the rocket loader to
"on"
,"off"
. - Security
Level string - Whether to set the security level to
"off"
,"essentially_off"
,"low"
,"medium"
,"high"
, or"under_attack"
. - Server
Side stringExclude - Whether this action is
"on"
or"off"
. - Sort
Query stringString For Cache - Whether this action is
"on"
or"off"
. - Ssl string
- Whether to set the SSL mode to
"off"
,"flexible"
,"full"
,"strict"
, or"origin_pull"
. - True
Client stringIp Header - Whether this action is
"on"
or"off"
. - Waf string
- Whether this action is
"on"
or"off"
.
- always
Use BooleanHttps - Boolean of whether this action is enabled. Default: false.
- automatic
Https StringRewrites - Whether this action is
"on"
or"off"
. - browser
Cache StringTtl - The Time To Live for the browser cache.
0
means 'Respect Existing Headers' - browser
Check String - Whether this action is
"on"
or"off"
. - String
- String value of cookie name to conditionally bypass cache the page.
- cache
By StringDevice Type - Whether this action is
"on"
or"off"
. - cache
Deception StringArmor - Whether this action is
"on"
or"off"
. - cache
Key PageFields Rule Actions Cache Key Fields - Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
- cache
Level String - Whether to set the cache level to
"bypass"
,"basic"
,"simplified"
,"aggressive"
, or"cache_everything"
. - String
- String value of cookie name to conditionally cache the page.
- cache
Ttl List<PageBy Statuses Rule Actions Cache Ttl By Status> - 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 Boolean - Boolean of whether this action is enabled. Default: false.
- disable
Performance Boolean - Boolean of whether this action is enabled. Default: false.
- disable
Railgun Boolean - Boolean of whether this action is enabled. Default: false.
- disable
Security Boolean - Boolean of whether this action is enabled. Default: false.
- disable
Zaraz Boolean - Boolean of whether this action is enabled. Default: false.
- edge
Cache IntegerTtl - The Time To Live for the edge cache.
- email
Obfuscation String - Whether this action is
"on"
or"off"
. - explicit
Cache StringControl - Whether origin Cache-Control action is
"on"
or"off"
. - forwarding
Url PageRule Actions Forwarding Url - The URL to forward to, and with what status. See below.
- host
Header StringOverride - Value of the Host header to send.
- ip
Geolocation String - Whether this action is
"on"
or"off"
. - minifies
List<Page
Rule Actions Minify> - The configuration for HTML, CSS and JS minification. See below for full list of options.
- mirage String
- Whether this action is
"on"
or"off"
. - opportunistic
Encryption String - Whether this action is
"on"
or"off"
. - origin
Error StringPage Pass Thru - Whether this action is
"on"
or"off"
. - polish String
- Whether this action is
"off"
,"lossless"
or"lossy"
. - resolve
Override String - Overridden origin server name.
- respect
Strong StringEtag - Whether this action is
"on"
or"off"
. - response
Buffering String - Whether this action is
"on"
or"off"
. - rocket
Loader String - Whether to set the rocket loader to
"on"
,"off"
. - security
Level String - Whether to set the security level to
"off"
,"essentially_off"
,"low"
,"medium"
,"high"
, or"under_attack"
. - server
Side StringExclude - Whether this action is
"on"
or"off"
. - sort
Query StringString For Cache - Whether this action is
"on"
or"off"
. - ssl String
- Whether to set the SSL mode to
"off"
,"flexible"
,"full"
,"strict"
, or"origin_pull"
. - true
Client StringIp Header - Whether this action is
"on"
or"off"
. - waf String
- Whether this action is
"on"
or"off"
.
- always
Use booleanHttps - Boolean of whether this action is enabled. Default: false.
- automatic
Https stringRewrites - Whether this action is
"on"
or"off"
. - browser
Cache stringTtl - The Time To Live for the browser cache.
0
means 'Respect Existing Headers' - browser
Check string - Whether this action is
"on"
or"off"
. - string
- String value of cookie name to conditionally bypass cache the page.
- cache
By stringDevice Type - Whether this action is
"on"
or"off"
. - cache
Deception stringArmor - Whether this action is
"on"
or"off"
. - cache
Key PageFields Rule Actions Cache Key Fields - Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
- cache
Level string - Whether to set the cache level to
"bypass"
,"basic"
,"simplified"
,"aggressive"
, or"cache_everything"
. - string
- String value of cookie name to conditionally cache the page.
- cache
Ttl PageBy Statuses Rule Actions Cache Ttl By Status[] - 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 boolean - Boolean of whether this action is enabled. Default: false.
- disable
Performance boolean - Boolean of whether this action is enabled. Default: false.
- disable
Railgun boolean - Boolean of whether this action is enabled. Default: false.
- disable
Security boolean - Boolean of whether this action is enabled. Default: false.
- disable
Zaraz boolean - Boolean of whether this action is enabled. Default: false.
- edge
Cache numberTtl - The Time To Live for the edge cache.
- email
Obfuscation string - Whether this action is
"on"
or"off"
. - explicit
Cache stringControl - Whether origin Cache-Control action is
"on"
or"off"
. - forwarding
Url PageRule Actions Forwarding Url - The URL to forward to, and with what status. See below.
- host
Header stringOverride - Value of the Host header to send.
- ip
Geolocation string - Whether this action is
"on"
or"off"
. - minifies
Page
Rule Actions Minify[] - The configuration for HTML, CSS and JS minification. See below for full list of options.
- mirage string
- Whether this action is
"on"
or"off"
. - opportunistic
Encryption string - Whether this action is
"on"
or"off"
. - origin
Error stringPage Pass Thru - Whether this action is
"on"
or"off"
. - polish string
- Whether this action is
"off"
,"lossless"
or"lossy"
. - resolve
Override string - Overridden origin server name.
- respect
Strong stringEtag - Whether this action is
"on"
or"off"
. - response
Buffering string - Whether this action is
"on"
or"off"
. - rocket
Loader string - Whether to set the rocket loader to
"on"
,"off"
. - security
Level string - Whether to set the security level to
"off"
,"essentially_off"
,"low"
,"medium"
,"high"
, or"under_attack"
. - server
Side stringExclude - Whether this action is
"on"
or"off"
. - sort
Query stringString For Cache - Whether this action is
"on"
or"off"
. - ssl string
- Whether to set the SSL mode to
"off"
,"flexible"
,"full"
,"strict"
, or"origin_pull"
. - true
Client stringIp Header - Whether this action is
"on"
or"off"
. - waf string
- Whether this action is
"on"
or"off"
.
- always_
use_ boolhttps - Boolean of whether this action is enabled. Default: false.
- automatic_
https_ strrewrites - Whether this action is
"on"
or"off"
. - browser_
cache_ strttl - The Time To Live for the browser cache.
0
means 'Respect Existing Headers' - browser_
check str - Whether this action is
"on"
or"off"
. - str
- String value of cookie name to conditionally bypass cache the page.
- cache_
by_ strdevice_ type - Whether this action is
"on"
or"off"
. - cache_
deception_ strarmor - Whether this action is
"on"
or"off"
. - cache_
key_ Pagefields Rule Actions Cache Key Fields - 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"
. - str
- String value of cookie name to conditionally cache the page.
- cache_
ttl_ Sequence[Pageby_ statuses Rule Actions Cache Ttl By Status] - 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_ intttl - The Time To Live for the edge cache.
- email_
obfuscation str - Whether this action is
"on"
or"off"
. - explicit_
cache_ strcontrol - Whether origin Cache-Control action is
"on"
or"off"
. - forwarding_
url PageRule Actions Forwarding Url - The URL to forward to, and with what status. See below.
- host_
header_ stroverride - Value of the Host header to send.
- ip_
geolocation str - Whether this action is
"on"
or"off"
. - minifies
Sequence[Page
Rule Actions Minify] - 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_ strpage_ pass_ thru - 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_ stretag - 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_ strexclude - Whether this action is
"on"
or"off"
. - sort_
query_ strstring_ for_ cache - 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_ strip_ header - Whether this action is
"on"
or"off"
. - waf str
- Whether this action is
"on"
or"off"
.
- always
Use BooleanHttps - Boolean of whether this action is enabled. Default: false.
- automatic
Https StringRewrites - Whether this action is
"on"
or"off"
. - browser
Cache StringTtl - The Time To Live for the browser cache.
0
means 'Respect Existing Headers' - browser
Check String - Whether this action is
"on"
or"off"
. - String
- String value of cookie name to conditionally bypass cache the page.
- cache
By StringDevice Type - Whether this action is
"on"
or"off"
. - cache
Deception StringArmor - Whether this action is
"on"
or"off"
. - cache
Key Property MapFields - Controls how Cloudflare creates Cache Keys used to identify files in cache. See below for full description.
- cache
Level String - Whether to set the cache level to
"bypass"
,"basic"
,"simplified"
,"aggressive"
, or"cache_everything"
. - String
- String value of cookie name to conditionally cache the page.
- cache
Ttl List<Property Map>By Statuses - 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 Boolean - Boolean of whether this action is enabled. Default: false.
- disable
Performance Boolean - Boolean of whether this action is enabled. Default: false.
- disable
Railgun Boolean - Boolean of whether this action is enabled. Default: false.
- disable
Security Boolean - Boolean of whether this action is enabled. Default: false.
- disable
Zaraz Boolean - Boolean of whether this action is enabled. Default: false.
- edge
Cache NumberTtl - The Time To Live for the edge cache.
- email
Obfuscation String - Whether this action is
"on"
or"off"
. - explicit
Cache StringControl - Whether origin Cache-Control action is
"on"
or"off"
. - forwarding
Url Property Map - The URL to forward to, and with what status. See below.
- host
Header StringOverride - Value of the Host header to send.
- ip
Geolocation 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"
. - opportunistic
Encryption String - Whether this action is
"on"
or"off"
. - origin
Error StringPage Pass Thru - Whether this action is
"on"
or"off"
. - polish String
- Whether this action is
"off"
,"lossless"
or"lossy"
. - resolve
Override String - Overridden origin server name.
- respect
Strong StringEtag - Whether this action is
"on"
or"off"
. - response
Buffering String - Whether this action is
"on"
or"off"
. - rocket
Loader String - Whether to set the rocket loader to
"on"
,"off"
. - security
Level String - Whether to set the security level to
"off"
,"essentially_off"
,"low"
,"medium"
,"high"
, or"under_attack"
. - server
Side StringExclude - Whether this action is
"on"
or"off"
. - sort
Query StringString For Cache - Whether this action is
"on"
or"off"
. - ssl String
- Whether to set the SSL mode to
"off"
,"flexible"
,"full"
,"strict"
, or"origin_pull"
. - true
Client StringIp Header - Whether this action is
"on"
or"off"
. - waf String
- Whether this action is
"on"
or"off"
.
PageRuleActionsCacheKeyFields, PageRuleActionsCacheKeyFieldsArgs
- Host
Page
Rule Actions Cache Key Fields Host - Controls which Host header goes into Cache Key:
- Query
String PageRule Actions Cache Key Fields Query String - Controls which URL query string parameters go into the Cache Key.
- User
Page
Rule Actions Cache Key Fields User - Controls which end user-related features go into the Cache Key.
- Page
Rule Actions Cache Key Fields Cookie - Controls what cookies go into Cache Key:
- Header
Page
Rule Actions Cache Key Fields Header - Controls what HTTP headers go into Cache Key:
- Host
Page
Rule Actions Cache Key Fields Host - Controls which Host header goes into Cache Key:
- Query
String PageRule Actions Cache Key Fields Query String - Controls which URL query string parameters go into the Cache Key.
- User
Page
Rule Actions Cache Key Fields User - Controls which end user-related features go into the Cache Key.
- Page
Rule Actions Cache Key Fields Cookie - Controls what cookies go into Cache Key:
- Header
Page
Rule Actions Cache Key Fields Header - Controls what HTTP headers go into Cache Key:
- host
Page
Rule Actions Cache Key Fields Host - Controls which Host header goes into Cache Key:
- query
String PageRule Actions Cache Key Fields Query String - Controls which URL query string parameters go into the Cache Key.
- user
Page
Rule Actions Cache Key Fields User - Controls which end user-related features go into the Cache Key.
- Page
Rule Actions Cache Key Fields Cookie - Controls what cookies go into Cache Key:
- header
Page
Rule Actions Cache Key Fields Header - Controls what HTTP headers go into Cache Key:
- host
Page
Rule Actions Cache Key Fields Host - Controls which Host header goes into Cache Key:
- query
String PageRule Actions Cache Key Fields Query String - Controls which URL query string parameters go into the Cache Key.
- user
Page
Rule Actions Cache Key Fields User - Controls which end user-related features go into the Cache Key.
- Page
Rule Actions Cache Key Fields Cookie - Controls what cookies go into Cache Key:
- header
Page
Rule Actions Cache Key Fields Header - Controls what HTTP headers go into Cache Key:
- host
Page
Rule Actions Cache Key Fields Host - Controls which Host header goes into Cache Key:
- query_
string PageRule Actions Cache Key Fields Query String - Controls which URL query string parameters go into the Cache Key.
- user
Page
Rule Actions Cache Key Fields User - Controls which end user-related features go into the Cache Key.
- Page
Rule Actions Cache Key Fields Cookie - Controls what cookies go into Cache Key:
- header
Page
Rule Actions Cache Key Fields Header - Controls what HTTP headers go into Cache Key:
- host Property Map
- Controls which Host header goes into Cache Key:
- query
String 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.
- Property Map
- Controls what cookies go into Cache Key:
- header Property Map
- Controls what HTTP headers go into Cache Key:
PageRuleActionsCacheKeyFieldsCookie, PageRuleActionsCacheKeyFieldsCookieArgs
- Check
Presences List<string> - Check for presence of specified cookies, without including their actual values.
- Includes List<string>
- Use values of specified cookies in Cache Key.
- Check
Presences []string - Check for presence of specified cookies, without including their actual values.
- Includes []string
- Use values of specified cookies in Cache Key.
- check
Presences List<String> - Check for presence of specified cookies, without including their actual values.
- includes List<String>
- Use values of specified cookies in Cache Key.
- check
Presences 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.
- check
Presences 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
- Check
Presences 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.
- Check
Presences []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 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.
- check
Presences 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.
- check
Presences 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 befalse
if any ofexclude
orinclude
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 befalse
if any ofexclude
orinclude
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 befalse
if any ofexclude
orinclude
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 befalse
if any ofexclude
orinclude
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 befalse
if any ofexclude
orinclude
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 befalse
if any ofexclude
orinclude
is non-empty.- includes List<String>
- Only use values of specified query string parameters in Cache Key.
PageRuleActionsCacheKeyFieldsUser, PageRuleActionsCacheKeyFieldsUserArgs
- Device
Type bool true
- classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults tofalse
.- Geo bool
true
- includes the client’s country, derived from the IP address; defaults tofalse
.- Lang bool
true
- includes the first language code contained in theAccept-Language
header sent by the client; defaults tofalse
.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=cloudflare.PageRuleActionsArgs( cache_key_fields=cloudflare.PageRuleActionsCacheKeyFieldsArgs( cookie=cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs( check_presences=["wordpress_test_cookie"], ), header=cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs( check_presences=["header_present"], excludes=["origin"], includes=[ "api-key", "dnt", ], ), host=cloudflare.PageRuleActionsCacheKeyFieldsHostArgs( resolved=True, ), query_string=cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs( ignore=True, ), user=cloudflare.PageRuleActionsCacheKeyFieldsUserArgs( 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.String(fmt.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 tofalse
.- Geo bool
true
- includes the client’s country, derived from the IP address; defaults tofalse
.- Lang bool
true
- includes the first language code contained in theAccept-Language
header sent by the client; defaults tofalse
.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=cloudflare.PageRuleActionsArgs( cache_key_fields=cloudflare.PageRuleActionsCacheKeyFieldsArgs( cookie=cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs( check_presences=["wordpress_test_cookie"], ), header=cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs( check_presences=["header_present"], excludes=["origin"], includes=[ "api-key", "dnt", ], ), host=cloudflare.PageRuleActionsCacheKeyFieldsHostArgs( resolved=True, ), query_string=cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs( ignore=True, ), user=cloudflare.PageRuleActionsCacheKeyFieldsUserArgs( 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.String(fmt.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 Boolean true
- classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults tofalse
.- geo Boolean
true
- includes the client’s country, derived from the IP address; defaults tofalse
.- lang Boolean
true
- includes the first language code contained in theAccept-Language
header sent by the client; defaults tofalse
.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=cloudflare.PageRuleActionsArgs( cache_key_fields=cloudflare.PageRuleActionsCacheKeyFieldsArgs( cookie=cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs( check_presences=["wordpress_test_cookie"], ), header=cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs( check_presences=["header_present"], excludes=["origin"], includes=[ "api-key", "dnt", ], ), host=cloudflare.PageRuleActionsCacheKeyFieldsHostArgs( resolved=True, ), query_string=cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs( ignore=True, ), user=cloudflare.PageRuleActionsCacheKeyFieldsUserArgs( 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.String(fmt.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 boolean true
- classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults tofalse
.- geo boolean
true
- includes the client’s country, derived from the IP address; defaults tofalse
.- lang boolean
true
- includes the first language code contained in theAccept-Language
header sent by the client; defaults tofalse
.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=cloudflare.PageRuleActionsArgs( cache_key_fields=cloudflare.PageRuleActionsCacheKeyFieldsArgs( cookie=cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs( check_presences=["wordpress_test_cookie"], ), header=cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs( check_presences=["header_present"], excludes=["origin"], includes=[ "api-key", "dnt", ], ), host=cloudflare.PageRuleActionsCacheKeyFieldsHostArgs( resolved=True, ), query_string=cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs( ignore=True, ), user=cloudflare.PageRuleActionsCacheKeyFieldsUserArgs( 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.String(fmt.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 tofalse
.- geo bool
true
- includes the client’s country, derived from the IP address; defaults tofalse
.- lang bool
true
- includes the first language code contained in theAccept-Language
header sent by the client; defaults tofalse
.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=cloudflare.PageRuleActionsArgs( cache_key_fields=cloudflare.PageRuleActionsCacheKeyFieldsArgs( cookie=cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs( check_presences=["wordpress_test_cookie"], ), header=cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs( check_presences=["header_present"], excludes=["origin"], includes=[ "api-key", "dnt", ], ), host=cloudflare.PageRuleActionsCacheKeyFieldsHostArgs( resolved=True, ), query_string=cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs( ignore=True, ), user=cloudflare.PageRuleActionsCacheKeyFieldsUserArgs( 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.String(fmt.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 Boolean true
- classifies a request as “mobile”, “desktop”, or “tablet” based on the User Agent; defaults tofalse
.- geo Boolean
true
- includes the client’s country, derived from the IP address; defaults tofalse
.- lang Boolean
true
- includes the first language code contained in theAccept-Language
header sent by the client; defaults tofalse
.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=cloudflare.PageRuleActionsArgs( cache_key_fields=cloudflare.PageRuleActionsCacheKeyFieldsArgs( cookie=cloudflare.PageRuleActionsCacheKeyFieldsCookieArgs( check_presences=["wordpress_test_cookie"], ), header=cloudflare.PageRuleActionsCacheKeyFieldsHeaderArgs( check_presences=["header_present"], excludes=["origin"], includes=[ "api-key", "dnt", ], ), host=cloudflare.PageRuleActionsCacheKeyFieldsHostArgs( resolved=True, ), query_string=cloudflare.PageRuleActionsCacheKeyFieldsQueryStringArgs( ignore=True, ), user=cloudflare.PageRuleActionsCacheKeyFieldsUserArgs( 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.String(fmt.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
PageRuleActionsForwardingUrl, PageRuleActionsForwardingUrlArgs
- Status
Code int - 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 string
- The URL to which the page rule should forward.
- status
Code Integer - The status code to use for the redirection.
- url String
- The URL to which the page rule should forward.
- status
Code 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.
- status
Code Number - The status code to use for the redirection.
- url String
- The URL to which the page rule should forward.
PageRuleActionsMinify, PageRuleActionsMinifyArgs
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.