incapsula.SiteCacheConfiguration
Explore with Pulumi AI
Configure content caching for your website.
Note: This resource is designed to work with sites represented by the “incapsula.SiteV3” resource, and cannot be used together in the same configuration with the “incapsula.Site” resource.
Example Usage
Basic Usage - Site Cache Configuration
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const exampleSiteCacheConfiguration = new incapsula.SiteCacheConfiguration("exampleSiteCacheConfiguration", {
siteId: incapsula_site_v3["example-site-v3"].id,
clientComplyNoCache: true,
clientEnableClientSideCaching: true,
clientSendAgeHeader: true,
keyComplyVary: true,
keyUniteNakedFullCache: true,
modeHttps: "include_all_resources",
modeLevel: "standard",
modeTime: 1000,
responseCache300x: true,
responseCache404Enabled: true,
responseCache404Time: 60,
responseCacheEmptyResponses: true,
responseCacheHttp10Responses: true,
responseCacheResponseHeaderMode: "custom",
responseCacheResponseHeaders: [
"Access-Control-Allow-Origin",
"Foo-Bar-Header",
],
responseCacheShield: true,
responseStaleContentMode: "custom",
responseStaleContentTime: 1000,
responseTagResponseHeader: "Example-Tag-Value-Header",
ttlPreferLastModified: true,
ttlUseShortestCaching: true,
});
import pulumi
import pulumi_incapsula as incapsula
example_site_cache_configuration = incapsula.SiteCacheConfiguration("exampleSiteCacheConfiguration",
site_id=incapsula_site_v3["example-site-v3"]["id"],
client_comply_no_cache=True,
client_enable_client_side_caching=True,
client_send_age_header=True,
key_comply_vary=True,
key_unite_naked_full_cache=True,
mode_https="include_all_resources",
mode_level="standard",
mode_time=1000,
response_cache300x=True,
response_cache404_enabled=True,
response_cache404_time=60,
response_cache_empty_responses=True,
response_cache_http10_responses=True,
response_cache_response_header_mode="custom",
response_cache_response_headers=[
"Access-Control-Allow-Origin",
"Foo-Bar-Header",
],
response_cache_shield=True,
response_stale_content_mode="custom",
response_stale_content_time=1000,
response_tag_response_header="Example-Tag-Value-Header",
ttl_prefer_last_modified=True,
ttl_use_shortest_caching=True)
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.NewSiteCacheConfiguration(ctx, "exampleSiteCacheConfiguration", &incapsula.SiteCacheConfigurationArgs{
SiteId: pulumi.Any(incapsula_site_v3.ExampleSiteV3.Id),
ClientComplyNoCache: pulumi.Bool(true),
ClientEnableClientSideCaching: pulumi.Bool(true),
ClientSendAgeHeader: pulumi.Bool(true),
KeyComplyVary: pulumi.Bool(true),
KeyUniteNakedFullCache: pulumi.Bool(true),
ModeHttps: pulumi.String("include_all_resources"),
ModeLevel: pulumi.String("standard"),
ModeTime: pulumi.Float64(1000),
ResponseCache300x: pulumi.Bool(true),
ResponseCache404Enabled: pulumi.Bool(true),
ResponseCache404Time: pulumi.Float64(60),
ResponseCacheEmptyResponses: pulumi.Bool(true),
ResponseCacheHttp10Responses: pulumi.Bool(true),
ResponseCacheResponseHeaderMode: pulumi.String("custom"),
ResponseCacheResponseHeaders: pulumi.StringArray{
pulumi.String("Access-Control-Allow-Origin"),
pulumi.String("Foo-Bar-Header"),
},
ResponseCacheShield: pulumi.Bool(true),
ResponseStaleContentMode: pulumi.String("custom"),
ResponseStaleContentTime: pulumi.Float64(1000),
ResponseTagResponseHeader: pulumi.String("Example-Tag-Value-Header"),
TtlPreferLastModified: pulumi.Bool(true),
TtlUseShortestCaching: pulumi.Bool(true),
})
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 exampleSiteCacheConfiguration = new Incapsula.SiteCacheConfiguration("exampleSiteCacheConfiguration", new()
{
SiteId = incapsula_site_v3.Example_site_v3.Id,
ClientComplyNoCache = true,
ClientEnableClientSideCaching = true,
ClientSendAgeHeader = true,
KeyComplyVary = true,
KeyUniteNakedFullCache = true,
ModeHttps = "include_all_resources",
ModeLevel = "standard",
ModeTime = 1000,
ResponseCache300x = true,
ResponseCache404Enabled = true,
ResponseCache404Time = 60,
ResponseCacheEmptyResponses = true,
ResponseCacheHttp10Responses = true,
ResponseCacheResponseHeaderMode = "custom",
ResponseCacheResponseHeaders = new[]
{
"Access-Control-Allow-Origin",
"Foo-Bar-Header",
},
ResponseCacheShield = true,
ResponseStaleContentMode = "custom",
ResponseStaleContentTime = 1000,
ResponseTagResponseHeader = "Example-Tag-Value-Header",
TtlPreferLastModified = true,
TtlUseShortestCaching = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.SiteCacheConfiguration;
import com.pulumi.incapsula.SiteCacheConfigurationArgs;
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 exampleSiteCacheConfiguration = new SiteCacheConfiguration("exampleSiteCacheConfiguration", SiteCacheConfigurationArgs.builder()
.siteId(incapsula_site_v3.example-site-v3().id())
.clientComplyNoCache(true)
.clientEnableClientSideCaching(true)
.clientSendAgeHeader(true)
.keyComplyVary(true)
.keyUniteNakedFullCache(true)
.modeHttps("include_all_resources")
.modeLevel("standard")
.modeTime(1000)
.responseCache300x(true)
.responseCache404Enabled(true)
.responseCache404Time(60)
.responseCacheEmptyResponses(true)
.responseCacheHttp10Responses(true)
.responseCacheResponseHeaderMode("custom")
.responseCacheResponseHeaders(
"Access-Control-Allow-Origin",
"Foo-Bar-Header")
.responseCacheShield(true)
.responseStaleContentMode("custom")
.responseStaleContentTime(1000)
.responseTagResponseHeader("Example-Tag-Value-Header")
.ttlPreferLastModified(true)
.ttlUseShortestCaching(true)
.build());
}
}
resources:
exampleSiteCacheConfiguration:
type: incapsula:SiteCacheConfiguration
properties:
siteId: ${incapsula_site_v3"example-site-v3"[%!s(MISSING)].id}
clientComplyNoCache: true
clientEnableClientSideCaching: true
clientSendAgeHeader: true
keyComplyVary: true
keyUniteNakedFullCache: true
modeHttps: include_all_resources
modeLevel: standard
modeTime: 1000
responseCache300x: true
responseCache404Enabled: true
responseCache404Time: 60
responseCacheEmptyResponses: true
responseCacheHttp10Responses: true
responseCacheResponseHeaderMode: custom
responseCacheResponseHeaders:
- Access-Control-Allow-Origin
- Foo-Bar-Header
responseCacheShield: true
responseStaleContentMode: custom
responseStaleContentTime: 1000
responseTagResponseHeader: Example-Tag-Value-Header
ttlPreferLastModified: true
ttlUseShortestCaching: true
Create SiteCacheConfiguration Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SiteCacheConfiguration(name: string, args: SiteCacheConfigurationArgs, opts?: CustomResourceOptions);
@overload
def SiteCacheConfiguration(resource_name: str,
args: SiteCacheConfigurationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SiteCacheConfiguration(resource_name: str,
opts: Optional[ResourceOptions] = None,
site_id: Optional[float] = None,
response_cache404_time: Optional[float] = None,
response_cache_http10_responses: Optional[bool] = None,
key_comply_vary: Optional[bool] = None,
key_unite_naked_full_cache: Optional[bool] = None,
mode_https: Optional[str] = None,
mode_level: Optional[str] = None,
mode_time: Optional[float] = None,
response_cache300x: Optional[bool] = None,
response_cache404_enabled: Optional[bool] = None,
response_cache_response_header_mode: Optional[str] = None,
client_send_age_header: Optional[bool] = None,
response_cache_empty_responses: Optional[bool] = None,
client_comply_no_cache: Optional[bool] = None,
response_cache_response_headers: Optional[Sequence[str]] = None,
response_cache_shield: Optional[bool] = None,
response_stale_content_mode: Optional[str] = None,
response_stale_content_time: Optional[float] = None,
response_tag_response_header: Optional[str] = None,
site_cache_configuration_id: Optional[str] = None,
client_enable_client_side_caching: Optional[bool] = None,
ttl_prefer_last_modified: Optional[bool] = None,
ttl_use_shortest_caching: Optional[bool] = None)
func NewSiteCacheConfiguration(ctx *Context, name string, args SiteCacheConfigurationArgs, opts ...ResourceOption) (*SiteCacheConfiguration, error)
public SiteCacheConfiguration(string name, SiteCacheConfigurationArgs args, CustomResourceOptions? opts = null)
public SiteCacheConfiguration(String name, SiteCacheConfigurationArgs args)
public SiteCacheConfiguration(String name, SiteCacheConfigurationArgs args, CustomResourceOptions options)
type: incapsula:SiteCacheConfiguration
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 SiteCacheConfigurationArgs
- 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 SiteCacheConfigurationArgs
- 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 SiteCacheConfigurationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SiteCacheConfigurationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SiteCacheConfigurationArgs
- 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 siteCacheConfigurationResource = new Incapsula.SiteCacheConfiguration("siteCacheConfigurationResource", new()
{
SiteId = 0,
ResponseCache404Time = 0,
ResponseCacheHttp10Responses = false,
KeyComplyVary = false,
KeyUniteNakedFullCache = false,
ModeHttps = "string",
ModeLevel = "string",
ModeTime = 0,
ResponseCache300x = false,
ResponseCache404Enabled = false,
ResponseCacheResponseHeaderMode = "string",
ClientSendAgeHeader = false,
ResponseCacheEmptyResponses = false,
ClientComplyNoCache = false,
ResponseCacheResponseHeaders = new[]
{
"string",
},
ResponseCacheShield = false,
ResponseStaleContentMode = "string",
ResponseStaleContentTime = 0,
ResponseTagResponseHeader = "string",
SiteCacheConfigurationId = "string",
ClientEnableClientSideCaching = false,
TtlPreferLastModified = false,
TtlUseShortestCaching = false,
});
example, err := incapsula.NewSiteCacheConfiguration(ctx, "siteCacheConfigurationResource", &incapsula.SiteCacheConfigurationArgs{
SiteId: pulumi.Float64(0),
ResponseCache404Time: pulumi.Float64(0),
ResponseCacheHttp10Responses: pulumi.Bool(false),
KeyComplyVary: pulumi.Bool(false),
KeyUniteNakedFullCache: pulumi.Bool(false),
ModeHttps: pulumi.String("string"),
ModeLevel: pulumi.String("string"),
ModeTime: pulumi.Float64(0),
ResponseCache300x: pulumi.Bool(false),
ResponseCache404Enabled: pulumi.Bool(false),
ResponseCacheResponseHeaderMode: pulumi.String("string"),
ClientSendAgeHeader: pulumi.Bool(false),
ResponseCacheEmptyResponses: pulumi.Bool(false),
ClientComplyNoCache: pulumi.Bool(false),
ResponseCacheResponseHeaders: pulumi.StringArray{
pulumi.String("string"),
},
ResponseCacheShield: pulumi.Bool(false),
ResponseStaleContentMode: pulumi.String("string"),
ResponseStaleContentTime: pulumi.Float64(0),
ResponseTagResponseHeader: pulumi.String("string"),
SiteCacheConfigurationId: pulumi.String("string"),
ClientEnableClientSideCaching: pulumi.Bool(false),
TtlPreferLastModified: pulumi.Bool(false),
TtlUseShortestCaching: pulumi.Bool(false),
})
var siteCacheConfigurationResource = new SiteCacheConfiguration("siteCacheConfigurationResource", SiteCacheConfigurationArgs.builder()
.siteId(0)
.responseCache404Time(0)
.responseCacheHttp10Responses(false)
.keyComplyVary(false)
.keyUniteNakedFullCache(false)
.modeHttps("string")
.modeLevel("string")
.modeTime(0)
.responseCache300x(false)
.responseCache404Enabled(false)
.responseCacheResponseHeaderMode("string")
.clientSendAgeHeader(false)
.responseCacheEmptyResponses(false)
.clientComplyNoCache(false)
.responseCacheResponseHeaders("string")
.responseCacheShield(false)
.responseStaleContentMode("string")
.responseStaleContentTime(0)
.responseTagResponseHeader("string")
.siteCacheConfigurationId("string")
.clientEnableClientSideCaching(false)
.ttlPreferLastModified(false)
.ttlUseShortestCaching(false)
.build());
site_cache_configuration_resource = incapsula.SiteCacheConfiguration("siteCacheConfigurationResource",
site_id=0,
response_cache404_time=0,
response_cache_http10_responses=False,
key_comply_vary=False,
key_unite_naked_full_cache=False,
mode_https="string",
mode_level="string",
mode_time=0,
response_cache300x=False,
response_cache404_enabled=False,
response_cache_response_header_mode="string",
client_send_age_header=False,
response_cache_empty_responses=False,
client_comply_no_cache=False,
response_cache_response_headers=["string"],
response_cache_shield=False,
response_stale_content_mode="string",
response_stale_content_time=0,
response_tag_response_header="string",
site_cache_configuration_id="string",
client_enable_client_side_caching=False,
ttl_prefer_last_modified=False,
ttl_use_shortest_caching=False)
const siteCacheConfigurationResource = new incapsula.SiteCacheConfiguration("siteCacheConfigurationResource", {
siteId: 0,
responseCache404Time: 0,
responseCacheHttp10Responses: false,
keyComplyVary: false,
keyUniteNakedFullCache: false,
modeHttps: "string",
modeLevel: "string",
modeTime: 0,
responseCache300x: false,
responseCache404Enabled: false,
responseCacheResponseHeaderMode: "string",
clientSendAgeHeader: false,
responseCacheEmptyResponses: false,
clientComplyNoCache: false,
responseCacheResponseHeaders: ["string"],
responseCacheShield: false,
responseStaleContentMode: "string",
responseStaleContentTime: 0,
responseTagResponseHeader: "string",
siteCacheConfigurationId: "string",
clientEnableClientSideCaching: false,
ttlPreferLastModified: false,
ttlUseShortestCaching: false,
});
type: incapsula:SiteCacheConfiguration
properties:
clientComplyNoCache: false
clientEnableClientSideCaching: false
clientSendAgeHeader: false
keyComplyVary: false
keyUniteNakedFullCache: false
modeHttps: string
modeLevel: string
modeTime: 0
responseCache300x: false
responseCache404Enabled: false
responseCache404Time: 0
responseCacheEmptyResponses: false
responseCacheHttp10Responses: false
responseCacheResponseHeaderMode: string
responseCacheResponseHeaders:
- string
responseCacheShield: false
responseStaleContentMode: string
responseStaleContentTime: 0
responseTagResponseHeader: string
siteCacheConfigurationId: string
siteId: 0
ttlPreferLastModified: false
ttlUseShortestCaching: false
SiteCacheConfiguration 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 SiteCacheConfiguration resource accepts the following input properties:
- Site
Id double - Numeric identifier of the site to operate on.
- Client
Comply boolNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- Client
Enable boolClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- Client
Send boolAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- Key
Comply boolVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- Key
Unite boolNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- Mode
Https string - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- Mode
Level string - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- Mode
Time double - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - Response
Cache300x bool - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- Response
Cache404Enabled bool - Whether or not to cache 404 responses. Default:
false
- Response
Cache404Time double - The time in seconds to cache 404 responses. Value should be divisible by 60.
- Response
Cache boolEmpty Responses - Cache responses that don’t have a message body. Default:
false
- Response
Cache boolHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- Response
Cache stringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- Response
Cache List<string>Response Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - Response
Cache boolShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- Response
Stale stringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- Response
Stale doubleContent Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - Response
Tag stringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- Site
Cache stringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- Ttl
Prefer boolLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- Ttl
Use boolShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- Site
Id float64 - Numeric identifier of the site to operate on.
- Client
Comply boolNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- Client
Enable boolClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- Client
Send boolAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- Key
Comply boolVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- Key
Unite boolNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- Mode
Https string - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- Mode
Level string - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- Mode
Time float64 - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - Response
Cache300x bool - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- Response
Cache404Enabled bool - Whether or not to cache 404 responses. Default:
false
- Response
Cache404Time float64 - The time in seconds to cache 404 responses. Value should be divisible by 60.
- Response
Cache boolEmpty Responses - Cache responses that don’t have a message body. Default:
false
- Response
Cache boolHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- Response
Cache stringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- Response
Cache []stringResponse Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - Response
Cache boolShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- Response
Stale stringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- Response
Stale float64Content Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - Response
Tag stringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- Site
Cache stringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- Ttl
Prefer boolLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- Ttl
Use boolShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- site
Id Double - Numeric identifier of the site to operate on.
- client
Comply BooleanNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- client
Enable BooleanClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- client
Send BooleanAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- key
Comply BooleanVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- key
Unite BooleanNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- mode
Https String - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- mode
Level String - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- mode
Time Double - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - response
Cache300x Boolean - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- response
Cache404Enabled Boolean - Whether or not to cache 404 responses. Default:
false
- response
Cache404Time Double - The time in seconds to cache 404 responses. Value should be divisible by 60.
- response
Cache BooleanEmpty Responses - Cache responses that don’t have a message body. Default:
false
- response
Cache BooleanHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- response
Cache StringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- response
Cache List<String>Response Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - response
Cache BooleanShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- response
Stale StringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- response
Stale DoubleContent Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - response
Tag StringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- site
Cache StringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- ttl
Prefer BooleanLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- ttl
Use BooleanShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- site
Id number - Numeric identifier of the site to operate on.
- client
Comply booleanNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- client
Enable booleanClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- client
Send booleanAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- key
Comply booleanVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- key
Unite booleanNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- mode
Https string - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- mode
Level string - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- mode
Time number - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - response
Cache300x boolean - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- response
Cache404Enabled boolean - Whether or not to cache 404 responses. Default:
false
- response
Cache404Time number - The time in seconds to cache 404 responses. Value should be divisible by 60.
- response
Cache booleanEmpty Responses - Cache responses that don’t have a message body. Default:
false
- response
Cache booleanHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- response
Cache stringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- response
Cache string[]Response Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - response
Cache booleanShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- response
Stale stringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- response
Stale numberContent Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - response
Tag stringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- site
Cache stringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- ttl
Prefer booleanLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- ttl
Use booleanShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- site_
id float - Numeric identifier of the site to operate on.
- client_
comply_ boolno_ cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- client_
enable_ boolclient_ side_ caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- client_
send_ boolage_ header - Send Cache-Control: max-age and Age headers. Default:
false
- key_
comply_ boolvary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- key_
unite_ boolnaked_ full_ cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- mode_
https str - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- mode_
level str - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- mode_
time float - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - response_
cache300x bool - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- response_
cache404_ boolenabled - Whether or not to cache 404 responses. Default:
false
- response_
cache404_ floattime - The time in seconds to cache 404 responses. Value should be divisible by 60.
- response_
cache_ boolempty_ responses - Cache responses that don’t have a message body. Default:
false
- response_
cache_ boolhttp10_ responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- response_
cache_ strresponse_ header_ mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- response_
cache_ Sequence[str]response_ headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - response_
cache_ boolshield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- response_
stale_ strcontent_ mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- response_
stale_ floatcontent_ time - The time, in seconds, to serve stale content for when working in
custom
work mode. - response_
tag_ strresponse_ header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- site_
cache_ strconfiguration_ id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- ttl_
prefer_ boollast_ modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- ttl_
use_ boolshortest_ caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- site
Id Number - Numeric identifier of the site to operate on.
- client
Comply BooleanNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- client
Enable BooleanClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- client
Send BooleanAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- key
Comply BooleanVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- key
Unite BooleanNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- mode
Https String - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- mode
Level String - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- mode
Time Number - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - response
Cache300x Boolean - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- response
Cache404Enabled Boolean - Whether or not to cache 404 responses. Default:
false
- response
Cache404Time Number - The time in seconds to cache 404 responses. Value should be divisible by 60.
- response
Cache BooleanEmpty Responses - Cache responses that don’t have a message body. Default:
false
- response
Cache BooleanHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- response
Cache StringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- response
Cache List<String>Response Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - response
Cache BooleanShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- response
Stale StringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- response
Stale NumberContent Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - response
Tag StringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- site
Cache StringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- ttl
Prefer BooleanLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- ttl
Use BooleanShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
Outputs
All input properties are implicitly available as output properties. Additionally, the SiteCacheConfiguration 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 SiteCacheConfiguration Resource
Get an existing SiteCacheConfiguration 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?: SiteCacheConfigurationState, opts?: CustomResourceOptions): SiteCacheConfiguration
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
client_comply_no_cache: Optional[bool] = None,
client_enable_client_side_caching: Optional[bool] = None,
client_send_age_header: Optional[bool] = None,
key_comply_vary: Optional[bool] = None,
key_unite_naked_full_cache: Optional[bool] = None,
mode_https: Optional[str] = None,
mode_level: Optional[str] = None,
mode_time: Optional[float] = None,
response_cache300x: Optional[bool] = None,
response_cache404_enabled: Optional[bool] = None,
response_cache404_time: Optional[float] = None,
response_cache_empty_responses: Optional[bool] = None,
response_cache_http10_responses: Optional[bool] = None,
response_cache_response_header_mode: Optional[str] = None,
response_cache_response_headers: Optional[Sequence[str]] = None,
response_cache_shield: Optional[bool] = None,
response_stale_content_mode: Optional[str] = None,
response_stale_content_time: Optional[float] = None,
response_tag_response_header: Optional[str] = None,
site_cache_configuration_id: Optional[str] = None,
site_id: Optional[float] = None,
ttl_prefer_last_modified: Optional[bool] = None,
ttl_use_shortest_caching: Optional[bool] = None) -> SiteCacheConfiguration
func GetSiteCacheConfiguration(ctx *Context, name string, id IDInput, state *SiteCacheConfigurationState, opts ...ResourceOption) (*SiteCacheConfiguration, error)
public static SiteCacheConfiguration Get(string name, Input<string> id, SiteCacheConfigurationState? state, CustomResourceOptions? opts = null)
public static SiteCacheConfiguration get(String name, Output<String> id, SiteCacheConfigurationState state, CustomResourceOptions options)
resources: _: type: incapsula:SiteCacheConfiguration 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.
- Client
Comply boolNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- Client
Enable boolClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- Client
Send boolAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- Key
Comply boolVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- Key
Unite boolNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- Mode
Https string - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- Mode
Level string - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- Mode
Time double - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - Response
Cache300x bool - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- Response
Cache404Enabled bool - Whether or not to cache 404 responses. Default:
false
- Response
Cache404Time double - The time in seconds to cache 404 responses. Value should be divisible by 60.
- Response
Cache boolEmpty Responses - Cache responses that don’t have a message body. Default:
false
- Response
Cache boolHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- Response
Cache stringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- Response
Cache List<string>Response Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - Response
Cache boolShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- Response
Stale stringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- Response
Stale doubleContent Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - Response
Tag stringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- Site
Cache stringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- Site
Id double - Numeric identifier of the site to operate on.
- Ttl
Prefer boolLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- Ttl
Use boolShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- Client
Comply boolNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- Client
Enable boolClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- Client
Send boolAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- Key
Comply boolVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- Key
Unite boolNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- Mode
Https string - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- Mode
Level string - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- Mode
Time float64 - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - Response
Cache300x bool - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- Response
Cache404Enabled bool - Whether or not to cache 404 responses. Default:
false
- Response
Cache404Time float64 - The time in seconds to cache 404 responses. Value should be divisible by 60.
- Response
Cache boolEmpty Responses - Cache responses that don’t have a message body. Default:
false
- Response
Cache boolHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- Response
Cache stringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- Response
Cache []stringResponse Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - Response
Cache boolShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- Response
Stale stringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- Response
Stale float64Content Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - Response
Tag stringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- Site
Cache stringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- Site
Id float64 - Numeric identifier of the site to operate on.
- Ttl
Prefer boolLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- Ttl
Use boolShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- client
Comply BooleanNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- client
Enable BooleanClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- client
Send BooleanAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- key
Comply BooleanVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- key
Unite BooleanNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- mode
Https String - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- mode
Level String - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- mode
Time Double - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - response
Cache300x Boolean - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- response
Cache404Enabled Boolean - Whether or not to cache 404 responses. Default:
false
- response
Cache404Time Double - The time in seconds to cache 404 responses. Value should be divisible by 60.
- response
Cache BooleanEmpty Responses - Cache responses that don’t have a message body. Default:
false
- response
Cache BooleanHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- response
Cache StringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- response
Cache List<String>Response Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - response
Cache BooleanShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- response
Stale StringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- response
Stale DoubleContent Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - response
Tag StringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- site
Cache StringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- site
Id Double - Numeric identifier of the site to operate on.
- ttl
Prefer BooleanLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- ttl
Use BooleanShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- client
Comply booleanNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- client
Enable booleanClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- client
Send booleanAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- key
Comply booleanVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- key
Unite booleanNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- mode
Https string - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- mode
Level string - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- mode
Time number - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - response
Cache300x boolean - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- response
Cache404Enabled boolean - Whether or not to cache 404 responses. Default:
false
- response
Cache404Time number - The time in seconds to cache 404 responses. Value should be divisible by 60.
- response
Cache booleanEmpty Responses - Cache responses that don’t have a message body. Default:
false
- response
Cache booleanHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- response
Cache stringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- response
Cache string[]Response Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - response
Cache booleanShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- response
Stale stringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- response
Stale numberContent Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - response
Tag stringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- site
Cache stringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- site
Id number - Numeric identifier of the site to operate on.
- ttl
Prefer booleanLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- ttl
Use booleanShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- client_
comply_ boolno_ cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- client_
enable_ boolclient_ side_ caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- client_
send_ boolage_ header - Send Cache-Control: max-age and Age headers. Default:
false
- key_
comply_ boolvary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- key_
unite_ boolnaked_ full_ cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- mode_
https str - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- mode_
level str - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- mode_
time float - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - response_
cache300x bool - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- response_
cache404_ boolenabled - Whether or not to cache 404 responses. Default:
false
- response_
cache404_ floattime - The time in seconds to cache 404 responses. Value should be divisible by 60.
- response_
cache_ boolempty_ responses - Cache responses that don’t have a message body. Default:
false
- response_
cache_ boolhttp10_ responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- response_
cache_ strresponse_ header_ mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- response_
cache_ Sequence[str]response_ headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - response_
cache_ boolshield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- response_
stale_ strcontent_ mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- response_
stale_ floatcontent_ time - The time, in seconds, to serve stale content for when working in
custom
work mode. - response_
tag_ strresponse_ header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- site_
cache_ strconfiguration_ id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- site_
id float - Numeric identifier of the site to operate on.
- ttl_
prefer_ boollast_ modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- ttl_
use_ boolshortest_ caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
- client
Comply BooleanNo Cache - Comply with No-Cache and Max-Age directives in client requests. By default, these cache directives are ignored. Resources are dynamically profiled and re-configured to optimize performance. Default:
false
- client
Enable BooleanClient Side Caching - Cache content on client browsers or applications. When not enabled, content is cached only on the Imperva proxies. Default:
false
- client
Send BooleanAge Header - Send Cache-Control: max-age and Age headers. Default:
false
- key
Comply BooleanVary - Comply with Vary. Cache resources in accordance with the Vary response header. Default:
false
- key
Unite BooleanNaked Full Cache - Use the Same Cache for Full and Naked Domains. For example, use the same cached resource for www.example.com/a and example.com/a. Default:
false
- mode
Https String - The resources that are cached over HTTPS, the general level applies. Default:
disabled
Possible values:- disabled - No resources are cached over HTTPS.
- dont_include_html - Only images, css files, js files, and resources defined with the 'Cache-Control: public' header may be cached over HTTPS.
- include_html - Same as dont_include_html, also HTML files may be cached over HTTPS.
- include_all_resources - All resources may be cached over HTTPS.
- mode
Level String - Caching level. Default:
smart
Possible values:- disabled - Turn off site caching entirely, including user-defined custom cache rules. Note: Since all other attributes require caching, it is recommended to clear all resource attributes from configuration when disabling the cache.
- custom_cache_rules_only - Disable caching, unless specified otherwise by a custom cache rule.
- standard - Cache according to standard HTTP headers.
- smart - Cache according to standard HTTP headers as well as profile dynamic pages to identify and cache static content that was not marked as static. In addition to content that was marked by the site's developer / web server as static using standard HTTP headers, Imperva also profiles other resources to identify and cache static content that was not marked as such.
- all_resources - Cache every resource on the web server for the specified amount of time. All site content is cached.
- mode
Time Number - The time, in seconds, that you set for this option determines how often the cache is refreshed. Relevant for the
include_html
andinclude_all_resources
levels only. - response
Cache300x Boolean - When this option is checked Imperva will cache 301, 302, 303, 307, and 308 redirect response headers containing the target URI. Default:
false
- response
Cache404Enabled Boolean - Whether or not to cache 404 responses. Default:
false
- response
Cache404Time Number - The time in seconds to cache 404 responses. Value should be divisible by 60.
- response
Cache BooleanEmpty Responses - Cache responses that don’t have a message body. Default:
false
- response
Cache BooleanHttp10Responses - Cache HTTP 1.0 type responses that don’t include the Content-Length header or chunking. Default:
false
- response
Cache StringResponse Header Mode - The working mode for caching response headers. Default:
disabled
Possible values:- disabled
- all - Cache all headers in responses.
- custom - Specify which response headers should be cached along with the resource.
- response
Cache List<String>Response Headers - An array of strings representing the response headers to be cached when working in
custom
mode. If empty, no response headers are cached. For example:["Access-Control-Allow-Origin","Access-Control-Allow-Methods"]
. - response
Cache BooleanShield - Adds an intermediate cache between other Imperva PoPs and your origin servers to protect your servers from redundant requests. Default:
false
- response
Stale StringContent Mode - The working mode for serving stale content. Default:
disabled
Possible values:- disabled - Disable serving of stale content.
- adaptive - Stale content is served for a duration of 2 to 24 hours based on the time passed since the resource was last updated.
- custom - Serve stale content for the specified amount of time.
- response
Stale NumberContent Time - The time, in seconds, to serve stale content for when working in
custom
work mode. - response
Tag StringResponse Header - Tag the response according to the value of this header. Specify which origin response header contains the cache tags in your resources.
- site
Cache StringConfiguration Id - Unique identifier in the API for the Site Cache configuration. The id is identical to Site id.
- site
Id Number - Numeric identifier of the site to operate on.
- ttl
Prefer BooleanLast Modified - Prefer 'Last Modified' over eTag. When this option is checked, Imperva prefers using Last Modified values (if available) over eTag values (recommended on multi-server setups). Default:
false
- ttl
Use BooleanShortest Caching - Use shortest caching duration in case of conflicts. By default, the longest duration is used in case of conflict between caching rules or modes. When this option is checked, Imperva uses the shortest duration in case of conflict. Default:
false
Import
Site Cache Configuration can be imported using the id
, e.g.:
$ pulumi import incapsula:index/siteCacheConfiguration:SiteCacheConfiguration example_site_cache_configuration 1234
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.