1. Packages
  2. Incapsula Provider
  3. API Docs
  4. CacheRule
incapsula 3.32.1 published on Monday, Apr 14, 2025 by imperva

incapsula.CacheRule

Explore with Pulumi AI

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,
});
Copy
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)
Copy
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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
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
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. CacheRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. CacheRuleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CacheRuleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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,
});
Copy
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),
})
Copy
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());
Copy
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)
Copy
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,
});
Copy
type: incapsula:CacheRule
properties:
    action: string
    cacheRuleId: string
    differentiateByValue: string
    enabled: false
    filter: string
    ignoredParams: string
    name: string
    siteId: string
    text: string
    ttl: 0
Copy

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 This property is required. 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 This property is required. bool
Boolean that specifies if the rule should be enabled.
Filter This property is required. string
The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
SiteId This property is required. 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 This property is required. 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 This property is required. bool
Boolean that specifies if the rule should be enabled.
Filter This property is required. string
The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
SiteId This property is required. 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 This property is required. 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 This property is required. Boolean
Boolean that specifies if the rule should be enabled.
filter This property is required. String
The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
siteId This property is required. 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 This property is required. 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 This property is required. boolean
Boolean that specifies if the rule should be enabled.
filter This property is required. string
The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
siteId This property is required. 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 This property is required. 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 This property is required. bool
Boolean that specifies if the rule should be enabled.
filter This property is required. str
The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
site_id This property is required. 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 This property is required. 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 This property is required. Boolean
Boolean that specifies if the rule should be enabled.
filter This property is required. String
The filter defines the conditions that trigger the rule action. If left empty, the rule is always run.
siteId This property is required. 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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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
Copy

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.