Skip to content

ICacheRule

Represents a CacheRule.

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node for this construct.
env ros_cdk_core.IResourceEnvironment The environment this resource belongs to.
stack ros_cdk_core.Stack The stack in which this resource is defined.
attr_additional_cacheable_ports typing.Union[str, ros_cdk_core.IResolvable] Attribute AdditionalCacheablePorts: Enable caching on specified ports.
attr_browser_cache_mode typing.Union[str, ros_cdk_core.IResolvable] Attribute BrowserCacheMode: Browser cache mode.
attr_browser_cache_ttl typing.Union[str, ros_cdk_core.IResolvable] Attribute BrowserCacheTtl: Browser cache expiration time in seconds.
attr_bypass_cache typing.Union[str, ros_cdk_core.IResolvable] Attribute BypassCache: Set the bypass cache mode.
attr_cache_deception_armor typing.Union[str, ros_cdk_core.IResolvable] Attribute CacheDeceptionArmor: Cache deception protection.
attr_cache_reserve_eligibility typing.Union[str, ros_cdk_core.IResolvable] Attribute CacheReserveEligibility: Cache retention eligibility.
attr_cache_rule_id typing.Union[str, ros_cdk_core.IResolvable] Attribute CacheRuleId: Cache Rule Id.
attr_check_presence_cookie typing.Union[str, ros_cdk_core.IResolvable] Attribute CheckPresenceCookie: When generating the cache key, check if the cookie exists.
attr_check_presence_header typing.Union[str, ros_cdk_core.IResolvable] Attribute CheckPresenceHeader: When generating the cache key, check if the header exists.
attr_config_type typing.Union[str, ros_cdk_core.IResolvable] Attribute ConfigType: Configuration type, which can be used to query global or rule-based configurations.
attr_edge_cache_mode typing.Union[str, ros_cdk_core.IResolvable] Attribute EdgeCacheMode: Edge cache mode.
attr_edge_cache_ttl typing.Union[str, ros_cdk_core.IResolvable] Attribute EdgeCacheTtl: Edge cache expiration time in seconds.
attr_edge_status_code_cache_ttl typing.Union[str, ros_cdk_core.IResolvable] Attribute EdgeStatusCodeCacheTtl: Status code cache expiration time in seconds.
attr_include_cookie typing.Union[str, ros_cdk_core.IResolvable] Attribute IncludeCookie: When generating the cache key, add the specified cookie names and their values.
attr_include_header typing.Union[str, ros_cdk_core.IResolvable] Attribute IncludeHeader: When generating the cache key, add the specified header names and their values.
attr_query_string typing.Union[str, ros_cdk_core.IResolvable] Attribute QueryString: Query strings to be reserved or excluded.
attr_query_string_mode typing.Union[str, ros_cdk_core.IResolvable] Attribute QueryStringMode: The processing mode for query strings when generating the cache key.
attr_rule typing.Union[str, ros_cdk_core.IResolvable] Attribute Rule: Rule content, using conditional expressions to match user requests.
attr_rule_enable typing.Union[str, ros_cdk_core.IResolvable] Attribute RuleEnable: Rule switch.
attr_rule_name typing.Union[str, ros_cdk_core.IResolvable] Attribute RuleName: Rule name.
attr_sequence typing.Union[str, ros_cdk_core.IResolvable] Attribute Sequence: Order of rule execution.
attr_serve_stale typing.Union[str, ros_cdk_core.IResolvable] Attribute ServeStale: Serve stale cache.
attr_site_version typing.Union[str, ros_cdk_core.IResolvable] Attribute SiteVersion: The version number of the site configuration.
attr_sort_query_string_for_cache typing.Union[str, ros_cdk_core.IResolvable] Attribute SortQueryStringForCache: Query string sorting, disabled by default.
attr_user_device_type typing.Union[str, ros_cdk_core.IResolvable] Attribute UserDeviceType: When generating the cache key, add the client device type.
attr_user_geo typing.Union[str, ros_cdk_core.IResolvable] Attribute UserGeo: When generating the cache key, add the client's geographic location.
attr_user_language typing.Union[str, ros_cdk_core.IResolvable] Attribute UserLanguage: When generating cache keys, include the client's language type.
props CacheRuleProps No description.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node for this construct.


envRequired

env: IResourceEnvironment
  • Type: ros_cdk_core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


attr_additional_cacheable_portsRequired

attr_additional_cacheable_ports: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute AdditionalCacheablePorts: Enable caching on specified ports.


attr_browser_cache_modeRequired

attr_browser_cache_mode: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute BrowserCacheMode: Browser cache mode.


attr_browser_cache_ttlRequired

attr_browser_cache_ttl: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute BrowserCacheTtl: Browser cache expiration time in seconds.


attr_bypass_cacheRequired

attr_bypass_cache: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute BypassCache: Set the bypass cache mode.


attr_cache_deception_armorRequired

attr_cache_deception_armor: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute CacheDeceptionArmor: Cache deception protection.

Used to defend against web cache deception attacks, only the cache content that passes the validation will be cached.


attr_cache_reserve_eligibilityRequired

attr_cache_reserve_eligibility: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute CacheReserveEligibility: Cache retention eligibility.

Used to control whether user requests bypass the cache retention node when returning to the origin.


attr_cache_rule_idRequired

attr_cache_rule_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute CacheRuleId: Cache Rule Id.


attr_check_presence_cookieRequired

attr_check_presence_cookie: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute CheckPresenceCookie: When generating the cache key, check if the cookie exists.

If it does, add the cookie name (case-insensitive) to the cache key. Multiple cookie names are supported, separated by spaces.


attr_check_presence_headerRequired

attr_check_presence_header: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute CheckPresenceHeader: When generating the cache key, check if the header exists.

If it does, add the header name (case-insensitive) to the cache key. Multiple header names are supported, separated by spaces.


attr_config_typeRequired

attr_config_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ConfigType: Configuration type, which can be used to query global or rule-based configurations.


attr_edge_cache_modeRequired

attr_edge_cache_mode: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute EdgeCacheMode: Edge cache mode.


attr_edge_cache_ttlRequired

attr_edge_cache_ttl: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute EdgeCacheTtl: Edge cache expiration time in seconds.


attr_edge_status_code_cache_ttlRequired

attr_edge_status_code_cache_ttl: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute EdgeStatusCodeCacheTtl: Status code cache expiration time in seconds.


attr_include_cookieRequired

attr_include_cookie: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute IncludeCookie: When generating the cache key, add the specified cookie names and their values.

Multiple values are supported, separated by spaces.


attr_include_headerRequired

attr_include_header: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute IncludeHeader: When generating the cache key, add the specified header names and their values.

Multiple values are supported, separated by spaces.


attr_query_stringRequired

attr_query_string: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute QueryString: Query strings to be reserved or excluded.

Multiple values are supported, separated by spaces.


attr_query_string_modeRequired

attr_query_string_mode: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute QueryStringMode: The processing mode for query strings when generating the cache key.


attr_ruleRequired

attr_rule: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Rule: Rule content, using conditional expressions to match user requests.

When adding global configuration, this parameter does not need to be set.


attr_rule_enableRequired

attr_rule_enable: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute RuleEnable: Rule switch.

When adding global configuration, this parameter does not need to be set.


attr_rule_nameRequired

attr_rule_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute RuleName: Rule name.

When adding global configuration, this parameter does not need to be set.


attr_sequenceRequired

attr_sequence: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute Sequence: Order of rule execution.

The smaller the value, the higher the priority for execution.


attr_serve_staleRequired

attr_serve_stale: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute ServeStale: Serve stale cache.

When enabled, the node can still respond to user requests with expired cached files when the origin server is unavailable.


attr_site_versionRequired

attr_site_version: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute SiteVersion: The version number of the site configuration.

For sites that have enabled configuration version management, this parameter can be used to specify the effective version of the configuration site, which defaults to version 0.


attr_sort_query_string_for_cacheRequired

attr_sort_query_string_for_cache: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute SortQueryStringForCache: Query string sorting, disabled by default.


attr_user_device_typeRequired

attr_user_device_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute UserDeviceType: When generating the cache key, add the client device type.


attr_user_geoRequired

attr_user_geo: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute UserGeo: When generating the cache key, add the client's geographic location.


attr_user_languageRequired

attr_user_language: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Attribute UserLanguage: When generating cache keys, include the client's language type.


propsRequired

props: CacheRuleProps