Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi
cloudflare.getPageRule
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const examplePageRule = cloudflare.getPageRule({
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
pageruleId: "023e105f4ecef8ad9ca31a8372d0c353",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_page_rule = cloudflare.get_page_rule(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
pagerule_id="023e105f4ecef8ad9ca31a8372d0c353")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.LookupPageRule(ctx, &cloudflare.LookupPageRuleArgs{
ZoneId: "023e105f4ecef8ad9ca31a8372d0c353",
PageruleId: "023e105f4ecef8ad9ca31a8372d0c353",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var examplePageRule = Cloudflare.GetPageRule.Invoke(new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
PageruleId = "023e105f4ecef8ad9ca31a8372d0c353",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetPageRuleArgs;
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) {
final var examplePageRule = CloudflareFunctions.getPageRule(GetPageRuleArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.pageruleId("023e105f4ecef8ad9ca31a8372d0c353")
.build());
}
}
variables:
examplePageRule:
fn::invoke:
function: cloudflare:getPageRule
arguments:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
pageruleId: 023e105f4ecef8ad9ca31a8372d0c353
Using getPageRule
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getPageRule(args: GetPageRuleArgs, opts?: InvokeOptions): Promise<GetPageRuleResult>
function getPageRuleOutput(args: GetPageRuleOutputArgs, opts?: InvokeOptions): Output<GetPageRuleResult>
def get_page_rule(pagerule_id: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPageRuleResult
def get_page_rule_output(pagerule_id: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPageRuleResult]
func LookupPageRule(ctx *Context, args *LookupPageRuleArgs, opts ...InvokeOption) (*LookupPageRuleResult, error)
func LookupPageRuleOutput(ctx *Context, args *LookupPageRuleOutputArgs, opts ...InvokeOption) LookupPageRuleResultOutput
> Note: This function is named LookupPageRule
in the Go SDK.
public static class GetPageRule
{
public static Task<GetPageRuleResult> InvokeAsync(GetPageRuleArgs args, InvokeOptions? opts = null)
public static Output<GetPageRuleResult> Invoke(GetPageRuleInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPageRuleResult> getPageRule(GetPageRuleArgs args, InvokeOptions options)
public static Output<GetPageRuleResult> getPageRule(GetPageRuleArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getPageRule:getPageRule
arguments:
# arguments dictionary
The following arguments are supported:
- Pagerule
Id string - Identifier
- Zone
Id string - Identifier
- Pagerule
Id string - Identifier
- Zone
Id string - Identifier
- pagerule
Id String - Identifier
- zone
Id String - Identifier
- pagerule
Id string - Identifier
- zone
Id string - Identifier
- pagerule_
id str - Identifier
- zone_
id str - Identifier
- pagerule
Id String - Identifier
- zone
Id String - Identifier
getPageRule Result
The following output properties are available:
- Created
On string - The timestamp of when the Page Rule was created.
- Id string
- Identifier
- Modified
On string - The timestamp of when the Page Rule was last modified.
- Pagerule
Id string - Identifier
- Priority int
- The priority of the rule, used to define which Page Rule is processed
over another. A higher number indicates a higher priority. For example,
if you have a catch-all Page Rule (rule A:
/images/*
) but want a more specific Page Rule to take precedence (rule B:/images/special/*
), specify a higher priority for rule B so it overrides rule A. - Status string
- The status of the Page Rule. Available values: "active", "disabled".
- Zone
Id string - Identifier
- Created
On string - The timestamp of when the Page Rule was created.
- Id string
- Identifier
- Modified
On string - The timestamp of when the Page Rule was last modified.
- Pagerule
Id string - Identifier
- Priority int
- The priority of the rule, used to define which Page Rule is processed
over another. A higher number indicates a higher priority. For example,
if you have a catch-all Page Rule (rule A:
/images/*
) but want a more specific Page Rule to take precedence (rule B:/images/special/*
), specify a higher priority for rule B so it overrides rule A. - Status string
- The status of the Page Rule. Available values: "active", "disabled".
- Zone
Id string - Identifier
- created
On String - The timestamp of when the Page Rule was created.
- id String
- Identifier
- modified
On String - The timestamp of when the Page Rule was last modified.
- pagerule
Id String - Identifier
- priority Integer
- The priority of the rule, used to define which Page Rule is processed
over another. A higher number indicates a higher priority. For example,
if you have a catch-all Page Rule (rule A:
/images/*
) but want a more specific Page Rule to take precedence (rule B:/images/special/*
), specify a higher priority for rule B so it overrides rule A. - status String
- The status of the Page Rule. Available values: "active", "disabled".
- zone
Id String - Identifier
- created
On string - The timestamp of when the Page Rule was created.
- id string
- Identifier
- modified
On string - The timestamp of when the Page Rule was last modified.
- pagerule
Id string - Identifier
- priority number
- The priority of the rule, used to define which Page Rule is processed
over another. A higher number indicates a higher priority. For example,
if you have a catch-all Page Rule (rule A:
/images/*
) but want a more specific Page Rule to take precedence (rule B:/images/special/*
), specify a higher priority for rule B so it overrides rule A. - status string
- The status of the Page Rule. Available values: "active", "disabled".
- zone
Id string - Identifier
- created_
on str - The timestamp of when the Page Rule was created.
- id str
- Identifier
- modified_
on str - The timestamp of when the Page Rule was last modified.
- pagerule_
id str - Identifier
- priority int
- The priority of the rule, used to define which Page Rule is processed
over another. A higher number indicates a higher priority. For example,
if you have a catch-all Page Rule (rule A:
/images/*
) but want a more specific Page Rule to take precedence (rule B:/images/special/*
), specify a higher priority for rule B so it overrides rule A. - status str
- The status of the Page Rule. Available values: "active", "disabled".
- zone_
id str - Identifier
- created
On String - The timestamp of when the Page Rule was created.
- id String
- Identifier
- modified
On String - The timestamp of when the Page Rule was last modified.
- pagerule
Id String - Identifier
- priority Number
- The priority of the rule, used to define which Page Rule is processed
over another. A higher number indicates a higher priority. For example,
if you have a catch-all Page Rule (rule A:
/images/*
) but want a more specific Page Rule to take precedence (rule B:/images/special/*
), specify a higher priority for rule B so it overrides rule A. - status String
- The status of the Page Rule. Available values: "active", "disabled".
- zone
Id String - Identifier
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.