alicloud.esa.CacheRule
Explore with Pulumi AI
Provides a ESA Cache Rule resource.
For information about ESA Cache Rule and how to use it, see What is Cache Rule.
NOTE: Available since v1.244.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.esa.getSites({
    planSubscribeType: "enterpriseplan",
});
const defaultCacheRule = new alicloud.esa.CacheRule("default", {
    userDeviceType: "off",
    browserCacheMode: "no_cache",
    userLanguage: "off",
    checkPresenceHeader: "headername",
    includeCookie: "cookie_exapmle",
    edgeCacheMode: "follow_origin",
    additionalCacheablePorts: "2053",
    ruleName: "rule_example",
    edgeStatusCodeCacheTtl: "300",
    browserCacheTtl: "300",
    queryString: "example",
    userGeo: "off",
    sortQueryStringForCache: "off",
    checkPresenceCookie: "cookiename",
    cacheReserveEligibility: "bypass_cache_reserve",
    queryStringMode: "ignore_all",
    rule: "http.host eq \"video.example.com\"",
    cacheDeceptionArmor: "off",
    siteId: _default.then(_default => _default.sites?.[0]?.id),
    bypassCache: "cache_all",
    edgeCacheTtl: "300",
    ruleEnable: "off",
    siteVersion: 0,
    includeHeader: "example",
    serveStale: "off",
});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.esa.get_sites(plan_subscribe_type="enterpriseplan")
default_cache_rule = alicloud.esa.CacheRule("default",
    user_device_type="off",
    browser_cache_mode="no_cache",
    user_language="off",
    check_presence_header="headername",
    include_cookie="cookie_exapmle",
    edge_cache_mode="follow_origin",
    additional_cacheable_ports="2053",
    rule_name="rule_example",
    edge_status_code_cache_ttl="300",
    browser_cache_ttl="300",
    query_string="example",
    user_geo="off",
    sort_query_string_for_cache="off",
    check_presence_cookie="cookiename",
    cache_reserve_eligibility="bypass_cache_reserve",
    query_string_mode="ignore_all",
    rule="http.host eq \"video.example.com\"",
    cache_deception_armor="off",
    site_id=default.sites[0].id,
    bypass_cache="cache_all",
    edge_cache_ttl="300",
    rule_enable="off",
    site_version=0,
    include_header="example",
    serve_stale="off")
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := esa.GetSites(ctx, &esa.GetSitesArgs{
			PlanSubscribeType: pulumi.StringRef("enterpriseplan"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = esa.NewCacheRule(ctx, "default", &esa.CacheRuleArgs{
			UserDeviceType:           pulumi.String("off"),
			BrowserCacheMode:         pulumi.String("no_cache"),
			UserLanguage:             pulumi.String("off"),
			CheckPresenceHeader:      pulumi.String("headername"),
			IncludeCookie:            pulumi.String("cookie_exapmle"),
			EdgeCacheMode:            pulumi.String("follow_origin"),
			AdditionalCacheablePorts: pulumi.String("2053"),
			RuleName:                 pulumi.String("rule_example"),
			EdgeStatusCodeCacheTtl:   pulumi.String("300"),
			BrowserCacheTtl:          pulumi.String("300"),
			QueryString:              pulumi.String("example"),
			UserGeo:                  pulumi.String("off"),
			SortQueryStringForCache:  pulumi.String("off"),
			CheckPresenceCookie:      pulumi.String("cookiename"),
			CacheReserveEligibility:  pulumi.String("bypass_cache_reserve"),
			QueryStringMode:          pulumi.String("ignore_all"),
			Rule:                     pulumi.String("http.host eq \"video.example.com\""),
			CacheDeceptionArmor:      pulumi.String("off"),
			SiteId:                   pulumi.Int(_default.Sites[0].Id),
			BypassCache:              pulumi.String("cache_all"),
			EdgeCacheTtl:             pulumi.String("300"),
			RuleEnable:               pulumi.String("off"),
			SiteVersion:              pulumi.Int(0),
			IncludeHeader:            pulumi.String("example"),
			ServeStale:               pulumi.String("off"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.Esa.GetSites.Invoke(new()
    {
        PlanSubscribeType = "enterpriseplan",
    });
    var defaultCacheRule = new AliCloud.Esa.CacheRule("default", new()
    {
        UserDeviceType = "off",
        BrowserCacheMode = "no_cache",
        UserLanguage = "off",
        CheckPresenceHeader = "headername",
        IncludeCookie = "cookie_exapmle",
        EdgeCacheMode = "follow_origin",
        AdditionalCacheablePorts = "2053",
        RuleName = "rule_example",
        EdgeStatusCodeCacheTtl = "300",
        BrowserCacheTtl = "300",
        QueryString = "example",
        UserGeo = "off",
        SortQueryStringForCache = "off",
        CheckPresenceCookie = "cookiename",
        CacheReserveEligibility = "bypass_cache_reserve",
        QueryStringMode = "ignore_all",
        Rule = "http.host eq \"video.example.com\"",
        CacheDeceptionArmor = "off",
        SiteId = @default.Apply(@default => @default.Apply(getSitesResult => getSitesResult.Sites[0]?.Id)),
        BypassCache = "cache_all",
        EdgeCacheTtl = "300",
        RuleEnable = "off",
        SiteVersion = 0,
        IncludeHeader = "example",
        ServeStale = "off",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.EsaFunctions;
import com.pulumi.alicloud.esa.inputs.GetSitesArgs;
import com.pulumi.alicloud.esa.CacheRule;
import com.pulumi.alicloud.esa.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) {
        final var default = EsaFunctions.getSites(GetSitesArgs.builder()
            .planSubscribeType("enterpriseplan")
            .build());
        var defaultCacheRule = new CacheRule("defaultCacheRule", CacheRuleArgs.builder()
            .userDeviceType("off")
            .browserCacheMode("no_cache")
            .userLanguage("off")
            .checkPresenceHeader("headername")
            .includeCookie("cookie_exapmle")
            .edgeCacheMode("follow_origin")
            .additionalCacheablePorts("2053")
            .ruleName("rule_example")
            .edgeStatusCodeCacheTtl("300")
            .browserCacheTtl("300")
            .queryString("example")
            .userGeo("off")
            .sortQueryStringForCache("off")
            .checkPresenceCookie("cookiename")
            .cacheReserveEligibility("bypass_cache_reserve")
            .queryStringMode("ignore_all")
            .rule("http.host eq \"video.example.com\"")
            .cacheDeceptionArmor("off")
            .siteId(default_.sites()[0].id())
            .bypassCache("cache_all")
            .edgeCacheTtl("300")
            .ruleEnable("off")
            .siteVersion("0")
            .includeHeader("example")
            .serveStale("off")
            .build());
    }
}
resources:
  defaultCacheRule:
    type: alicloud:esa:CacheRule
    name: default
    properties:
      userDeviceType: off
      browserCacheMode: no_cache
      userLanguage: off
      checkPresenceHeader: headername
      includeCookie: cookie_exapmle
      edgeCacheMode: follow_origin
      additionalCacheablePorts: '2053'
      ruleName: rule_example
      edgeStatusCodeCacheTtl: '300'
      browserCacheTtl: '300'
      queryString: example
      userGeo: off
      sortQueryStringForCache: off
      checkPresenceCookie: cookiename
      cacheReserveEligibility: bypass_cache_reserve
      queryStringMode: ignore_all
      rule: http.host eq "video.example.com"
      cacheDeceptionArmor: off
      siteId: ${default.sites[0].id}
      bypassCache: cache_all
      edgeCacheTtl: '300'
      ruleEnable: off
      siteVersion: '0'
      includeHeader: example
      serveStale: off
variables:
  default:
    fn::invoke:
      function: alicloud:esa:getSites
      arguments:
        planSubscribeType: enterpriseplan
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,
              site_id: Optional[int] = None,
              include_header: Optional[str] = None,
              user_device_type: Optional[str] = None,
              bypass_cache: Optional[str] = None,
              cache_deception_armor: Optional[str] = None,
              cache_reserve_eligibility: Optional[str] = None,
              check_presence_cookie: Optional[str] = None,
              check_presence_header: Optional[str] = None,
              edge_cache_mode: Optional[str] = None,
              edge_cache_ttl: Optional[str] = None,
              edge_status_code_cache_ttl: Optional[str] = None,
              user_language: Optional[str] = None,
              browser_cache_ttl: Optional[str] = None,
              rule: Optional[str] = None,
              query_string_mode: Optional[str] = None,
              query_string: Optional[str] = None,
              rule_enable: Optional[str] = None,
              rule_name: Optional[str] = None,
              serve_stale: Optional[str] = None,
              browser_cache_mode: Optional[str] = None,
              site_version: Optional[int] = None,
              sort_query_string_for_cache: Optional[str] = None,
              additional_cacheable_ports: Optional[str] = None,
              user_geo: Optional[str] = None,
              include_cookie: Optional[str] = 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: alicloud:esa:CacheRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cacheRuleResource = new AliCloud.Esa.CacheRule("cacheRuleResource", new()
{
    SiteId = 0,
    IncludeHeader = "string",
    UserDeviceType = "string",
    BypassCache = "string",
    CacheDeceptionArmor = "string",
    CacheReserveEligibility = "string",
    CheckPresenceCookie = "string",
    CheckPresenceHeader = "string",
    EdgeCacheMode = "string",
    EdgeCacheTtl = "string",
    EdgeStatusCodeCacheTtl = "string",
    UserLanguage = "string",
    BrowserCacheTtl = "string",
    Rule = "string",
    QueryStringMode = "string",
    QueryString = "string",
    RuleEnable = "string",
    RuleName = "string",
    ServeStale = "string",
    BrowserCacheMode = "string",
    SiteVersion = 0,
    SortQueryStringForCache = "string",
    AdditionalCacheablePorts = "string",
    UserGeo = "string",
    IncludeCookie = "string",
});
example, err := esa.NewCacheRule(ctx, "cacheRuleResource", &esa.CacheRuleArgs{
	SiteId:                   pulumi.Int(0),
	IncludeHeader:            pulumi.String("string"),
	UserDeviceType:           pulumi.String("string"),
	BypassCache:              pulumi.String("string"),
	CacheDeceptionArmor:      pulumi.String("string"),
	CacheReserveEligibility:  pulumi.String("string"),
	CheckPresenceCookie:      pulumi.String("string"),
	CheckPresenceHeader:      pulumi.String("string"),
	EdgeCacheMode:            pulumi.String("string"),
	EdgeCacheTtl:             pulumi.String("string"),
	EdgeStatusCodeCacheTtl:   pulumi.String("string"),
	UserLanguage:             pulumi.String("string"),
	BrowserCacheTtl:          pulumi.String("string"),
	Rule:                     pulumi.String("string"),
	QueryStringMode:          pulumi.String("string"),
	QueryString:              pulumi.String("string"),
	RuleEnable:               pulumi.String("string"),
	RuleName:                 pulumi.String("string"),
	ServeStale:               pulumi.String("string"),
	BrowserCacheMode:         pulumi.String("string"),
	SiteVersion:              pulumi.Int(0),
	SortQueryStringForCache:  pulumi.String("string"),
	AdditionalCacheablePorts: pulumi.String("string"),
	UserGeo:                  pulumi.String("string"),
	IncludeCookie:            pulumi.String("string"),
})
var cacheRuleResource = new CacheRule("cacheRuleResource", CacheRuleArgs.builder()
    .siteId(0)
    .includeHeader("string")
    .userDeviceType("string")
    .bypassCache("string")
    .cacheDeceptionArmor("string")
    .cacheReserveEligibility("string")
    .checkPresenceCookie("string")
    .checkPresenceHeader("string")
    .edgeCacheMode("string")
    .edgeCacheTtl("string")
    .edgeStatusCodeCacheTtl("string")
    .userLanguage("string")
    .browserCacheTtl("string")
    .rule("string")
    .queryStringMode("string")
    .queryString("string")
    .ruleEnable("string")
    .ruleName("string")
    .serveStale("string")
    .browserCacheMode("string")
    .siteVersion(0)
    .sortQueryStringForCache("string")
    .additionalCacheablePorts("string")
    .userGeo("string")
    .includeCookie("string")
    .build());
cache_rule_resource = alicloud.esa.CacheRule("cacheRuleResource",
    site_id=0,
    include_header="string",
    user_device_type="string",
    bypass_cache="string",
    cache_deception_armor="string",
    cache_reserve_eligibility="string",
    check_presence_cookie="string",
    check_presence_header="string",
    edge_cache_mode="string",
    edge_cache_ttl="string",
    edge_status_code_cache_ttl="string",
    user_language="string",
    browser_cache_ttl="string",
    rule="string",
    query_string_mode="string",
    query_string="string",
    rule_enable="string",
    rule_name="string",
    serve_stale="string",
    browser_cache_mode="string",
    site_version=0,
    sort_query_string_for_cache="string",
    additional_cacheable_ports="string",
    user_geo="string",
    include_cookie="string")
const cacheRuleResource = new alicloud.esa.CacheRule("cacheRuleResource", {
    siteId: 0,
    includeHeader: "string",
    userDeviceType: "string",
    bypassCache: "string",
    cacheDeceptionArmor: "string",
    cacheReserveEligibility: "string",
    checkPresenceCookie: "string",
    checkPresenceHeader: "string",
    edgeCacheMode: "string",
    edgeCacheTtl: "string",
    edgeStatusCodeCacheTtl: "string",
    userLanguage: "string",
    browserCacheTtl: "string",
    rule: "string",
    queryStringMode: "string",
    queryString: "string",
    ruleEnable: "string",
    ruleName: "string",
    serveStale: "string",
    browserCacheMode: "string",
    siteVersion: 0,
    sortQueryStringForCache: "string",
    additionalCacheablePorts: "string",
    userGeo: "string",
    includeCookie: "string",
});
type: alicloud:esa:CacheRule
properties:
    additionalCacheablePorts: string
    browserCacheMode: string
    browserCacheTtl: string
    bypassCache: string
    cacheDeceptionArmor: string
    cacheReserveEligibility: string
    checkPresenceCookie: string
    checkPresenceHeader: string
    edgeCacheMode: string
    edgeCacheTtl: string
    edgeStatusCodeCacheTtl: string
    includeCookie: string
    includeHeader: string
    queryString: string
    queryStringMode: string
    rule: string
    ruleEnable: string
    ruleName: string
    serveStale: string
    siteId: 0
    siteVersion: 0
    sortQueryStringForCache: string
    userDeviceType: string
    userGeo: string
    userLanguage: string
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:
- SiteId int
- The site ID, which can be obtained by calling the ListSites API.
- AdditionalCacheable stringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- BrowserCache stringMode 
- Browser cache mode. value:
- BrowserCache stringTtl 
- The browser cache expiration time, in seconds.
- BypassCache string
- Set the cache bypass mode. value:
- CacheDeception stringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- CacheReserve stringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- string
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- CheckPresence stringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- EdgeCache stringMode 
- Node cache mode. value:
- EdgeCache stringTtl 
- The node cache expiration time, in seconds.
- EdgeStatus stringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- string
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- IncludeHeader string
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- QueryString string
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- QueryString stringMode 
- The processing mode for the query string when the cache key is generated. value:
- Rule string
- The rule content.
- RuleEnable string
- Rule switch. value:
- RuleName string
- Rule name, you can find out the rule whose rule name is the passed field.
- ServeStale string
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- SiteVersion int
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- SortQuery stringString For Cache 
- Query string sorting, which is disabled by default. value:
- UserDevice stringType 
- When generating the cache key, add the client device type. value:
- UserGeo string
- When generating the cache key, add the client geographic location. value:
- UserLanguage string
- When generating the cache key, add the client language type. value:
- SiteId int
- The site ID, which can be obtained by calling the ListSites API.
- AdditionalCacheable stringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- BrowserCache stringMode 
- Browser cache mode. value:
- BrowserCache stringTtl 
- The browser cache expiration time, in seconds.
- BypassCache string
- Set the cache bypass mode. value:
- CacheDeception stringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- CacheReserve stringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- string
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- CheckPresence stringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- EdgeCache stringMode 
- Node cache mode. value:
- EdgeCache stringTtl 
- The node cache expiration time, in seconds.
- EdgeStatus stringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- string
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- IncludeHeader string
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- QueryString string
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- QueryString stringMode 
- The processing mode for the query string when the cache key is generated. value:
- Rule string
- The rule content.
- RuleEnable string
- Rule switch. value:
- RuleName string
- Rule name, you can find out the rule whose rule name is the passed field.
- ServeStale string
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- SiteVersion int
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- SortQuery stringString For Cache 
- Query string sorting, which is disabled by default. value:
- UserDevice stringType 
- When generating the cache key, add the client device type. value:
- UserGeo string
- When generating the cache key, add the client geographic location. value:
- UserLanguage string
- When generating the cache key, add the client language type. value:
- siteId Integer
- The site ID, which can be obtained by calling the ListSites API.
- additionalCacheable StringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- browserCache StringMode 
- Browser cache mode. value:
- browserCache StringTtl 
- The browser cache expiration time, in seconds.
- bypassCache String
- Set the cache bypass mode. value:
- cacheDeception StringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- cacheReserve StringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- String
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- checkPresence StringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- edgeCache StringMode 
- Node cache mode. value:
- edgeCache StringTtl 
- The node cache expiration time, in seconds.
- edgeStatus StringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- String
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- includeHeader String
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- queryString String
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- queryString StringMode 
- The processing mode for the query string when the cache key is generated. value:
- rule String
- The rule content.
- ruleEnable String
- Rule switch. value:
- ruleName String
- Rule name, you can find out the rule whose rule name is the passed field.
- serveStale String
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- siteVersion Integer
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- sortQuery StringString For Cache 
- Query string sorting, which is disabled by default. value:
- userDevice StringType 
- When generating the cache key, add the client device type. value:
- userGeo String
- When generating the cache key, add the client geographic location. value:
- userLanguage String
- When generating the cache key, add the client language type. value:
- siteId number
- The site ID, which can be obtained by calling the ListSites API.
- additionalCacheable stringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- browserCache stringMode 
- Browser cache mode. value:
- browserCache stringTtl 
- The browser cache expiration time, in seconds.
- bypassCache string
- Set the cache bypass mode. value:
- cacheDeception stringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- cacheReserve stringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- string
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- checkPresence stringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- edgeCache stringMode 
- Node cache mode. value:
- edgeCache stringTtl 
- The node cache expiration time, in seconds.
- edgeStatus stringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- string
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- includeHeader string
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- queryString string
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- queryString stringMode 
- The processing mode for the query string when the cache key is generated. value:
- rule string
- The rule content.
- ruleEnable string
- Rule switch. value:
- ruleName string
- Rule name, you can find out the rule whose rule name is the passed field.
- serveStale string
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- siteVersion number
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- sortQuery stringString For Cache 
- Query string sorting, which is disabled by default. value:
- userDevice stringType 
- When generating the cache key, add the client device type. value:
- userGeo string
- When generating the cache key, add the client geographic location. value:
- userLanguage string
- When generating the cache key, add the client language type. value:
- site_id int
- The site ID, which can be obtained by calling the ListSites API.
- additional_cacheable_ strports 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- browser_cache_ strmode 
- Browser cache mode. value:
- browser_cache_ strttl 
- The browser cache expiration time, in seconds.
- bypass_cache str
- Set the cache bypass mode. value:
- cache_deception_ strarmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- cache_reserve_ streligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- str
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- check_presence_ strheader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- edge_cache_ strmode 
- Node cache mode. value:
- edge_cache_ strttl 
- The node cache expiration time, in seconds.
- edge_status_ strcode_ cache_ ttl 
- Status code cache expiration time, in seconds.
- str
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- include_header str
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- query_string str
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- query_string_ strmode 
- The processing mode for the query string when the cache key is generated. value:
- rule str
- The rule content.
- rule_enable str
- Rule switch. value:
- rule_name str
- Rule name, you can find out the rule whose rule name is the passed field.
- serve_stale str
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- site_version int
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- sort_query_ strstring_ for_ cache 
- Query string sorting, which is disabled by default. value:
- user_device_ strtype 
- When generating the cache key, add the client device type. value:
- user_geo str
- When generating the cache key, add the client geographic location. value:
- user_language str
- When generating the cache key, add the client language type. value:
- siteId Number
- The site ID, which can be obtained by calling the ListSites API.
- additionalCacheable StringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- browserCache StringMode 
- Browser cache mode. value:
- browserCache StringTtl 
- The browser cache expiration time, in seconds.
- bypassCache String
- Set the cache bypass mode. value:
- cacheDeception StringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- cacheReserve StringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- String
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- checkPresence StringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- edgeCache StringMode 
- Node cache mode. value:
- edgeCache StringTtl 
- The node cache expiration time, in seconds.
- edgeStatus StringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- String
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- includeHeader String
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- queryString String
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- queryString StringMode 
- The processing mode for the query string when the cache key is generated. value:
- rule String
- The rule content.
- ruleEnable String
- Rule switch. value:
- ruleName String
- Rule name, you can find out the rule whose rule name is the passed field.
- serveStale String
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- siteVersion Number
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- sortQuery StringString For Cache 
- Query string sorting, which is disabled by default. value:
- userDevice StringType 
- When generating the cache key, add the client device type. value:
- userGeo String
- When generating the cache key, add the client geographic location. value:
- userLanguage String
- When generating the cache key, add the client language type. value:
Outputs
All input properties are implicitly available as output properties. Additionally, the CacheRule resource produces the following output properties:
- CacheRule intId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- Id string
- The provider-assigned unique ID for this managed resource.
- CacheRule intId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- Id string
- The provider-assigned unique ID for this managed resource.
- cacheRule IntegerId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- id String
- The provider-assigned unique ID for this managed resource.
- cacheRule numberId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- id string
- The provider-assigned unique ID for this managed resource.
- cache_rule_ intid 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- id str
- The provider-assigned unique ID for this managed resource.
- cacheRule NumberId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- 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,
        additional_cacheable_ports: Optional[str] = None,
        browser_cache_mode: Optional[str] = None,
        browser_cache_ttl: Optional[str] = None,
        bypass_cache: Optional[str] = None,
        cache_deception_armor: Optional[str] = None,
        cache_reserve_eligibility: Optional[str] = None,
        cache_rule_id: Optional[int] = None,
        check_presence_cookie: Optional[str] = None,
        check_presence_header: Optional[str] = None,
        edge_cache_mode: Optional[str] = None,
        edge_cache_ttl: Optional[str] = None,
        edge_status_code_cache_ttl: Optional[str] = None,
        include_cookie: Optional[str] = None,
        include_header: Optional[str] = None,
        query_string: Optional[str] = None,
        query_string_mode: Optional[str] = None,
        rule: Optional[str] = None,
        rule_enable: Optional[str] = None,
        rule_name: Optional[str] = None,
        serve_stale: Optional[str] = None,
        site_id: Optional[int] = None,
        site_version: Optional[int] = None,
        sort_query_string_for_cache: Optional[str] = None,
        user_device_type: Optional[str] = None,
        user_geo: Optional[str] = None,
        user_language: Optional[str] = None) -> CacheRulefunc 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: alicloud:esa:CacheRule    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- AdditionalCacheable stringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- BrowserCache stringMode 
- Browser cache mode. value:
- BrowserCache stringTtl 
- The browser cache expiration time, in seconds.
- BypassCache string
- Set the cache bypass mode. value:
- CacheDeception stringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- CacheReserve stringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- CacheRule intId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- string
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- CheckPresence stringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- EdgeCache stringMode 
- Node cache mode. value:
- EdgeCache stringTtl 
- The node cache expiration time, in seconds.
- EdgeStatus stringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- string
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- IncludeHeader string
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- QueryString string
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- QueryString stringMode 
- The processing mode for the query string when the cache key is generated. value:
- Rule string
- The rule content.
- RuleEnable string
- Rule switch. value:
- RuleName string
- Rule name, you can find out the rule whose rule name is the passed field.
- ServeStale string
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- SiteId int
- The site ID, which can be obtained by calling the ListSites API.
- SiteVersion int
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- SortQuery stringString For Cache 
- Query string sorting, which is disabled by default. value:
- UserDevice stringType 
- When generating the cache key, add the client device type. value:
- UserGeo string
- When generating the cache key, add the client geographic location. value:
- UserLanguage string
- When generating the cache key, add the client language type. value:
- AdditionalCacheable stringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- BrowserCache stringMode 
- Browser cache mode. value:
- BrowserCache stringTtl 
- The browser cache expiration time, in seconds.
- BypassCache string
- Set the cache bypass mode. value:
- CacheDeception stringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- CacheReserve stringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- CacheRule intId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- string
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- CheckPresence stringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- EdgeCache stringMode 
- Node cache mode. value:
- EdgeCache stringTtl 
- The node cache expiration time, in seconds.
- EdgeStatus stringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- string
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- IncludeHeader string
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- QueryString string
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- QueryString stringMode 
- The processing mode for the query string when the cache key is generated. value:
- Rule string
- The rule content.
- RuleEnable string
- Rule switch. value:
- RuleName string
- Rule name, you can find out the rule whose rule name is the passed field.
- ServeStale string
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- SiteId int
- The site ID, which can be obtained by calling the ListSites API.
- SiteVersion int
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- SortQuery stringString For Cache 
- Query string sorting, which is disabled by default. value:
- UserDevice stringType 
- When generating the cache key, add the client device type. value:
- UserGeo string
- When generating the cache key, add the client geographic location. value:
- UserLanguage string
- When generating the cache key, add the client language type. value:
- additionalCacheable StringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- browserCache StringMode 
- Browser cache mode. value:
- browserCache StringTtl 
- The browser cache expiration time, in seconds.
- bypassCache String
- Set the cache bypass mode. value:
- cacheDeception StringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- cacheReserve StringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- cacheRule IntegerId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- String
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- checkPresence StringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- edgeCache StringMode 
- Node cache mode. value:
- edgeCache StringTtl 
- The node cache expiration time, in seconds.
- edgeStatus StringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- String
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- includeHeader String
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- queryString String
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- queryString StringMode 
- The processing mode for the query string when the cache key is generated. value:
- rule String
- The rule content.
- ruleEnable String
- Rule switch. value:
- ruleName String
- Rule name, you can find out the rule whose rule name is the passed field.
- serveStale String
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- siteId Integer
- The site ID, which can be obtained by calling the ListSites API.
- siteVersion Integer
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- sortQuery StringString For Cache 
- Query string sorting, which is disabled by default. value:
- userDevice StringType 
- When generating the cache key, add the client device type. value:
- userGeo String
- When generating the cache key, add the client geographic location. value:
- userLanguage String
- When generating the cache key, add the client language type. value:
- additionalCacheable stringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- browserCache stringMode 
- Browser cache mode. value:
- browserCache stringTtl 
- The browser cache expiration time, in seconds.
- bypassCache string
- Set the cache bypass mode. value:
- cacheDeception stringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- cacheReserve stringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- cacheRule numberId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- string
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- checkPresence stringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- edgeCache stringMode 
- Node cache mode. value:
- edgeCache stringTtl 
- The node cache expiration time, in seconds.
- edgeStatus stringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- string
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- includeHeader string
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- queryString string
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- queryString stringMode 
- The processing mode for the query string when the cache key is generated. value:
- rule string
- The rule content.
- ruleEnable string
- Rule switch. value:
- ruleName string
- Rule name, you can find out the rule whose rule name is the passed field.
- serveStale string
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- siteId number
- The site ID, which can be obtained by calling the ListSites API.
- siteVersion number
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- sortQuery stringString For Cache 
- Query string sorting, which is disabled by default. value:
- userDevice stringType 
- When generating the cache key, add the client device type. value:
- userGeo string
- When generating the cache key, add the client geographic location. value:
- userLanguage string
- When generating the cache key, add the client language type. value:
- additional_cacheable_ strports 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- browser_cache_ strmode 
- Browser cache mode. value:
- browser_cache_ strttl 
- The browser cache expiration time, in seconds.
- bypass_cache str
- Set the cache bypass mode. value:
- cache_deception_ strarmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- cache_reserve_ streligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- cache_rule_ intid 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- str
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- check_presence_ strheader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- edge_cache_ strmode 
- Node cache mode. value:
- edge_cache_ strttl 
- The node cache expiration time, in seconds.
- edge_status_ strcode_ cache_ ttl 
- Status code cache expiration time, in seconds.
- str
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- include_header str
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- query_string str
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- query_string_ strmode 
- The processing mode for the query string when the cache key is generated. value:
- rule str
- The rule content.
- rule_enable str
- Rule switch. value:
- rule_name str
- Rule name, you can find out the rule whose rule name is the passed field.
- serve_stale str
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- site_id int
- The site ID, which can be obtained by calling the ListSites API.
- site_version int
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- sort_query_ strstring_ for_ cache 
- Query string sorting, which is disabled by default. value:
- user_device_ strtype 
- When generating the cache key, add the client device type. value:
- user_geo str
- When generating the cache key, add the client geographic location. value:
- user_language str
- When generating the cache key, add the client language type. value:
- additionalCacheable StringPorts 
- Enable caching on the specified port. value: 8880, 2052, 2082, 2086, 2095, 2053, 2083, 2087, 2096.
- browserCache StringMode 
- Browser cache mode. value:
- browserCache StringTtl 
- The browser cache expiration time, in seconds.
- bypassCache String
- Set the cache bypass mode. value:
- cacheDeception StringArmor 
- Cache spoofing defense. Used to defend against Web cache spoofing attacks, the cached content that passes the check is cached. value:
- cacheReserve StringEligibility 
- Cache retention eligibility. Used to control whether the user request bypasses the cache retention node when returning to the source. value:
- cacheRule NumberId 
- The configured ConfigId. You can call the ListCacheRules operation to obtain the ConfigId.
- String
- When generating the cache key, check whether the cookie exists, and if so, add the cookie name to the cache key (the cookie name is not case sensitive). Multiple cookie names are supported, with multiple values separated by spaces.
- checkPresence StringHeader 
- When the cache key is generated, check whether the header exists. If the header exists, add the header name to the cache key (the header name is not case sensitive). You can enter multiple header names, with multiple values separated by spaces.
- edgeCache StringMode 
- Node cache mode. value:
- edgeCache StringTtl 
- The node cache expiration time, in seconds.
- edgeStatus StringCode Cache Ttl 
- Status code cache expiration time, in seconds.
- String
- When generating a cache key, it includes the specified cookie name and its value. You can enter multiple values separated by spaces.
- includeHeader String
- When generating a cache key, it includes the specified header name and its value. You can enter multiple values separated by spaces.
- queryString String
- The query string to be retained or deleted. You can enter multiple values separated by spaces.
- queryString StringMode 
- The processing mode for the query string when the cache key is generated. value:
- rule String
- The rule content.
- ruleEnable String
- Rule switch. value:
- ruleName String
- Rule name, you can find out the rule whose rule name is the passed field.
- serveStale String
- Response expiration cache. After enabling, nodes can still use cached expired files to respond to user requests even if the source server is unavailable. value:
- siteId Number
- The site ID, which can be obtained by calling the ListSites API.
- siteVersion Number
- Version number of the site configuration. For a site with configuration version management enabled, you can use this parameter to specify the site version in which the configuration takes effect. The default version is 0.
- sortQuery StringString For Cache 
- Query string sorting, which is disabled by default. value:
- userDevice StringType 
- When generating the cache key, add the client device type. value:
- userGeo String
- When generating the cache key, add the client geographic location. value:
- userLanguage String
- When generating the cache key, add the client language type. value:
Import
ESA Cache Rule can be imported using the id, e.g.
$ pulumi import alicloud:esa/cacheRule:CacheRule example <site_id>:<cache_rule_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.