Cloudflare v6.10.0 published on Thursday, Oct 2, 2025 by Pulumi
cloudflare.getRulesets
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleRulesets = cloudflare.getRulesets({
zoneId: "9f1839b6152d298aca64c4e906b6d074",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_rulesets = cloudflare.get_rulesets(zone_id="9f1839b6152d298aca64c4e906b6d074")
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.LookupRulesets(ctx, &cloudflare.LookupRulesetsArgs{
ZoneId: pulumi.StringRef("9f1839b6152d298aca64c4e906b6d074"),
}, 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 exampleRulesets = Cloudflare.GetRulesets.Invoke(new()
{
ZoneId = "9f1839b6152d298aca64c4e906b6d074",
});
});
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.GetRulesetsArgs;
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 exampleRulesets = CloudflareFunctions.getRulesets(GetRulesetsArgs.builder()
.zoneId("9f1839b6152d298aca64c4e906b6d074")
.build());
}
}
variables:
exampleRulesets:
fn::invoke:
function: cloudflare:getRulesets
arguments:
zoneId: 9f1839b6152d298aca64c4e906b6d074
Using getRulesets
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 getRulesets(args: GetRulesetsArgs, opts?: InvokeOptions): Promise<GetRulesetsResult>
function getRulesetsOutput(args: GetRulesetsOutputArgs, opts?: InvokeOptions): Output<GetRulesetsResult>
def get_rulesets(account_id: Optional[str] = None,
max_items: Optional[int] = None,
zone_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRulesetsResult
def get_rulesets_output(account_id: Optional[pulumi.Input[str]] = None,
max_items: Optional[pulumi.Input[int]] = None,
zone_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRulesetsResult]
func LookupRulesets(ctx *Context, args *LookupRulesetsArgs, opts ...InvokeOption) (*LookupRulesetsResult, error)
func LookupRulesetsOutput(ctx *Context, args *LookupRulesetsOutputArgs, opts ...InvokeOption) LookupRulesetsResultOutput
> Note: This function is named LookupRulesets
in the Go SDK.
public static class GetRulesets
{
public static Task<GetRulesetsResult> InvokeAsync(GetRulesetsArgs args, InvokeOptions? opts = null)
public static Output<GetRulesetsResult> Invoke(GetRulesetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRulesetsResult> getRulesets(GetRulesetsArgs args, InvokeOptions options)
public static Output<GetRulesetsResult> getRulesets(GetRulesetsArgs args, InvokeOptions options)
fn::invoke:
function: cloudflare:index/getRulesets:getRulesets
arguments:
# arguments dictionary
The following arguments are supported:
- account_
id str - The unique ID of the account.
- max_
items int - Maximum number of rulesets to fetch (defaults to 1000).
- zone_
id str - The unique ID of the zone.
getRulesets Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Results
List<Get
Rulesets Result> - A list of rulesets. The returned information will not include the rules in each ruleset.
- Rulesets
List<Get
Rulesets Ruleset> - A list of rulesets. The returned information will not include the rules in each ruleset.
- Account
Id string - The unique ID of the account.
- Max
Items int - Maximum number of rulesets to fetch (defaults to 1000).
- Zone
Id string - The unique ID of the zone.
- Id string
- The provider-assigned unique ID for this managed resource.
- Results
[]Get
Rulesets Result - A list of rulesets. The returned information will not include the rules in each ruleset.
- Rulesets
[]Get
Rulesets Ruleset - A list of rulesets. The returned information will not include the rules in each ruleset.
- Account
Id string - The unique ID of the account.
- Max
Items int - Maximum number of rulesets to fetch (defaults to 1000).
- Zone
Id string - The unique ID of the zone.
- id String
- The provider-assigned unique ID for this managed resource.
- results
List<Get
Rulesets Result> - A list of rulesets. The returned information will not include the rules in each ruleset.
- rulesets
List<Get
Rulesets Ruleset> - A list of rulesets. The returned information will not include the rules in each ruleset.
- account
Id String - The unique ID of the account.
- max
Items Integer - Maximum number of rulesets to fetch (defaults to 1000).
- zone
Id String - The unique ID of the zone.
- id string
- The provider-assigned unique ID for this managed resource.
- results
Get
Rulesets Result[] - A list of rulesets. The returned information will not include the rules in each ruleset.
- rulesets
Get
Rulesets Ruleset[] - A list of rulesets. The returned information will not include the rules in each ruleset.
- account
Id string - The unique ID of the account.
- max
Items number - Maximum number of rulesets to fetch (defaults to 1000).
- zone
Id string - The unique ID of the zone.
- id str
- The provider-assigned unique ID for this managed resource.
- results
Sequence[Get
Rulesets Result] - A list of rulesets. The returned information will not include the rules in each ruleset.
- rulesets
Sequence[Get
Rulesets Ruleset] - A list of rulesets. The returned information will not include the rules in each ruleset.
- account_
id str - The unique ID of the account.
- max_
items int - Maximum number of rulesets to fetch (defaults to 1000).
- zone_
id str - The unique ID of the zone.
- id String
- The provider-assigned unique ID for this managed resource.
- results List<Property Map>
- A list of rulesets. The returned information will not include the rules in each ruleset.
- rulesets List<Property Map>
- A list of rulesets. The returned information will not include the rules in each ruleset.
- account
Id String - The unique ID of the account.
- max
Items Number - Maximum number of rulesets to fetch (defaults to 1000).
- zone
Id String - The unique ID of the zone.
Supporting Types
GetRulesetsResult
- Description string
- An informative description of the ruleset.
- Id string
- The unique ID of the ruleset.
- Kind string
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- Last
Updated string - The timestamp of when the ruleset was last modified.
- Name string
- The human-readable name of the ruleset.
- Phase string
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- Version string
- The version of the ruleset.
- Description string
- An informative description of the ruleset.
- Id string
- The unique ID of the ruleset.
- Kind string
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- Last
Updated string - The timestamp of when the ruleset was last modified.
- Name string
- The human-readable name of the ruleset.
- Phase string
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- Version string
- The version of the ruleset.
- description String
- An informative description of the ruleset.
- id String
- The unique ID of the ruleset.
- kind String
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- last
Updated String - The timestamp of when the ruleset was last modified.
- name String
- The human-readable name of the ruleset.
- phase String
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- version String
- The version of the ruleset.
- description string
- An informative description of the ruleset.
- id string
- The unique ID of the ruleset.
- kind string
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- last
Updated string - The timestamp of when the ruleset was last modified.
- name string
- The human-readable name of the ruleset.
- phase string
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- version string
- The version of the ruleset.
- description str
- An informative description of the ruleset.
- id str
- The unique ID of the ruleset.
- kind str
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- last_
updated str - The timestamp of when the ruleset was last modified.
- name str
- The human-readable name of the ruleset.
- phase str
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- version str
- The version of the ruleset.
- description String
- An informative description of the ruleset.
- id String
- The unique ID of the ruleset.
- kind String
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- last
Updated String - The timestamp of when the ruleset was last modified.
- name String
- The human-readable name of the ruleset.
- phase String
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- version String
- The version of the ruleset.
GetRulesetsRuleset
- Description string
- An informative description of the ruleset.
- Id string
- The unique ID of the ruleset.
- Kind string
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- Last
Updated string - The timestamp of when the ruleset was last modified.
- Name string
- The human-readable name of the ruleset.
- Phase string
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- Version string
- The version of the ruleset.
- Description string
- An informative description of the ruleset.
- Id string
- The unique ID of the ruleset.
- Kind string
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- Last
Updated string - The timestamp of when the ruleset was last modified.
- Name string
- The human-readable name of the ruleset.
- Phase string
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- Version string
- The version of the ruleset.
- description String
- An informative description of the ruleset.
- id String
- The unique ID of the ruleset.
- kind String
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- last
Updated String - The timestamp of when the ruleset was last modified.
- name String
- The human-readable name of the ruleset.
- phase String
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- version String
- The version of the ruleset.
- description string
- An informative description of the ruleset.
- id string
- The unique ID of the ruleset.
- kind string
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- last
Updated string - The timestamp of when the ruleset was last modified.
- name string
- The human-readable name of the ruleset.
- phase string
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- version string
- The version of the ruleset.
- description str
- An informative description of the ruleset.
- id str
- The unique ID of the ruleset.
- kind str
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- last_
updated str - The timestamp of when the ruleset was last modified.
- name str
- The human-readable name of the ruleset.
- phase str
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- version str
- The version of the ruleset.
- description String
- An informative description of the ruleset.
- id String
- The unique ID of the ruleset.
- kind String
- The kind of the ruleset. Available values: "managed", "custom", "root", "zone".
- last
Updated String - The timestamp of when the ruleset was last modified.
- name String
- The human-readable name of the ruleset.
- phase String
- The phase of the ruleset. Available values: "ddosl4", "ddosl7", "httpconfigsettings", "httpcustomerrors", "httplogcustomfields", "httpratelimit", "httprequestcachesettings", "httprequestdynamicredirect", "httprequestfirewallcustom", "httprequestfirewallmanaged", "httprequestlatetransform", "httprequestorigin", "httprequestredirect", "httprequestsanitize", "httprequestsbfm", "httprequesttransform", "httpresponsecompression", "httpresponsefirewallmanaged", "httpresponseheaderstransform", "magictransit", "magictransitidsmanaged", "magictransitmanaged", "magictransit_ratelimit".
- version String
- The version of the ruleset.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.