cdk-nextjs
Version:
Deploy Next.js apps on AWS with CDK
71 lines (70 loc) • 2.61 kB
TypeScript
import type { aws_cloudfront, Duration } from 'aws-cdk-lib';
/**
* OptionalS3OriginBucketWithOACProps
*/
export interface OptionalS3OriginBucketWithOACProps {
/**
* The level of permissions granted in the bucket policy and key policy (if applicable) to the CloudFront distribution.
* @default [AccessLevel.READ]
* @stability stable
*/
readonly originAccessLevels?: Array<aws_cloudfront.AccessLevel>;
/**
* An optional Origin Access Control.
* @default - an Origin Access Control will be created.
* @stability stable
*/
readonly originAccessControl?: aws_cloudfront.IOriginAccessControl;
/**
* An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
* Must begin, but not end, with '/' (e.g., '/production/images').
* @default '/'
* @stability stable
*/
readonly originPath?: string;
/**
* When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.
* @default - origin shield not enabled
* @stability stable
*/
readonly originShieldRegion?: string;
/**
* Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.
* @default - true
* @stability stable
*/
readonly originShieldEnabled?: boolean;
/**
* A unique identifier for the origin.
* This value must be unique within the distribution.
* @default - an originid will be generated for you
* @stability stable
*/
readonly originId?: string;
/**
* The unique identifier of an origin access control for this origin.
* @default - no origin access control
* @stability stable
*/
readonly originAccessControlId?: string;
/**
* A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.
* @default {}
* @stability stable
*/
readonly customHeaders?: Record<string, string>;
/**
* The number of seconds that CloudFront waits when trying to establish a connection to the origin.
* Valid values are 1-10 seconds, inclusive.
* @default Duration.seconds(10)
* @stability stable
*/
readonly connectionTimeout?: Duration;
/**
* The number of times that CloudFront attempts to connect to the origin;
* valid values are 1, 2, or 3 attempts.
* @default 3
* @stability stable
*/
readonly connectionAttempts?: number;
}