CacheCookieBehavior

class aws_cdk.aws_cloudfront.CacheCookieBehavior(*args: Any, **kwargs)

Bases: object

Determines whether any cookies in viewer requests are included in the cache key and automatically included in requests that CloudFront sends to the origin.

Attributes

behavior

allow all, none, an allow list, or a deny list.

Type

The behavior of cookies

Return type

str

cookies

The cookies to allow or deny, if the behavior is an allow or deny list.

Return type

Optional[List[str]]

Static Methods

classmethod all()

All cookies in viewer requests are included in the cache key and are automatically included in requests that CloudFront sends to the origin.

Return type

CacheCookieBehavior

classmethod allow_list(*cookies)

Only the provided cookies are included in the cache key and automatically included in requests that CloudFront sends to the origin.

Parameters

cookies (str) –

Return type

CacheCookieBehavior

classmethod deny_list(*cookies)

All cookies except the provided cookies are included in the cache key and automatically included in requests that CloudFront sends to the origin.

Parameters

cookies (str) –

Return type

CacheCookieBehavior

classmethod none()

Cookies in viewer requests are not included in the cache key and are not automatically included in requests that CloudFront sends to the origin.

Return type

CacheCookieBehavior