@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:37.053Z") @Stability(value=Stable) public class CachePolicy extends Resource implements ICachePolicy
Example:
// Using an existing cache policy for a Distribution
S3Origin bucketOrigin;
Distribution.Builder.create(this, "myDistManagedPolicy")
.defaultBehavior(BehaviorOptions.builder()
.origin(bucketOrigin)
.cachePolicy(CachePolicy.CACHING_OPTIMIZED)
.build())
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CachePolicy.Builder
A fluent builder for
CachePolicy. |
software.amazon.jsii.JsiiObject.InitializationModeICachePolicy.Jsii$Default, ICachePolicy.Jsii$ProxyIResource.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static ICachePolicy |
AMPLIFY
This policy is designed for use with an origin that is an AWS Amplify web app.
|
static ICachePolicy |
CACHING_DISABLED
Disables caching.
|
static ICachePolicy |
CACHING_OPTIMIZED
Optimize cache efficiency by minimizing the values that CloudFront includes in the cache key.
|
static ICachePolicy |
CACHING_OPTIMIZED_FOR_UNCOMPRESSED_OBJECTS
Optimize cache efficiency by minimizing the values that CloudFront includes in the cache key.
|
static ICachePolicy |
ELEMENTAL_MEDIA_PACKAGE
Designed for use with an origin that is an AWS Elemental MediaPackage endpoint.
|
| Modifier | Constructor and Description |
|---|---|
|
CachePolicy(software.constructs.Construct scope,
String id) |
|
CachePolicy(software.constructs.Construct scope,
String id,
CachePolicyProps props) |
protected |
CachePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CachePolicy(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static ICachePolicy |
fromCachePolicyId(software.constructs.Construct scope,
String id,
String cachePolicyId)
Imports a Cache Policy from its id.
|
String |
getCachePolicyId()
The ID of the cache policy.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final ICachePolicy AMPLIFY
@Stability(value=Stable) public static final ICachePolicy CACHING_DISABLED
This policy is useful for dynamic content and for requests that are not cacheable.
@Stability(value=Stable) public static final ICachePolicy CACHING_OPTIMIZED
Query strings and cookies are not included in the cache key, and only the normalized 'Accept-Encoding' header is included.
@Stability(value=Stable) public static final ICachePolicy CACHING_OPTIMIZED_FOR_UNCOMPRESSED_OBJECTS
Query strings and cookies are not included in the cache key, and only the normalized 'Accept-Encoding' header is included. Disables cache compression.
@Stability(value=Stable) public static final ICachePolicy ELEMENTAL_MEDIA_PACKAGE
protected CachePolicy(software.amazon.jsii.JsiiObjectRef objRef)
protected CachePolicy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CachePolicy(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
CachePolicyProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Stable)
public CachePolicy(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Stable) @NotNull public static ICachePolicy fromCachePolicyId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String cachePolicyId)
scope - This parameter is required.id - This parameter is required.cachePolicyId - This parameter is required.@Stability(value=Stable) @NotNull public String getCachePolicyId()
getCachePolicyId in interface ICachePolicyCopyright © 2022. All rights reserved.