@aws-solutions-constructs/core
Version:
Core CDK Construct for patterns library
96 lines (95 loc) • 5.53 kB
TypeScript
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
* with the License. A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
import * as s3 from 'aws-cdk-lib/aws-s3';
import * as api from 'aws-cdk-lib/aws-apigateway';
import * as mediastore from 'aws-cdk-lib/aws-mediastore';
import { Construct } from 'constructs';
export interface CloudFrontDistributionForApiGatewayResponse {
readonly distribution: cloudfront.Distribution;
readonly cloudfrontFunction?: cloudfront.Function;
readonly loggingBucket?: s3.Bucket;
}
/**
* @internal This is an internal core function and should not be called directly by Solutions Constructs clients.
*/
export declare function CloudFrontDistributionForApiGateway(scope: Construct, apiEndPoint: api.RestApi, cloudFrontDistributionProps?: cloudfront.DistributionProps | any, httpSecurityHeaders?: boolean, cloudFrontLoggingBucketProps?: s3.BucketProps, responseHeadersPolicyProps?: cloudfront.ResponseHeadersPolicyProps): CloudFrontDistributionForApiGatewayResponse;
export interface CreateCloudFrontDistributionForS3Props {
readonly sourceBucket: s3.IBucket;
readonly cloudFrontDistributionProps?: cloudfront.DistributionProps | any;
readonly httpSecurityHeaders?: boolean;
readonly cloudFrontLoggingBucketProps?: s3.BucketProps;
readonly cloudFrontLoggingBucketS3AccessLogBucketProps?: s3.BucketProps;
readonly responseHeadersPolicyProps?: cloudfront.ResponseHeadersPolicyProps;
readonly logCloudFrontAccessLog?: boolean;
}
export interface CreateCloudFrontDistributionForS3Response {
readonly distribution: cloudfront.Distribution;
readonly loggingBucket?: s3.Bucket;
readonly loggingBucketS3AccesssLogBucket?: s3.Bucket;
readonly cloudfrontFunction?: cloudfront.Function;
readonly originAccessControl?: cloudfront.CfnOriginAccessControl;
}
/**
* @internal This is an internal core function and should not be called directly by Solutions Constructs clients.
*/
export declare function createCloudFrontDistributionForS3(scope: Construct, id: string, props: CreateCloudFrontDistributionForS3Props): CreateCloudFrontDistributionForS3Response;
export interface CreateCloudFrontOaiDistributionForS3Props {
readonly originPath?: string;
readonly sourceBucket: s3.IBucket;
readonly cloudFrontDistributionProps?: cloudfront.DistributionProps | any;
readonly httpSecurityHeaders?: boolean;
readonly cloudFrontLoggingBucketProps?: s3.BucketProps;
readonly cloudFrontLoggingBucketS3AccessLogBucketProps?: s3.BucketProps;
readonly responseHeadersPolicyProps?: cloudfront.ResponseHeadersPolicyProps;
readonly logCloudFrontAccessLog?: boolean;
}
export interface CreateCloudFrontOaiDistributionForS3Response {
readonly distribution: cloudfront.Distribution;
readonly loggingBucket?: s3.Bucket;
readonly loggingBucketS3AccesssLogBucket?: s3.Bucket;
readonly cloudfrontFunction?: cloudfront.Function;
readonly originAccessIdentity: cloudfront.OriginAccessIdentity;
}
/**
* @internal This is an internal core function and should not be called directly by Solutions Constructs clients.
*/
export declare function createCloudFrontOaiDistributionForS3(scope: Construct, props: CreateCloudFrontOaiDistributionForS3Props): CreateCloudFrontOaiDistributionForS3Response;
export interface CloudFrontDistributionForMediaStoreResponse {
readonly distribution: cloudfront.Distribution;
readonly loggingBucket?: s3.Bucket;
readonly requestPolicy: cloudfront.OriginRequestPolicy;
readonly cloudfrontFunction?: cloudfront.Function;
}
/**
* @internal This is an internal core function and should not be called directly by Solutions Constructs clients.
*/
export declare function CloudFrontDistributionForMediaStore(scope: Construct, mediaStoreContainer: mediastore.CfnContainer, cloudFrontDistributionProps?: cloudfront.DistributionProps | any, httpSecurityHeaders?: boolean, cloudFrontLoggingBucketProps?: s3.BucketProps, responseHeadersPolicyProps?: cloudfront.ResponseHeadersPolicyProps): CloudFrontDistributionForMediaStoreResponse;
/**
* @internal This is an internal core function and should not be called directly by Solutions Constructs clients.
*/
export declare function CloudFrontOriginAccessIdentity(scope: Construct, comment?: string): cloudfront.OriginAccessIdentity;
export interface CloudFrontProps {
readonly insertHttpSecurityHeaders?: boolean;
readonly responseHeadersPolicyProps?: cloudfront.ResponseHeadersPolicyProps;
}
export declare function CheckCloudFrontProps(propsObject: CloudFrontProps | any): void;
export interface CloudfrontS3Props {
readonly bucketProps?: s3.BucketProps;
readonly logS3AccessLogs?: boolean;
readonly loggingBucketProps?: s3.BucketProps;
readonly cloudFrontLoggingBucketProps?: s3.BucketProps;
readonly logCloudFrontAccessLog?: boolean;
readonly cloudFrontLoggingBucketAccessLogBucketProps?: s3.BucketProps;
}
export declare function CheckCloudfrontS3Props(props: CloudfrontS3Props): void;