UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

71 lines (70 loc) 3.01 kB
import { Construct } from 'constructs'; import { CommonDestinationProps, CommonDestinationS3Props } from './common'; import { DestinationBindOptions, DestinationConfig, IDestination } from './destination'; import { IInputFormat, IOutputFormat, SchemaConfiguration } from './record-format'; import * as s3 from '../../aws-s3'; import * as cdk from '../../core'; /** * Props for defining an S3 destination of an Amazon Data Firehose delivery stream. */ export interface S3BucketProps extends CommonDestinationS3Props, CommonDestinationProps { /** * Specify a file extension. * It will override the default file extension appended by Data Format Conversion or S3 compression features such as `.parquet` or `.gz`. * * File extension must start with a period (`.`) and can contain allowed characters: `0-9a-z!-_.*'()`. * * @see https://docs.aws.amazon.com/firehose/latest/dev/create-destination.html#create-destination-s3 * @default - The default file extension appended by Data Format Conversion or S3 compression features */ readonly fileExtension?: string; /** * The time zone you prefer. * * @see https://docs.aws.amazon.com/firehose/latest/dev/s3-prefixes.html#timestamp-namespace * * @default - UTC */ readonly timeZone?: cdk.TimeZone; /** * The input format, output format, and schema config for converting data from the JSON format to the Parquet or ORC format before writing to Amazon S3. * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-extendeds3destinationconfiguration.html#cfn-kinesisfirehose-deliverystream-extendeds3destinationconfiguration-dataformatconversionconfiguration * * @default no data format conversion is done */ readonly dataFormatConversion?: DataFormatConversionProps; } /** * Props for specifying data format conversion for Firehose * * @see https://docs.aws.amazon.com/firehose/latest/dev/record-format-conversion.html */ export interface DataFormatConversionProps { /** * Whether data format conversion is enabled or not. * * @default `true` */ readonly enabled?: boolean; /** * The schema configuration to use in converting the input format to output format */ readonly schemaConfiguration: SchemaConfiguration; /** * The input format to convert from for record format conversion */ readonly inputFormat: IInputFormat; /** * The output format to convert to for record format conversion */ readonly outputFormat: IOutputFormat; } /** * An S3 bucket destination for data from an Amazon Data Firehose delivery stream. */ export declare class S3Bucket implements IDestination { private readonly bucket; private readonly props; constructor(bucket: s3.IBucket, props?: S3BucketProps); bind(scope: Construct, _options: DestinationBindOptions): DestinationConfig; private getS3BackupMode; }