PageRule

class PageRule : KotlinCustomResource

Provides a Cloudflare page rule resource.

Example Usage

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) {
var foobar = new PageRule("foobar", PageRuleArgs.builder()
.zoneId(var_.cloudflare_zone_id())
.target(String.format("sub.%s/page", var_.cloudflare_zone()))
.priority(1)
.actions(PageRuleActionsArgs.builder()
.ssl("flexible")
.emailObfuscation("on")
.minifies(PageRuleActionsMinifyArgs.builder()
.html("off")
.css("on")
.js("on")
.build())
.build())
.build());
}
}

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

Properties

Link copied to clipboard

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

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val priority: Output<Int>?

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Output<String>?

Whether the page rule is active or disabled.

Link copied to clipboard
val target: Output<String>

The URL pattern to target with the page rule.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val zoneId: Output<String>

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