Viewing docs for Cloudflare v6.13.0
published on Wednesday, Jan 21, 2026 by Pulumi
published on Wednesday, Jan 21, 2026 by Pulumi
Viewing docs for Cloudflare v6.13.0
published on Wednesday, Jan 21, 2026 by Pulumi
published on Wednesday, Jan 21, 2026 by Pulumi
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleFirewallRule = cloudflare.getFirewallRule({
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
ruleId: "372e67954025e0ba6aaa6d586b9e0b60",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_firewall_rule = cloudflare.get_firewall_rule(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
rule_id="372e67954025e0ba6aaa6d586b9e0b60")
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.LookupFirewallRule(ctx, &cloudflare.LookupFirewallRuleArgs{
ZoneId: "023e105f4ecef8ad9ca31a8372d0c353",
RuleId: pulumi.StringRef("372e67954025e0ba6aaa6d586b9e0b60"),
}, 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 exampleFirewallRule = Cloudflare.GetFirewallRule.Invoke(new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
RuleId = "372e67954025e0ba6aaa6d586b9e0b60",
});
});
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.GetFirewallRuleArgs;
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 exampleFirewallRule = CloudflareFunctions.getFirewallRule(GetFirewallRuleArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.ruleId("372e67954025e0ba6aaa6d586b9e0b60")
.build());
}
}
variables:
exampleFirewallRule:
fn::invoke:
function: cloudflare:getFirewallRule
arguments:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
ruleId: 372e67954025e0ba6aaa6d586b9e0b60
Using getFirewallRule
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 getFirewallRule(args: GetFirewallRuleArgs, opts?: InvokeOptions): Promise<GetFirewallRuleResult>
function getFirewallRuleOutput(args: GetFirewallRuleOutputArgs, opts?: InvokeOptions): Output<GetFirewallRuleResult>def get_firewall_rule(rule_id: Optional[str] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetFirewallRuleResult
def get_firewall_rule_output(rule_id: Optional[pulumi.Input[str]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetFirewallRuleResult]func LookupFirewallRule(ctx *Context, args *LookupFirewallRuleArgs, opts ...InvokeOption) (*LookupFirewallRuleResult, error)
func LookupFirewallRuleOutput(ctx *Context, args *LookupFirewallRuleOutputArgs, opts ...InvokeOption) LookupFirewallRuleResultOutput> Note: This function is named LookupFirewallRule in the Go SDK.
public static class GetFirewallRule
{
public static Task<GetFirewallRuleResult> InvokeAsync(GetFirewallRuleArgs args, InvokeOptions? opts = null)
public static Output<GetFirewallRuleResult> Invoke(GetFirewallRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFirewallRuleResult> getFirewallRule(GetFirewallRuleArgs args, InvokeOptions options)
public static Output<GetFirewallRuleResult> getFirewallRule(GetFirewallRuleArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getFirewallRule:getFirewallRule
arguments:
# arguments dictionaryThe following arguments are supported:
getFirewallRule Result
The following output properties are available:
- Action string
- The action to apply to a matched request. The
logaction is only available on an Enterprise plan. Available values: "block", "challenge", "jschallenge", "managedchallenge", "allow", "log", "bypass". - Description string
- An informative summary of the firewall rule.
- Id string
- The unique identifier of the firewall rule.
- Paused bool
- When true, indicates that the firewall rule is currently paused.
- Priority double
- The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority.
- Products List<string>
- Ref string
- A short reference tag. Allows you to select related firewall rules.
- Zone
Id string - Defines an identifier.
- Rule
Id string - The unique identifier of the firewall rule.
- Action string
- The action to apply to a matched request. The
logaction is only available on an Enterprise plan. Available values: "block", "challenge", "jschallenge", "managedchallenge", "allow", "log", "bypass". - Description string
- An informative summary of the firewall rule.
- Id string
- The unique identifier of the firewall rule.
- Paused bool
- When true, indicates that the firewall rule is currently paused.
- Priority float64
- The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority.
- Products []string
- Ref string
- A short reference tag. Allows you to select related firewall rules.
- Zone
Id string - Defines an identifier.
- Rule
Id string - The unique identifier of the firewall rule.
- action String
- The action to apply to a matched request. The
logaction is only available on an Enterprise plan. Available values: "block", "challenge", "jschallenge", "managedchallenge", "allow", "log", "bypass". - description String
- An informative summary of the firewall rule.
- id String
- The unique identifier of the firewall rule.
- paused Boolean
- When true, indicates that the firewall rule is currently paused.
- priority Double
- The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority.
- products List<String>
- ref String
- A short reference tag. Allows you to select related firewall rules.
- zone
Id String - Defines an identifier.
- rule
Id String - The unique identifier of the firewall rule.
- action string
- The action to apply to a matched request. The
logaction is only available on an Enterprise plan. Available values: "block", "challenge", "jschallenge", "managedchallenge", "allow", "log", "bypass". - description string
- An informative summary of the firewall rule.
- id string
- The unique identifier of the firewall rule.
- paused boolean
- When true, indicates that the firewall rule is currently paused.
- priority number
- The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority.
- products string[]
- ref string
- A short reference tag. Allows you to select related firewall rules.
- zone
Id string - Defines an identifier.
- rule
Id string - The unique identifier of the firewall rule.
- action str
- The action to apply to a matched request. The
logaction is only available on an Enterprise plan. Available values: "block", "challenge", "jschallenge", "managedchallenge", "allow", "log", "bypass". - description str
- An informative summary of the firewall rule.
- id str
- The unique identifier of the firewall rule.
- paused bool
- When true, indicates that the firewall rule is currently paused.
- priority float
- The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority.
- products Sequence[str]
- ref str
- A short reference tag. Allows you to select related firewall rules.
- zone_
id str - Defines an identifier.
- rule_
id str - The unique identifier of the firewall rule.
- action String
- The action to apply to a matched request. The
logaction is only available on an Enterprise plan. Available values: "block", "challenge", "jschallenge", "managedchallenge", "allow", "log", "bypass". - description String
- An informative summary of the firewall rule.
- id String
- The unique identifier of the firewall rule.
- paused Boolean
- When true, indicates that the firewall rule is currently paused.
- priority Number
- The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules without a priority.
- products List<String>
- ref String
- A short reference tag. Allows you to select related firewall rules.
- zone
Id String - Defines an identifier.
- rule
Id String - The unique identifier of the firewall rule.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
Viewing docs for Cloudflare v6.13.0
published on Wednesday, Jan 21, 2026 by Pulumi
published on Wednesday, Jan 21, 2026 by Pulumi
