1. Packages
  2. Incapsula Provider
  3. API Docs
  4. CacheRule
incapsula 3.33.0 published on Wednesday, Apr 30, 2025 by imperva

incapsula.CacheRule

Explore with Pulumi AI

incapsula logo
incapsula 3.33.0 published on Wednesday, Apr 30, 2025 by imperva

    Provides a custom cache rule resource. Enables you to you define specific exceptions to the overall caching settings.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const example_incap_cache_rule = new incapsula.CacheRule("example-incap-cache-rule", {
        siteId: incapsula_site["example-site"].id,
        action: "HTTP_CACHE_MAKE_STATIC",
        filter: "isMobile == Yes",
        enabled: true,
        ttl: 3600,
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    example_incap_cache_rule = incapsula.CacheRule("example-incap-cache-rule",
        site_id=incapsula_site["example-site"]["id"],
        action="HTTP_CACHE_MAKE_STATIC",
        filter="isMobile == Yes",
        enabled=True,
        ttl=3600)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := incapsula.NewCacheRule(ctx, "example-incap-cache-rule", &incapsula.CacheRuleArgs{
    			SiteId:  pulumi.Any(incapsula_site.ExampleSite.Id),
    			Action:  pulumi.String("HTTP_CACHE_MAKE_STATIC"),
    			Filter:  pulumi.String("isMobile == Yes"),
    			Enabled: pulumi.Bool(true),
    			Ttl:     pulumi.Float64(3600),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Incapsula = Pulumi.Incapsula;
    
    return await Deployment.RunAsync(() => 
    {
        var example_incap_cache_rule = new Incapsula.CacheRule("example-incap-cache-rule", new()
        {
            SiteId = incapsula_site.Example_site.Id,
            Action = "HTTP_CACHE_MAKE_STATIC",
            Filter = "isMobile == Yes",
            Enabled = true,
            Ttl = 3600,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.CacheRule;
    import com.pulumi.incapsula.CacheRuleArgs;
    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) {
            var example_incap_cache_rule = new CacheRule("example-incap-cache-rule", CacheRuleArgs.builder()
                .siteId(incapsula_site.example-site().id())
                .action("HTTP_CACHE_MAKE_STATIC")
                .filter("isMobile == Yes")
                .enabled(true)
                .ttl(3600)
                .build());
    
        }
    }
    
    resources:
      example-incap-cache-rule:
        type: incapsula:CacheRule
        properties:
          siteId: ${incapsula_site"example-site"[%!s(MISSING)].id}
          action: HTTP_CACHE_MAKE_STATIC
          filter: isMobile == Yes
          enabled: true
          ttl: 3600
    

    Create CacheRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CacheRule(name: string, args: CacheRuleArgs, opts?: CustomResourceOptions);
    @overload
    def CacheRule(resource_name: str,
                  args: CacheRuleArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def CacheRule(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  action: Optional[str] = None,
                  enabled: Optional[bool] = None,
                  filter: Optional[str] = None,
                  site_id: Optional[str] = None,
                  cache_rule_id: Optional[str] = None,
                  differentiate_by_value: Optional[str] = None,
                  ignored_params: Optional[str] = None,
                  name: Optional[str] = None,
                  text: Optional[str] = None,
                  ttl: Optional[float] = None)
    func NewCacheRule(ctx *Context, name string, args CacheRuleArgs, opts ...ResourceOption) (*CacheRule, error)
    public CacheRule(string name, CacheRuleArgs args, CustomResourceOptions? opts = null)
    public CacheRule(String name, CacheRuleArgs args)
    public CacheRule(String name, CacheRuleArgs args, CustomResourceOptions options)
    
    type: incapsula:CacheRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CacheRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CacheRuleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CacheRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CacheRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CacheRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var cacheRuleResource = new Incapsula.CacheRule("cacheRuleResource", new()
    {
        Action = "string",
        Enabled = false,
        Filter = "string",
        SiteId = "string",
        CacheRuleId = "string",
        DifferentiateByValue = "string",
        IgnoredParams = "string",
        Name = "string",
        Text = "string",
        Ttl = 0,
    });
    
    example, err := incapsula.NewCacheRule(ctx, "cacheRuleResource", &incapsula.CacheRuleArgs{
    	Action:               pulumi.String("string"),
    	Enabled:              pulumi.Bool(false),
    	Filter:               pulumi.String("string"),
    	SiteId:               pulumi.String("string"),
    	CacheRuleId:          pulumi.String("string"),
    	DifferentiateByValue: pulumi.String("string"),
    	IgnoredParams:        pulumi.String("string"),
    	Name:                 pulumi.String("string"),
    	Text:                 pulumi.String("string"),
    	Ttl:                  pulumi.Float64(0),
    })
    
    var cacheRuleResource = new CacheRule("cacheRuleResource", CacheRuleArgs.builder()
        .action("string")
        .enabled(false)
        .filter("string")
        .siteId("string")
        .cacheRuleId("string")
        .differentiateByValue("string")
        .ignoredParams("string")
        .name("string")
        .text("string")
        .ttl(0)
        .build());
    
    cache_rule_resource = incapsula.CacheRule("cacheRuleResource",
        action="string",
        enabled=False,
        filter="string",
        site_id="string",
        cache_rule_id="string",
        differentiate_by_value="string",
        ignored_params="string",
        name="string",
        text="string",
        ttl=0)
    
    const cacheRuleResource = new incapsula.CacheRule("cacheRuleResource", {
        action: "string",
        enabled: false,
        filter: "string",
        siteId: "string",
        cacheRuleId: "string",
        differentiateByValue: "string",
        ignoredParams: "string",
        name: "string",
        text: "string",
        ttl: 0,
    });
    
    type: incapsula:CacheRule
    properties:
        action: string
        cacheRuleId: string
        differentiateByValue: string
        enabled: false
        filter: string
        ignoredParams: string
        name: string
        siteId: string
        text: string
        ttl: 0
    

    CacheRule Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CacheRule resource accepts the following input properties:

    Action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    Enabled bool
    Boolean that specifies if the rule should be enabled.
    Filter string
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    SiteId string
    Numeric identifier of the site to operate on.
    CacheRuleId string
    Unique identifier in the API for the Cache Rule.
    DifferentiateByValue string
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    IgnoredParams string
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    Name string
    Rule name.
    Text string
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    Ttl double
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    Action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    Enabled bool
    Boolean that specifies if the rule should be enabled.
    Filter string
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    SiteId string
    Numeric identifier of the site to operate on.
    CacheRuleId string
    Unique identifier in the API for the Cache Rule.
    DifferentiateByValue string
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    IgnoredParams string
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    Name string
    Rule name.
    Text string
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    Ttl float64
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    action String
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    enabled Boolean
    Boolean that specifies if the rule should be enabled.
    filter String
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    siteId String
    Numeric identifier of the site to operate on.
    cacheRuleId String
    Unique identifier in the API for the Cache Rule.
    differentiateByValue String
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    ignoredParams String
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    name String
    Rule name.
    text String
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    ttl Double
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    enabled boolean
    Boolean that specifies if the rule should be enabled.
    filter string
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    siteId string
    Numeric identifier of the site to operate on.
    cacheRuleId string
    Unique identifier in the API for the Cache Rule.
    differentiateByValue string
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    ignoredParams string
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    name string
    Rule name.
    text string
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    ttl number
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    action str
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    enabled bool
    Boolean that specifies if the rule should be enabled.
    filter str
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    site_id str
    Numeric identifier of the site to operate on.
    cache_rule_id str
    Unique identifier in the API for the Cache Rule.
    differentiate_by_value str
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    ignored_params str
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    name str
    Rule name.
    text str
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    ttl float
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    action String
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    enabled Boolean
    Boolean that specifies if the rule should be enabled.
    filter String
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    siteId String
    Numeric identifier of the site to operate on.
    cacheRuleId String
    Unique identifier in the API for the Cache Rule.
    differentiateByValue String
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    ignoredParams String
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    name String
    Rule name.
    text String
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    ttl Number
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CacheRule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CacheRule Resource

    Get an existing CacheRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CacheRuleState, opts?: CustomResourceOptions): CacheRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            cache_rule_id: Optional[str] = None,
            differentiate_by_value: Optional[str] = None,
            enabled: Optional[bool] = None,
            filter: Optional[str] = None,
            ignored_params: Optional[str] = None,
            name: Optional[str] = None,
            site_id: Optional[str] = None,
            text: Optional[str] = None,
            ttl: Optional[float] = None) -> CacheRule
    func GetCacheRule(ctx *Context, name string, id IDInput, state *CacheRuleState, opts ...ResourceOption) (*CacheRule, error)
    public static CacheRule Get(string name, Input<string> id, CacheRuleState? state, CustomResourceOptions? opts = null)
    public static CacheRule get(String name, Output<String> id, CacheRuleState state, CustomResourceOptions options)
    resources:  _:    type: incapsula:CacheRule    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    CacheRuleId string
    Unique identifier in the API for the Cache Rule.
    DifferentiateByValue string
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    Enabled bool
    Boolean that specifies if the rule should be enabled.
    Filter string
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    IgnoredParams string
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    Name string
    Rule name.
    SiteId string
    Numeric identifier of the site to operate on.
    Text string
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    Ttl double
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    Action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    CacheRuleId string
    Unique identifier in the API for the Cache Rule.
    DifferentiateByValue string
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    Enabled bool
    Boolean that specifies if the rule should be enabled.
    Filter string
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    IgnoredParams string
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    Name string
    Rule name.
    SiteId string
    Numeric identifier of the site to operate on.
    Text string
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    Ttl float64
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    action String
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    cacheRuleId String
    Unique identifier in the API for the Cache Rule.
    differentiateByValue String
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    enabled Boolean
    Boolean that specifies if the rule should be enabled.
    filter String
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    ignoredParams String
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    name String
    Rule name.
    siteId String
    Numeric identifier of the site to operate on.
    text String
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    ttl Double
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    action string
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    cacheRuleId string
    Unique identifier in the API for the Cache Rule.
    differentiateByValue string
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    enabled boolean
    Boolean that specifies if the rule should be enabled.
    filter string
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    ignoredParams string
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    name string
    Rule name.
    siteId string
    Numeric identifier of the site to operate on.
    text string
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    ttl number
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    action str
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    cache_rule_id str
    Unique identifier in the API for the Cache Rule.
    differentiate_by_value str
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    enabled bool
    Boolean that specifies if the rule should be enabled.
    filter str
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    ignored_params str
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    name str
    Rule name.
    site_id str
    Numeric identifier of the site to operate on.
    text str
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    ttl float
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.
    action String
    Rule action. See the detailed descriptions in the API documentation. Possible values: HTTP_CACHE_MAKE_STATIC, HTTP_CACHE_CLIENT_CACHE_CTL, HTTP_CACHE_FORCE_UNCACHEABLE, HTTP_CACHE_ADD_TAG, HTTP_CACHE_DIFFERENTIATE_SSL, HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE, HTTP_CACHE_DIFFERENTIATE_BY_GEO, HTTP_CACHE_IGNORE_PARAMS, HTTP_CACHE_ENRICH_CACHE_KEY, HTTP_CACHE_FORCE_VALIDATION, HTTP_CACHE_IGNORE_AUTH_HEADER.
    cacheRuleId String
    Unique identifier in the API for the Cache Rule.
    differentiateByValue String
    Value to differentiate resources by. Relevant for HTTP_CACHE_DIFFERENTIATE_BY_HEADER, HTTP_CACHE_DIFFERENTIATE_BY_COOKIE and HTTP_CACHE_DIFFERENTIATE_BY_GEO actions.
    enabled Boolean
    Boolean that specifies if the rule should be enabled.
    filter String
    The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
    ignoredParams String
    Parameters to ignore. Relevant for HTTP_CACHE_IGNORE_PARAMS action. An array containing '*' means all parameters are ignored.
    name String
    Rule name.
    siteId String
    Numeric identifier of the site to operate on.
    text String
    Tag name if action is HTTP_CACHE_ADD_TAG. Text to be added to the cache key as suffix if action is HTTP_CACHE_ENRICH_CACHE_KEY.
    ttl Number
    TTL in seconds. Relevant for HTTP_CACHE_MAKE_STATIC and HTTP_CACHE_CLIENT_CACHE_CTL actions.

    Import

    Cache Rule can be imported using the role site_id and rule_id separated by /, e.g.:

    $ pulumi import incapsula:index/cacheRule:CacheRule demo site_id/rule_id
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    incapsula imperva/terraform-provider-incapsula
    License
    Notes
    This Pulumi package is based on the incapsula Terraform Provider.
    incapsula logo
    incapsula 3.33.0 published on Wednesday, Apr 30, 2025 by imperva