import * as pulumi from "@pulumi/pulumi"; import { input as inputs, output as outputs } from "./types"; /** * Provides a Cloudflare page rule resource. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as pulumi_cloudflare from "@mapped/pulumi-cloudflare"; * * // Add a page rule to the domain * const foobar = new cloudflare.PageRule("foobar", { * zoneId: _var.cloudflare_zone_id, * target: `sub.${_var.cloudflare_zone}/page`, * priority: 1, * actions: { * ssl: "flexible", * emailObfuscation: "on", * minifies: [{ * html: "off", * css: "on", * js: "on", * }], * }, * }); * ``` * * ## Import * * Page rules can be imported using a composite ID formed of zone ID and page rule ID, e.g. * * ```sh * $ pulumi import cloudflare:index/pageRule:PageRule default d41d8cd98f00b204e9800998ecf8427e/ch8374ftwdghsif43 * ``` */ export declare class PageRule extends pulumi.CustomResource { /** * Get an existing PageRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: PageRuleState, opts?: pulumi.CustomResourceOptions): PageRule; /** * Returns true if the given object is an instance of PageRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is PageRule; /** * The actions taken by the page rule, options given below. */ readonly actions: pulumi.Output; /** * The priority of the page rule among others for this target, the higher the number the higher the priority as per [API documentation](https://api.cloudflare.com/#page-rules-for-a-zone-create-page-rule). */ readonly priority: pulumi.Output; /** * Whether the page rule is active or disabled. */ readonly status: pulumi.Output; /** * The URL pattern to target with the page rule. */ readonly target: pulumi.Output; /** * The DNS zone ID to which the page rule should be added. */ readonly zoneId: pulumi.Output; /** * Create a PageRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PageRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PageRule resources. */ export interface PageRuleState { /** * The actions taken by the page rule, options given below. */ actions?: pulumi.Input; /** * The priority of the page rule among others for this target, the higher the number the higher the priority as per [API documentation](https://api.cloudflare.com/#page-rules-for-a-zone-create-page-rule). */ priority?: pulumi.Input; /** * Whether the page rule is active or disabled. */ status?: pulumi.Input; /** * The URL pattern to target with the page rule. */ target?: pulumi.Input; /** * The DNS zone ID to which the page rule should be added. */ zoneId?: pulumi.Input; } /** * The set of arguments for constructing a PageRule resource. */ export interface PageRuleArgs { /** * The actions taken by the page rule, options given below. */ actions: pulumi.Input; /** * The priority of the page rule among others for this target, the higher the number the higher the priority as per [API documentation](https://api.cloudflare.com/#page-rules-for-a-zone-create-page-rule). */ priority?: pulumi.Input; /** * Whether the page rule is active or disabled. */ status?: pulumi.Input; /** * The URL pattern to target with the page rule. */ target: pulumi.Input; /** * The DNS zone ID to which the page rule should be added. */ zoneId: pulumi.Input; }