Skip to content

CacheRule

This class encapsulates and extends the ROS resource type ALIYUN::ESA::CacheRule.

Initializers

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkesa"
alicloudroscdkesa.NewCacheRule(scope Construct, id *string, props CacheRuleProps, enableResourcePropertyConstraint *bool) CacheRule
Name Type Description
scope github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct No description.
id *string No description.
props CacheRuleProps No description.
enableResourcePropertyConstraint *bool No description.

scopeRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Construct

idRequired

  • Type: *string

propsRequired


enableResourcePropertyConstraintOptional

  • Type: *bool

Methods

Name Description
ToString Returns a string representation of this construct.
Synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
AddCondition No description.
AddCount No description.
AddDependency No description.
AddResourceDesc No description.
ApplyRemovalPolicy No description.
FetchCondition No description.
FetchDependency No description.
FetchResourceDesc No description.
GetAtt No description.
SetMetadata No description.

ToString

func ToString() *string

Returns a string representation of this construct.

Synthesize

func Synthesize(session ISynthesisSession)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ISynthesisSession

The synthesis session.


AddCondition

func AddCondition(condition RosCondition)

conditionRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosCondition

AddCount

func AddCount(count interface{})

countRequired

  • Type: interface{}

AddDependency

func AddDependency(resource Resource)

resourceRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Resource

AddResourceDesc

func AddResourceDesc(desc *string)

descRequired

  • Type: *string

ApplyRemovalPolicy

func ApplyRemovalPolicy(policy RemovalPolicy)

policyRequired

  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RemovalPolicy

FetchCondition

func FetchCondition() RosCondition

FetchDependency

func FetchDependency() *[]*string

FetchResourceDesc

func FetchResourceDesc() *string

GetAtt

func GetAtt(name *string) IResolvable

nameRequired

  • Type: *string

SetMetadata

func SetMetadata(key *string, value interface{})

keyRequired

  • Type: *string

valueRequired

  • Type: interface{}

Static Functions

Name Description
IsConstruct Return whether the given object is a Construct.

IsConstruct

import "github.com/alibabacloud-go/ros-cdk/alicloudroscdkesa"
alicloudroscdkesa.CacheRule_IsConstruct(x interface{}) *bool

Return whether the given object is a Construct.

xRequired

  • Type: interface{}

Properties

Name Type Description
Node github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode The construct tree node associated with this construct.
Env github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.IResourceEnvironment The environment this resource belongs to.
Ref *string No description.
Stack github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack The stack in which this resource is defined.
Resource github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource No description.
AttrAdditionalCacheablePorts interface{} Attribute AdditionalCacheablePorts: Enable caching on specified ports.
AttrBrowserCacheMode interface{} Attribute BrowserCacheMode: Browser cache mode.
AttrBrowserCacheTtl interface{} Attribute BrowserCacheTtl: Browser cache expiration time in seconds.
AttrBypassCache interface{} Attribute BypassCache: Set the bypass cache mode.
AttrCacheDeceptionArmor interface{} Attribute CacheDeceptionArmor: Cache deception protection.
AttrCacheReserveEligibility interface{} Attribute CacheReserveEligibility: Cache retention eligibility.
AttrCacheRuleId interface{} Attribute CacheRuleId: Cache Rule Id.
AttrCheckPresenceCookie interface{} Attribute CheckPresenceCookie: When generating the cache key, check if the cookie exists.
AttrCheckPresenceHeader interface{} Attribute CheckPresenceHeader: When generating the cache key, check if the header exists.
AttrConfigType interface{} Attribute ConfigType: Configuration type, which can be used to query global or rule-based configurations.
AttrEdgeCacheMode interface{} Attribute EdgeCacheMode: Edge cache mode.
AttrEdgeCacheTtl interface{} Attribute EdgeCacheTtl: Edge cache expiration time in seconds.
AttrEdgeStatusCodeCacheTtl interface{} Attribute EdgeStatusCodeCacheTtl: Status code cache expiration time in seconds.
AttrIncludeCookie interface{} Attribute IncludeCookie: When generating the cache key, add the specified cookie names and their values.
AttrIncludeHeader interface{} Attribute IncludeHeader: When generating the cache key, add the specified header names and their values.
AttrQueryString interface{} Attribute QueryString: Query strings to be reserved or excluded.
AttrQueryStringMode interface{} Attribute QueryStringMode: The processing mode for query strings when generating the cache key.
AttrRule interface{} Attribute Rule: Rule content, using conditional expressions to match user requests.
AttrRuleEnable interface{} Attribute RuleEnable: Rule switch.
AttrRuleName interface{} Attribute RuleName: Rule name.
AttrSequence interface{} Attribute Sequence: Order of rule execution.
AttrServeStale interface{} Attribute ServeStale: Serve stale cache.
AttrSiteVersion interface{} Attribute SiteVersion: The version number of the site configuration.
AttrSortQueryStringForCache interface{} Attribute SortQueryStringForCache: Query string sorting, disabled by default.
AttrUserDeviceType interface{} Attribute UserDeviceType: When generating the cache key, add the client device type.
AttrUserGeo interface{} Attribute UserGeo: When generating the cache key, add the client's geographic location.
AttrUserLanguage interface{} Attribute UserLanguage: When generating cache keys, include the client's language type.
Props CacheRuleProps No description.

NodeRequired

func Node() ConstructNode
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.ConstructNode

The construct tree node associated with this construct.


EnvRequired

func Env() IResourceEnvironment
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.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.


RefRequired

func Ref() *string
  • Type: *string

StackRequired

func Stack() Stack
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.Stack

The stack in which this resource is defined.


ResourceOptional

func Resource() RosResource
  • Type: github.com/alibabacloud-go/ros-cdk/alicloudroscdkcore.RosResource

AttrAdditionalCacheablePortsRequired

func AttrAdditionalCacheablePorts() interface{}
  • Type: interface{}

Attribute AdditionalCacheablePorts: Enable caching on specified ports.


AttrBrowserCacheModeRequired

func AttrBrowserCacheMode() interface{}
  • Type: interface{}

Attribute BrowserCacheMode: Browser cache mode.


AttrBrowserCacheTtlRequired

func AttrBrowserCacheTtl() interface{}
  • Type: interface{}

Attribute BrowserCacheTtl: Browser cache expiration time in seconds.


AttrBypassCacheRequired

func AttrBypassCache() interface{}
  • Type: interface{}

Attribute BypassCache: Set the bypass cache mode.


AttrCacheDeceptionArmorRequired

func AttrCacheDeceptionArmor() interface{}
  • Type: interface{}

Attribute CacheDeceptionArmor: Cache deception protection.

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


AttrCacheReserveEligibilityRequired

func AttrCacheReserveEligibility() interface{}
  • Type: interface{}

Attribute CacheReserveEligibility: Cache retention eligibility.

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


AttrCacheRuleIdRequired

func AttrCacheRuleId() interface{}
  • Type: interface{}

Attribute CacheRuleId: Cache Rule Id.


AttrCheckPresenceCookieRequired

func AttrCheckPresenceCookie() interface{}
  • Type: interface{}

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.


AttrCheckPresenceHeaderRequired

func AttrCheckPresenceHeader() interface{}
  • Type: interface{}

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.


AttrConfigTypeRequired

func AttrConfigType() interface{}
  • Type: interface{}

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


AttrEdgeCacheModeRequired

func AttrEdgeCacheMode() interface{}
  • Type: interface{}

Attribute EdgeCacheMode: Edge cache mode.


AttrEdgeCacheTtlRequired

func AttrEdgeCacheTtl() interface{}
  • Type: interface{}

Attribute EdgeCacheTtl: Edge cache expiration time in seconds.


AttrEdgeStatusCodeCacheTtlRequired

func AttrEdgeStatusCodeCacheTtl() interface{}
  • Type: interface{}

Attribute EdgeStatusCodeCacheTtl: Status code cache expiration time in seconds.


AttrIncludeCookieRequired

func AttrIncludeCookie() interface{}
  • Type: interface{}

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

Multiple values are supported, separated by spaces.


AttrIncludeHeaderRequired

func AttrIncludeHeader() interface{}
  • Type: interface{}

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

Multiple values are supported, separated by spaces.


AttrQueryStringRequired

func AttrQueryString() interface{}
  • Type: interface{}

Attribute QueryString: Query strings to be reserved or excluded.

Multiple values are supported, separated by spaces.


AttrQueryStringModeRequired

func AttrQueryStringMode() interface{}
  • Type: interface{}

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


AttrRuleRequired

func AttrRule() interface{}
  • Type: interface{}

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

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


AttrRuleEnableRequired

func AttrRuleEnable() interface{}
  • Type: interface{}

Attribute RuleEnable: Rule switch.

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


AttrRuleNameRequired

func AttrRuleName() interface{}
  • Type: interface{}

Attribute RuleName: Rule name.

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


AttrSequenceRequired

func AttrSequence() interface{}
  • Type: interface{}

Attribute Sequence: Order of rule execution.

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


AttrServeStaleRequired

func AttrServeStale() interface{}
  • Type: interface{}

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.


AttrSiteVersionRequired

func AttrSiteVersion() interface{}
  • Type: interface{}

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.


AttrSortQueryStringForCacheRequired

func AttrSortQueryStringForCache() interface{}
  • Type: interface{}

Attribute SortQueryStringForCache: Query string sorting, disabled by default.


AttrUserDeviceTypeRequired

func AttrUserDeviceType() interface{}
  • Type: interface{}

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


AttrUserGeoRequired

func AttrUserGeo() interface{}
  • Type: interface{}

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


AttrUserLanguageRequired

func AttrUserLanguage() interface{}
  • Type: interface{}

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


PropsRequired

func Props() CacheRuleProps