@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:41.828Z") @Stability(value=Stable) public class CacheControl extends software.amazon.jsii.JsiiObject
Example:
Bucket destinationBucket;
BucketDeployment.Builder.create(this, "BucketDeployment")
.sources(List.of(Source.asset("./website", AssetOptions.builder().exclude(List.of("index.html")).build())))
.destinationBucket(destinationBucket)
.cacheControl(List.of(CacheControl.fromString("max-age=31536000,public,immutable")))
.prune(false)
.build();
BucketDeployment.Builder.create(this, "HTMLBucketDeployment")
.sources(List.of(Source.asset("./website", AssetOptions.builder().exclude(List.of("*", "!index.html")).build())))
.destinationBucket(destinationBucket)
.cacheControl(List.of(CacheControl.fromString("max-age=0,no-cache,no-store,must-revalidate")))
.prune(false)
.build();
| Modifier | Constructor and Description |
|---|---|
protected |
CacheControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CacheControl(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static CacheControl |
fromString(String s)
Constructs a custom cache control key from the literal value.
|
Object |
getValue()
The raw cache control setting.
|
static CacheControl |
maxAge(Duration t)
Sets 'max-age=
|
static CacheControl |
mustRevalidate()
Sets 'must-revalidate'.
|
static CacheControl |
noCache()
Sets 'no-cache'.
|
static CacheControl |
noTransform()
Sets 'no-transform'.
|
static CacheControl |
proxyRevalidate()
Sets 'proxy-revalidate'.
|
static CacheControl |
setPrivate()
Sets 'private'.
|
static CacheControl |
setPublic()
Sets 'public'.
|
static CacheControl |
sMaxAge(Duration t)
Sets 's-maxage=
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected CacheControl(software.amazon.jsii.JsiiObjectRef objRef)
protected CacheControl(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static CacheControl fromString(@NotNull String s)
s - This parameter is required.@Stability(value=Stable) @NotNull public static CacheControl maxAge(@NotNull Duration t)
t - This parameter is required.@Stability(value=Stable) @NotNull public static CacheControl mustRevalidate()
@Stability(value=Stable) @NotNull public static CacheControl noCache()
@Stability(value=Stable) @NotNull public static CacheControl noTransform()
@Stability(value=Stable) @NotNull public static CacheControl proxyRevalidate()
@Stability(value=Stable) @NotNull public static CacheControl setPrivate()
@Stability(value=Stable) @NotNull public static CacheControl setPublic()
@Stability(value=Stable) @NotNull public static CacheControl sMaxAge(@NotNull Duration t)
t - This parameter is required.@Stability(value=Stable) @NotNull public Object getValue()
Copyright © 2022. All rights reserved.