Skip to content

Commit 5f3337f

Browse files
authored
chore(cloudfront): adding Managed cache policy (#30797)
### Reason for this change This Updated. https://aws.amazon.com/jp/about-aws/whats-new/2024/07/amazon-cloudfront-managed-cache-policies-web-applications/ ### Description of changes Adding Managed Cache Policies. - [UseOriginCacheControlHeaders](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html#managed-cache-policy-origin-cache-headers) - [UseOriginCacheControlHeaders-QueryStrings](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html#managed-cache-policy-origin-cache-headers-query-strings) ### Description of how you validated changes no ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 8b935a6 commit 5f3337f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/aws-cdk-lib/aws-cloudfront/lib/cache-policy.ts

+10
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ export class CachePolicy extends Resource implements ICachePolicy {
108108
/** Designed for use with an origin that is an AWS Elemental MediaPackage endpoint. */
109109
public static readonly ELEMENTAL_MEDIA_PACKAGE = CachePolicy.fromManagedCachePolicy('08627262-05a9-4f76-9ded-b50ca2e3a84f');
110110

111+
/**
112+
* Designed for use with an origin that returns Cache-Control HTTP response headers and does not serve different content based on values present in the query string.
113+
*/
114+
public static readonly USE_ORIGIN_CACHE_CONTROL_HEADERS = CachePolicy.fromManagedCachePolicy('83da9c7e-98b4-4e11-a168-04f0df8e2c65');
115+
116+
/**
117+
* Designed for use with an origin that returns Cache-Control HTTP response headers and serves different content based on values present in the query string.
118+
*/
119+
public static readonly USE_ORIGIN_CACHE_CONTROL_HEADERS_QUERY_STRINGS = CachePolicy.fromManagedCachePolicy('4cc15a8a-d715-48a4-82b8-cc0b614638fe');
120+
111121
/** Imports a Cache Policy from its id. */
112122
public static fromCachePolicyId(scope: Construct, id: string, cachePolicyId: string): ICachePolicy {
113123
return new class extends Resource implements ICachePolicy {

0 commit comments

Comments
 (0)