@altostra/core
Version:
Core library for shared types and logic
171 lines (170 loc) • 7.27 kB
TypeScript
import type { Integer } from "../../../common/CustomTypes/Integer";
import type { NonEmptyString } from "../../../common/CustomTypes/NonEmptyString";
import type { NaturalNumber, NaturalNumberOrZero } from "../../../common/CustomTypes/Numerics";
import type { Arn } from "../../CustomTypes/Arn";
import type { AwsRegion } from "../AwsRegion";
import type { AwsResourceCommon, CloudFormationTags } from "../common";
import type { CloudFormationValue } from "../IntrinsicFunctions";
export declare type DeliveryStreamResourceType = 'AWS::KinesisFirehose::DeliveryStream';
export interface DeliveryStream extends AwsResourceCommon {
Type: DeliveryStreamResourceType;
Properties: KinesisDeliveryStreamProperties;
}
export interface KinesisDeliveryStreamPropertiesBase {
DeliveryStreamName?: string;
DeliveryStreamType: DeliveryStreamType;
KinesisStreamSourceConfiguration?: KinesisStreamSourceConfiguration;
Tags?: CloudFormationTags;
}
export declare type KinesisDeliveryStreamProperties = AnyKinesisDeliveryStreamProperties & TypedKinesisDeliveryStreamPropertiesBase;
export interface ElasticSearchKinesisDeliveryStreamProperties extends KinesisDeliveryStreamPropertiesBase {
ElasticsearchDestinationConfiguration: object;
}
export interface ExtendedS3KinesisDeliveryStreamProperties extends KinesisDeliveryStreamPropertiesBase {
ExtendedS3DestinationConfiguration: ExtendedS3DestinationConfiguration;
}
export interface RedshiftKinesisDeliveryStreamProperties extends KinesisDeliveryStreamPropertiesBase {
RedshiftDestinationConfiguration: object;
}
export interface S3KinesisDeliveryStreamProperties extends KinesisDeliveryStreamPropertiesBase {
S3DestinationConfiguration: S3DestinationConfiguration;
}
export interface SplunkKinesisDeliveryStreamProperties extends KinesisDeliveryStreamPropertiesBase {
SplunkDestinationConfiguration: object;
}
export declare type AnyKinesisDeliveryStreamProperties = ElasticSearchKinesisDeliveryStreamProperties | ExtendedS3KinesisDeliveryStreamProperties | RedshiftKinesisDeliveryStreamProperties | S3KinesisDeliveryStreamProperties | SplunkKinesisDeliveryStreamProperties;
export interface DataStreamKinesisDeliveryStreamPropertiesBase extends KinesisDeliveryStreamPropertiesBase {
DeliveryStreamType: 'KinesisStreamAsSource';
KinesisStreamSourceConfiguration: KinesisStreamSourceConfiguration;
}
export interface DirectPutKinesisDeliveryStreamPropertiesBase extends KinesisDeliveryStreamPropertiesBase {
DeliveryStreamType: 'DirectPut';
KinesisStreamSourceConfiguration?: never;
}
export declare type TypedKinesisDeliveryStreamPropertiesBase = DataStreamKinesisDeliveryStreamPropertiesBase | DirectPutKinesisDeliveryStreamPropertiesBase;
export declare type DeliveryStreamType = 'DirectPut' | 'KinesisStreamAsSource';
export interface KinesisStreamSourceConfiguration {
KinesisStreamARN: CloudFormationValue<Arn>;
RoleARN: CloudFormationValue<Arn>;
}
export interface S3DestinationConfiguration {
BucketARN: CloudFormationValue<Arn>;
BufferingHints: BufferingHints;
CloudWatchLoggingOptions?: CloudWatchLoggingOptions;
CompressionFormat: CompressionFormat;
EncryptionConfiguration?: EncryptionConfiguration;
ErrorOutputPrefix?: CloudFormationValue;
Prefix?: CloudFormationValue;
RoleARN: CloudFormationValue<Arn>;
}
export interface BufferingHints {
IntervalInSeconds: Integer;
SizeInMBs: Integer;
}
export interface CloudWatchLoggingOptions {
Enabled?: boolean;
LogGroupName?: CloudFormationValue;
LogStreamName?: CloudFormationValue;
}
export interface EncryptionConfiguration {
NoEncryptionConfig?: 'NoEncryption';
KMSEncryptionConfig?: KMSEncryptionConfig;
}
export interface KMSEncryptionConfig {
AWSKMSKeyARN: CloudFormationValue<Arn>;
}
export interface ExtendedS3DestinationConfiguration extends S3DestinationConfiguration {
DataFormatConversionConfiguration?: DataFormatConversionConfiguration;
ProcessingConfiguration?: ProcessingConfiguration;
S3BackupConfiguration?: S3DestinationConfiguration;
S3BackupMode?: Mode;
}
export interface DataFormatConversionConfiguration {
Enabled?: boolean;
InputFormatConfiguration?: InputFormatConfiguration;
OutputFormatConfiguration?: OutputFormatConfiguration;
SchemaConfiguration?: SchemaConfiguration;
}
export interface InputFormatConfiguration {
Deserializer?: Deserializer;
}
export interface Deserializer {
HiveJsonSerDe?: HiveJsonSerDe;
OpenXJsonSerDe?: OpenXJsonSerDe;
}
export interface HiveJsonSerDe {
TimestampFormats?: string[];
}
export interface OpenXJsonSerDe {
CaseInsensitive?: boolean;
ColumnToJsonKeyMappings?: Record<string, string>;
ConvertDotsInJsonKeysToUnderscores?: boolean;
}
export interface OutputFormatConfiguration {
Serializer?: Serializer;
}
export interface Serializer {
OrcSerDe?: OrcSerDe;
ParquetSerDe?: ParquetSerDe;
}
export interface OrcSerDe {
BlockSizeBytes?: NaturalNumber;
BloomFilterColumns?: string[] | null;
BloomFilterFalsePositiveProbability?: number;
Compression?: OrcSerDeCompression;
DictionaryKeyThreshold?: number;
EnablePadding?: boolean;
FormatVersion?: FormatVersion;
PaddingTolerance?: number;
RowIndexStride?: NaturalNumber;
StripeSizeBytes?: NaturalNumber;
}
export declare type FormatVersion = 'V0_11' | 'V0_12';
export declare type OrcSerDeCompression = 'NONE' | 'SNAPPY' | 'ZLIB';
export interface ParquetSerDe {
BlockSizeBytes?: NaturalNumber;
Compression?: ParquetSerDeCompression;
EnableDictionaryCompression?: boolean;
MaxPaddingBytes?: NaturalNumberOrZero;
PageSizeBytes?: NaturalNumber;
WriterVersion?: WriterVersion;
}
export declare type WriterVersion = 'V1' | 'V2';
export declare type ParquetSerDeCompression = 'GZIP' | 'SNAPPY' | 'UNCOMPRESSED';
export interface SchemaConfiguration {
CatalogId?: NonEmptyString;
DatabaseName: NonEmptyString;
Region?: AwsRegion;
RoleARN: CloudFormationValue<Arn>;
TableName: NonEmptyString;
VersionId?: NonEmptyString;
}
export interface ProcessingConfiguration {
Enabled?: boolean;
Processors?: Processor[];
}
export interface Processor {
Type: ProcessorType;
Parameters?: ProcessorParameter[];
}
export declare type ProcessorParameter = {
[K in keyof ProcessorParameterTypeMap]: _ProcessorParameter<K>;
}[keyof ProcessorParameterTypeMap];
export interface _ProcessorParameter<TParameter extends keyof ProcessorParameterTypeMap> {
ParameterName: TParameter;
ParameterValue: ProcessorParameterTypeMap[TParameter];
}
export interface ProcessorParameterTypeMap {
LambdaArn: CloudFormationValue<Arn>;
NumberOfRetries: NaturalNumberOrZero;
MetadataExtractionQuery: string;
JsonParsingEngine: string;
RoleArn: CloudFormationValue<Arn>;
BufferSizeInMBs: number;
BufferIntervalInSeconds: NaturalNumber;
SubRecordType: string;
Delimiter: string;
}
export declare type ProcessorType = 'AppendDelimiterToRecord' | 'Lambda' | 'MetadataExtraction' | 'RecordDeAggregation';
export declare type CompressionFormat = 'GZIP' | 'HADOOP_SNAPPY' | 'Snappy' | 'UNCOMPRESSED' | 'ZIP';
export declare type Mode = 'Disabled' | 'Enabled';