aws-cdk-lib.aws_codepipeline_actions.CacheControl

class CacheControl

LanguageType name
.NETAmazon.CDK.AWS.CodePipeline.Actions.CacheControl
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscodepipelineactions#CacheControl
Javasoftware.amazon.awscdk.services.codepipeline.actions.CacheControl
Pythonaws_cdk.aws_codepipeline_actions.CacheControl
TypeScript (source)aws-cdk-lib » aws_codepipeline_actions » CacheControl

Used for HTTP cache-control header, which influences downstream caches.

Use the provided static factory methods to construct instances of this class. Used in the S3DeployActionProps.cacheControl property.

See also: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codepipeline_actions as codepipeline_actions } from 'aws-cdk-lib';
const cacheControl = codepipeline_actions.CacheControl.fromString('s');

Properties

NameTypeDescription
valuestringthe actual text value of the created directive.

value

Type: string

the actual text value of the created directive.

Methods

NameDescription
static fromString(s)Allows you to create an arbitrary cache control directive, in case our support is missing a method for a particular directive.
static maxAge(t)The 'max-age' cache control directive.
static mustRevalidate()The 'must-revalidate' cache control directive.
static noCache()The 'no-cache' cache control directive.
static noTransform()The 'no-transform' cache control directive.
static proxyRevalidate()The 'proxy-revalidate' cache control directive.
static sMaxAge(t)The 's-max-age' cache control directive.
static setPrivate()The 'private' cache control directive.
static setPublic()The 'public' cache control directive.

static fromString(s)

public static fromString(s: string): CacheControl

Parameters

  • s string

Returns

  • CacheControl

Allows you to create an arbitrary cache control directive, in case our support is missing a method for a particular directive.


static maxAge(t)

public static maxAge(t: Duration): CacheControl

Parameters

  • t Duration

Returns

  • CacheControl

The 'max-age' cache control directive.


static mustRevalidate()

public static mustRevalidate(): CacheControl

Returns

  • CacheControl

The 'must-revalidate' cache control directive.


static noCache()

public static noCache(): CacheControl

Returns

  • CacheControl

The 'no-cache' cache control directive.


static noTransform()

public static noTransform(): CacheControl

Returns

  • CacheControl

The 'no-transform' cache control directive.


static proxyRevalidate()

public static proxyRevalidate(): CacheControl

Returns

  • CacheControl

The 'proxy-revalidate' cache control directive.


static sMaxAge(t)

public static sMaxAge(t: Duration): CacheControl

Parameters

  • t Duration

Returns

  • CacheControl

The 's-max-age' cache control directive.


static setPrivate()

public static setPrivate(): CacheControl

Returns

  • CacheControl

The 'private' cache control directive.


static setPublic()

public static setPublic(): CacheControl

Returns

  • CacheControl

The 'public' cache control directive.