@aws/cloudfront-hosting-toolkit
Version:
CloudFront Hosting Toolkit offers the convenience of a managed frontend hosting service while retaining full control over the hosting and deployment infrastructure to make it your own.
59 lines (58 loc) • 1.99 kB
TypeScript
import { aws_cloudfront as cloudfront, aws_s3 as s3 } from "aws-cdk-lib";
import { Construct } from "constructs";
import { HostingInfrastructure } from "./hosting_infrastructure";
import { PipelineInfrastructure } from "./pipeline_infrastructure";
import { HostingConfiguration } from "../bin/cli/shared/types";
interface IParamProps {
hostingConfiguration: HostingConfiguration;
buildFilePath: string;
cffSourceFilePath: string;
connectionArn?: string;
certificateArn?: string;
}
/**
* Custom CDK Construct for hosting resources.
*
* This construct sets up hosting based on the provided configuration,
* build file path, and optional connection and certificate ARNs.
*
* @param scope - The Construct scope in which this construct is defined.
* @param id - The identifier for this construct within the scope.
* @param params - Parameters for configuring hosting resources.
*/
export declare class Hosting extends Construct {
/**
* The CloudFront Distribution created by this construct.
*/
readonly distribution: cloudfront.Distribution;
/**
* The S3 Bucket used for hosting the content.
*/
readonly hostingBucket: s3.IBucket;
/**
* The CloudFront Function used for URI manipulation.
*/
readonly changeUriFunction: cloudfront.Function;
/**
* The Key-Value Store used by CloudFront.
*/
readonly uriStore: cloudfront.KeyValueStore;
/**
* The distribution's domain name.
*/
readonly distributionDomainName: string;
/**
* The distribution's URL (https://{domainName}).
*/
readonly distributionUrl: string;
/**
* Reference to the hosting infrastructure construct.
*/
readonly hostingInfrastructure: HostingInfrastructure;
/**
* Reference to the pipeline infrastructure construct.
*/
readonly pipelineInfrastructure: PipelineInfrastructure;
constructor(scope: Construct, id: string, params: IParamProps);
}
export {};