1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getTokenValidationRules
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 exampleTokenValidationRules = cloudflare.getTokenValidationRules({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        ruleId: "4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_token_validation_rules = cloudflare.get_token_validation_rules(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        rule_id="4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7")
    
    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.LookupTokenValidationRules(ctx, &cloudflare.LookupTokenValidationRulesArgs{
    			ZoneId: "023e105f4ecef8ad9ca31a8372d0c353",
    			RuleId: pulumi.StringRef("4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7"),
    		}, 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 exampleTokenValidationRules = Cloudflare.GetTokenValidationRules.Invoke(new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            RuleId = "4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7",
        });
    
    });
    
    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.GetTokenValidationRulesArgs;
    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 exampleTokenValidationRules = CloudflareFunctions.getTokenValidationRules(GetTokenValidationRulesArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .ruleId("4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7")
                .build());
    
        }
    }
    
    variables:
      exampleTokenValidationRules:
        fn::invoke:
          function: cloudflare:getTokenValidationRules
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
            ruleId: 4a7ee8d3-dd63-4ceb-9d5f-c27831854ce7
    

    Using getTokenValidationRules

    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 getTokenValidationRules(args: GetTokenValidationRulesArgs, opts?: InvokeOptions): Promise<GetTokenValidationRulesResult>
    function getTokenValidationRulesOutput(args: GetTokenValidationRulesOutputArgs, opts?: InvokeOptions): Output<GetTokenValidationRulesResult>
    def get_token_validation_rules(filter: Optional[GetTokenValidationRulesFilter] = None,
                                   rule_id: Optional[str] = None,
                                   zone_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetTokenValidationRulesResult
    def get_token_validation_rules_output(filter: Optional[pulumi.Input[GetTokenValidationRulesFilterArgs]] = None,
                                   rule_id: Optional[pulumi.Input[str]] = None,
                                   zone_id: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetTokenValidationRulesResult]
    func LookupTokenValidationRules(ctx *Context, args *LookupTokenValidationRulesArgs, opts ...InvokeOption) (*LookupTokenValidationRulesResult, error)
    func LookupTokenValidationRulesOutput(ctx *Context, args *LookupTokenValidationRulesOutputArgs, opts ...InvokeOption) LookupTokenValidationRulesResultOutput

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

    public static class GetTokenValidationRules 
    {
        public static Task<GetTokenValidationRulesResult> InvokeAsync(GetTokenValidationRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetTokenValidationRulesResult> Invoke(GetTokenValidationRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTokenValidationRulesResult> getTokenValidationRules(GetTokenValidationRulesArgs args, InvokeOptions options)
    public static Output<GetTokenValidationRulesResult> getTokenValidationRules(GetTokenValidationRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getTokenValidationRules:getTokenValidationRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    zoneId String
    Identifier.
    filter Property Map
    ruleId String
    UUID.

    getTokenValidationRules Result

    The following output properties are available:

    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
    LastUpdated string
    Selector GetTokenValidationRulesSelector
    Title string
    ZoneId string
    Identifier.
    Filter GetTokenValidationRulesFilter
    RuleId string
    UUID.
    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
    LastUpdated string
    Selector GetTokenValidationRulesSelector
    Title string
    ZoneId string
    Identifier.
    Filter GetTokenValidationRulesFilter
    RuleId string
    UUID.
    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
    lastUpdated String
    selector GetTokenValidationRulesSelector
    title String
    zoneId String
    Identifier.
    filter GetTokenValidationRulesFilter
    ruleId String
    UUID.
    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
    lastUpdated string
    selector GetTokenValidationRulesSelector
    title string
    zoneId string
    Identifier.
    filter GetTokenValidationRulesFilter
    ruleId string
    UUID.
    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
    last_updated str
    selector GetTokenValidationRulesSelector
    title str
    zone_id str
    Identifier.
    filter GetTokenValidationRulesFilter
    rule_id str
    UUID.
    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
    lastUpdated String
    selector Property Map
    title String
    zoneId String
    Identifier.
    filter Property Map
    ruleId String
    UUID.

    Supporting Types

    GetTokenValidationRulesFilter

    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.
    TokenConfigurations List<string>
    Select rules using any of these token configurations.
    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.
    TokenConfigurations []string
    Select rules using any of these token configurations.
    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.
    tokenConfigurations List<String>
    Select rules using any of these token configurations.
    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.
    tokenConfigurations string[]
    Select rules using any of these token configurations.
    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.
    token_configurations Sequence[str]
    Select rules using any of these token configurations.
    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.
    tokenConfigurations List<String>
    Select rules using any of these token configurations.

    GetTokenValidationRulesSelector

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

    GetTokenValidationRulesSelectorExclude

    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.

    GetTokenValidationRulesSelectorInclude

    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