1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getTokenValidationRulesList
Cloudflare v6.12.0 published on Wednesday, Dec 24, 2025 by Pulumi
cloudflare logo
Cloudflare v6.12.0 published on Wednesday, Dec 24, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleTokenValidationRulesList = cloudflare.getTokenValidationRulesList({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        id: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
        action: "log",
        enabled: true,
        host: "www.example.com",
        hostname: "www.example.com",
        ruleId: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
        tokenConfigurations: ["f174e90a-fafe-4643-bbbc-4a0ed4fc8415"],
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_token_validation_rules_list = cloudflare.get_token_validation_rules_list(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
        action="log",
        enabled=True,
        host="www.example.com",
        hostname="www.example.com",
        rule_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
        token_configurations=["f174e90a-fafe-4643-bbbc-4a0ed4fc8415"])
    
    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.LookupTokenValidationRulesList(ctx, &cloudflare.LookupTokenValidationRulesListArgs{
    			ZoneId:   "023e105f4ecef8ad9ca31a8372d0c353",
    			Id:       pulumi.StringRef("f174e90a-fafe-4643-bbbc-4a0ed4fc8415"),
    			Action:   pulumi.StringRef("log"),
    			Enabled:  pulumi.BoolRef(true),
    			Host:     pulumi.StringRef("www.example.com"),
    			Hostname: pulumi.StringRef("www.example.com"),
    			RuleId:   pulumi.StringRef("f174e90a-fafe-4643-bbbc-4a0ed4fc8415"),
    			TokenConfigurations: []string{
    				"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
    			},
    		}, 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 exampleTokenValidationRulesList = Cloudflare.GetTokenValidationRulesList.Invoke(new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            Id = "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
            Action = "log",
            Enabled = true,
            Host = "www.example.com",
            Hostname = "www.example.com",
            RuleId = "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
            TokenConfigurations = new[]
            {
                "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
            },
        });
    
    });
    
    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.GetTokenValidationRulesListArgs;
    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 exampleTokenValidationRulesList = CloudflareFunctions.getTokenValidationRulesList(GetTokenValidationRulesListArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .id("f174e90a-fafe-4643-bbbc-4a0ed4fc8415")
                .action("log")
                .enabled(true)
                .host("www.example.com")
                .hostname("www.example.com")
                .ruleId("f174e90a-fafe-4643-bbbc-4a0ed4fc8415")
                .tokenConfigurations("f174e90a-fafe-4643-bbbc-4a0ed4fc8415")
                .build());
    
        }
    }
    
    variables:
      exampleTokenValidationRulesList:
        fn::invoke:
          function: cloudflare:getTokenValidationRulesList
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
            id: f174e90a-fafe-4643-bbbc-4a0ed4fc8415
            action: log
            enabled: true
            host: www.example.com
            hostname: www.example.com
            ruleId: f174e90a-fafe-4643-bbbc-4a0ed4fc8415
            tokenConfigurations:
              - f174e90a-fafe-4643-bbbc-4a0ed4fc8415
    

    Using getTokenValidationRulesList

    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 getTokenValidationRulesList(args: GetTokenValidationRulesListArgs, opts?: InvokeOptions): Promise<GetTokenValidationRulesListResult>
    function getTokenValidationRulesListOutput(args: GetTokenValidationRulesListOutputArgs, opts?: InvokeOptions): Output<GetTokenValidationRulesListResult>
    def get_token_validation_rules_list(action: Optional[str] = None,
                                        enabled: Optional[bool] = None,
                                        host: Optional[str] = None,
                                        hostname: Optional[str] = None,
                                        id: Optional[str] = None,
                                        max_items: Optional[int] = None,
                                        rule_id: Optional[str] = None,
                                        token_configurations: Optional[Sequence[str]] = None,
                                        zone_id: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetTokenValidationRulesListResult
    def get_token_validation_rules_list_output(action: Optional[pulumi.Input[str]] = None,
                                        enabled: Optional[pulumi.Input[bool]] = None,
                                        host: Optional[pulumi.Input[str]] = None,
                                        hostname: Optional[pulumi.Input[str]] = None,
                                        id: Optional[pulumi.Input[str]] = None,
                                        max_items: Optional[pulumi.Input[int]] = None,
                                        rule_id: Optional[pulumi.Input[str]] = None,
                                        token_configurations: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                        zone_id: Optional[pulumi.Input[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetTokenValidationRulesListResult]
    func LookupTokenValidationRulesList(ctx *Context, args *LookupTokenValidationRulesListArgs, opts ...InvokeOption) (*LookupTokenValidationRulesListResult, error)
    func LookupTokenValidationRulesListOutput(ctx *Context, args *LookupTokenValidationRulesListOutputArgs, opts ...InvokeOption) LookupTokenValidationRulesListResultOutput

    > Note: This function is named LookupTokenValidationRulesList in the Go SDK.

    public static class GetTokenValidationRulesList 
    {
        public static Task<GetTokenValidationRulesListResult> InvokeAsync(GetTokenValidationRulesListArgs args, InvokeOptions? opts = null)
        public static Output<GetTokenValidationRulesListResult> Invoke(GetTokenValidationRulesListInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTokenValidationRulesListResult> getTokenValidationRulesList(GetTokenValidationRulesListArgs args, InvokeOptions options)
    public static Output<GetTokenValidationRulesListResult> getTokenValidationRulesList(GetTokenValidationRulesListArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getTokenValidationRulesList:getTokenValidationRulesList
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    Identifier.
    Action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    Enabled bool
    Toggle rule on or off.
    Host string
    Select rules with this host in include.
    Hostname string
    Select rules with this host in include.
    Id string
    Select rules with these IDs.
    MaxItems int
    Max items to fetch, default: 1000
    RuleId string
    Select rules with these IDs.
    TokenConfigurations List<string>
    Select rules using any of these token configurations.
    ZoneId string
    Identifier.
    Action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    Enabled bool
    Toggle rule on or off.
    Host string
    Select rules with this host in include.
    Hostname string
    Select rules with this host in include.
    Id string
    Select rules with these IDs.
    MaxItems int
    Max items to fetch, default: 1000
    RuleId string
    Select rules with these IDs.
    TokenConfigurations []string
    Select rules using any of these token configurations.
    zoneId String
    Identifier.
    action String
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    enabled Boolean
    Toggle rule on or off.
    host String
    Select rules with this host in include.
    hostname String
    Select rules with this host in include.
    id String
    Select rules with these IDs.
    maxItems Integer
    Max items to fetch, default: 1000
    ruleId String
    Select rules with these IDs.
    tokenConfigurations List<String>
    Select rules using any of these token configurations.
    zoneId string
    Identifier.
    action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    enabled boolean
    Toggle rule on or off.
    host string
    Select rules with this host in include.
    hostname string
    Select rules with this host in include.
    id string
    Select rules with these IDs.
    maxItems number
    Max items to fetch, default: 1000
    ruleId string
    Select rules with these IDs.
    tokenConfigurations string[]
    Select rules using any of these token configurations.
    zone_id str
    Identifier.
    action str
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    enabled bool
    Toggle rule on or off.
    host str
    Select rules with this host in include.
    hostname str
    Select rules with this host in include.
    id str
    Select rules with these IDs.
    max_items int
    Max items to fetch, default: 1000
    rule_id str
    Select rules with these IDs.
    token_configurations Sequence[str]
    Select rules using any of these token configurations.
    zoneId String
    Identifier.
    action String
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    enabled Boolean
    Toggle rule on or off.
    host String
    Select rules with this host in include.
    hostname String
    Select rules with this host in include.
    id String
    Select rules with these IDs.
    maxItems Number
    Max items to fetch, default: 1000
    ruleId String
    Select rules with these IDs.
    tokenConfigurations List<String>
    Select rules using any of these token configurations.

    getTokenValidationRulesList Result

    The following output properties are available:

    Results List<GetTokenValidationRulesListResult>
    The items returned by the data source
    ZoneId string
    Identifier.
    Action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    Enabled bool
    Toggle rule on or off.
    Host string
    Select rules with this host in include.
    Hostname string
    Select rules with this host in include.
    Id string
    Select rules with these IDs.
    MaxItems int
    Max items to fetch, default: 1000
    RuleId string
    Select rules with these IDs.
    TokenConfigurations List<string>
    Select rules using any of these token configurations.
    Results []GetTokenValidationRulesListResult
    The items returned by the data source
    ZoneId string
    Identifier.
    Action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    Enabled bool
    Toggle rule on or off.
    Host string
    Select rules with this host in include.
    Hostname string
    Select rules with this host in include.
    Id string
    Select rules with these IDs.
    MaxItems int
    Max items to fetch, default: 1000
    RuleId string
    Select rules with these IDs.
    TokenConfigurations []string
    Select rules using any of these token configurations.
    results List<GetTokenValidationRulesListResult>
    The items returned by the data source
    zoneId String
    Identifier.
    action String
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    enabled Boolean
    Toggle rule on or off.
    host String
    Select rules with this host in include.
    hostname String
    Select rules with this host in include.
    id String
    Select rules with these IDs.
    maxItems Integer
    Max items to fetch, default: 1000
    ruleId String
    Select rules with these IDs.
    tokenConfigurations List<String>
    Select rules using any of these token configurations.
    results GetTokenValidationRulesListResult[]
    The items returned by the data source
    zoneId string
    Identifier.
    action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    enabled boolean
    Toggle rule on or off.
    host string
    Select rules with this host in include.
    hostname string
    Select rules with this host in include.
    id string
    Select rules with these IDs.
    maxItems number
    Max items to fetch, default: 1000
    ruleId string
    Select rules with these IDs.
    tokenConfigurations string[]
    Select rules using any of these token configurations.
    results Sequence[GetTokenValidationRulesListResult]
    The items returned by the data source
    zone_id str
    Identifier.
    action str
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    enabled bool
    Toggle rule on or off.
    host str
    Select rules with this host in include.
    hostname str
    Select rules with this host in include.
    id str
    Select rules with these IDs.
    max_items int
    Max items to fetch, default: 1000
    rule_id str
    Select rules with these IDs.
    token_configurations Sequence[str]
    Select rules using any of these token configurations.
    results List<Property Map>
    The items returned by the data source
    zoneId String
    Identifier.
    action String
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    enabled Boolean
    Toggle rule on or off.
    host String
    Select rules with this host in include.
    hostname String
    Select rules with this host in include.
    id String
    Select rules with these IDs.
    maxItems Number
    Max items to fetch, default: 1000
    ruleId String
    Select rules with these IDs.
    tokenConfigurations List<String>
    Select rules using any of these token configurations.

    Supporting Types

    GetTokenValidationRulesListResult

    Action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    CreatedAt string
    Description string
    A human-readable description that gives more details than title.
    Enabled bool
    Toggle rule on or off.
    Expression string
    Rule expression. Requests that fail to match this expression will be subject to action.
    Id string
    Select rules with these IDs.
    LastUpdated string
    Selector GetTokenValidationRulesListResultSelector

    Select operations covered by this rule.

    For details on selectors, see the Cloudflare Docs.

    Title string
    A human-readable name for the rule.
    Action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    CreatedAt string
    Description string
    A human-readable description that gives more details than title.
    Enabled bool
    Toggle rule on or off.
    Expression string
    Rule expression. Requests that fail to match this expression will be subject to action.
    Id string
    Select rules with these IDs.
    LastUpdated string
    Selector GetTokenValidationRulesListResultSelector

    Select operations covered by this rule.

    For details on selectors, see the Cloudflare Docs.

    Title string
    A human-readable name for the rule.
    action String
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    createdAt String
    description String
    A human-readable description that gives more details than title.
    enabled Boolean
    Toggle rule on or off.
    expression String
    Rule expression. Requests that fail to match this expression will be subject to action.
    id String
    Select rules with these IDs.
    lastUpdated String
    selector GetTokenValidationRulesListResultSelector

    Select operations covered by this rule.

    For details on selectors, see the Cloudflare Docs.

    title String
    A human-readable name for the rule.
    action string
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    createdAt string
    description string
    A human-readable description that gives more details than title.
    enabled boolean
    Toggle rule on or off.
    expression string
    Rule expression. Requests that fail to match this expression will be subject to action.
    id string
    Select rules with these IDs.
    lastUpdated string
    selector GetTokenValidationRulesListResultSelector

    Select operations covered by this rule.

    For details on selectors, see the Cloudflare Docs.

    title string
    A human-readable name for the rule.
    action str
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    created_at str
    description str
    A human-readable description that gives more details than title.
    enabled bool
    Toggle rule on or off.
    expression str
    Rule expression. Requests that fail to match this expression will be subject to action.
    id str
    Select rules with these IDs.
    last_updated str
    selector GetTokenValidationRulesListResultSelector

    Select operations covered by this rule.

    For details on selectors, see the Cloudflare Docs.

    title str
    A human-readable name for the rule.
    action String
    Action to take on requests that match operations included in selector and fail expression. Available values: "log", "block".
    createdAt String
    description String
    A human-readable description that gives more details than title.
    enabled Boolean
    Toggle rule on or off.
    expression String
    Rule expression. Requests that fail to match this expression will be subject to action.
    id String
    Select rules with these IDs.
    lastUpdated String
    selector Property Map

    Select operations covered by this rule.

    For details on selectors, see the Cloudflare Docs.

    title String
    A human-readable name for the rule.

    GetTokenValidationRulesListResultSelector

    Excludes List<GetTokenValidationRulesListResultSelectorExclude>
    Ignore operations that were otherwise included by include.
    Includes List<GetTokenValidationRulesListResultSelectorInclude>
    Select all matching operations.
    Excludes []GetTokenValidationRulesListResultSelectorExclude
    Ignore operations that were otherwise included by include.
    Includes []GetTokenValidationRulesListResultSelectorInclude
    Select all matching operations.
    excludes List<GetTokenValidationRulesListResultSelectorExclude>
    Ignore operations that were otherwise included by include.
    includes List<GetTokenValidationRulesListResultSelectorInclude>
    Select all matching operations.
    excludes GetTokenValidationRulesListResultSelectorExclude[]
    Ignore operations that were otherwise included by include.
    includes GetTokenValidationRulesListResultSelectorInclude[]
    Select all matching operations.
    excludes Sequence[GetTokenValidationRulesListResultSelectorExclude]
    Ignore operations that were otherwise included by include.
    includes Sequence[GetTokenValidationRulesListResultSelectorInclude]
    Select all matching operations.
    excludes List<Property Map>
    Ignore operations that were otherwise included by include.
    includes List<Property Map>
    Select all matching operations.

    GetTokenValidationRulesListResultSelectorExclude

    OperationIds List<string>
    Excluded operation IDs.
    OperationIds []string
    Excluded operation IDs.
    operationIds List<String>
    Excluded operation IDs.
    operationIds string[]
    Excluded operation IDs.
    operation_ids Sequence[str]
    Excluded operation IDs.
    operationIds List<String>
    Excluded operation IDs.

    GetTokenValidationRulesListResultSelectorInclude

    Hosts List<string>
    Included hostnames.
    Hosts []string
    Included hostnames.
    hosts List<String>
    Included hostnames.
    hosts string[]
    Included hostnames.
    hosts Sequence[str]
    Included hostnames.
    hosts List<String>
    Included hostnames.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.12.0 published on Wednesday, Dec 24, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate