cdk-nextjs
Version:
Deploy Next.js apps on AWS with CDK
47 lines (46 loc) • 2.38 kB
TypeScript
import { Distribution } from "aws-cdk-lib/aws-cloudfront";
import { Construct } from "constructs";
import { OptionalNextjsDistributionProps } from "../generated-structs/OptionalNextjsDistributionProps";
import { NextjsFunctions, NextjsFunctionsOverrides, NextjsFunctionsProps } from "../nextjs-compute/nextjs-functions";
import { NextjsDistribution, NextjsDistributionOverrides } from "../nextjs-distribution";
import { NextjsBaseConstructOverrides, NextjsBaseOverrides, NextjsBaseConstruct, NextjsBaseProps } from "./nextjs-base-construct";
export interface NextjsGlobalFunctionsConstructOverrides extends NextjsBaseConstructOverrides {
readonly nextjsFunctionsProps?: NextjsFunctionsProps;
readonly nextjsDistributionProps?: OptionalNextjsDistributionProps;
}
/**
* Overrides for `NextjsGlobalFunctions`. Overrides are lower level than
* props and are passed directly to CDK Constructs giving you more control. It's
* recommended to use caution and review source code so you know how they're used.
*/
export interface NextjsGlobalFunctionsOverrides extends NextjsBaseOverrides {
readonly nextjsGlobalFunctions?: NextjsGlobalFunctionsConstructOverrides;
readonly nextjsFunctions?: NextjsFunctionsOverrides;
readonly nextjsDistribution?: NextjsDistributionOverrides;
}
export interface NextjsGlobalFunctionsProps extends NextjsBaseProps {
/**
* Bring your own distribution. Can be used with `basePath` to host multiple
* apps on the same CloudFront distribution.
*/
readonly distribution?: Distribution;
/**
* Override props of any construct.
*/
readonly overrides?: NextjsGlobalFunctionsOverrides;
}
/**
* Deploy Next.js globally distributed with functions. Uses [CloudFront
* Distribution](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.html)
* as Content Delivery Network (CDN) for global distribution and [AWS Lambda Functions](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html)
* for functions.
*/
export declare class NextjsGlobalFunctions extends NextjsBaseConstruct {
nextjsFunctions: NextjsFunctions;
nextjsDistribution: NextjsDistribution;
get url(): string;
private props;
constructor(scope: Construct, id: string, props: NextjsGlobalFunctionsProps);
private createNextjsFunctions;
private createNextjsDistribution;
}