aws_ddk_core.resources.KinesisFirehoseFactory¶
- class aws_ddk_core.resources.KinesisFirehoseFactory¶
Class factory create and configure Kinesis DDK resources, including Delivery Streams.
- __init__()¶
Methods
__init__
()delivery_stream
(scope, id, environment_id, ...)Create and configure Firehose delivery stream.
s3_destination
(id, environment_id, bucket[, ...])Create and configure Firehose delivery S3 destination.
- static delivery_stream(scope: constructs.Construct, id: str, environment_id: str, destinations: Sequence[aws_cdk.aws_kinesisfirehose_alpha.IDestination], delivery_stream_name: Optional[str] = None, encryption: Optional[aws_cdk.aws_kinesisfirehose_alpha.StreamEncryption] = None, encryption_key: Optional[aws_cdk.aws_kms.IKey] = None, role: Optional[aws_cdk.aws_iam.IRole] = None, source_stream: Optional[aws_cdk.aws_kinesis.IStream] = None, **firehose_props: Any) aws_cdk.aws_kinesisfirehose_alpha.IDeliveryStream ¶
Create and configure Firehose delivery stream.
- Parameters
scope (Construct) – Scope within which this construct is defined
id (str) – Identifier of the delivery stream
environment_id (str) – Identifier of the environment
destinations (Sequence[firehose.IDestination]) – The destinations that this delivery stream will deliver data to
delivery_stream_name (Optional[str] = None) – A name for the delivery stream
encryption (Optional[firehose.StreamEncryption] = None) – Indicates the type of customer master key (CMK) to use for server-side encryption, if any. Default: StreamEncryption.UNENCRYPTED
encryption_key (Optional[IKey] = None) – Customer managed key to server-side encrypt data in the stream. Default: - no KMS key will be used
role (Optional[IRole] = None) – The IAM role associated with this delivery stream. Assumed by Kinesis Data Firehose to read from sources and encrypt data server-side. Default: - a role will be created with default permissions.
source_stream (Optional[IStream] = None) – The Kinesis data stream to use as a source for this delivery stream
**firehose_props (Any) – Additional properties. For complete list of properties refer to CDK Documentation - Firehose Delivery Stream: https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_kinesisfirehose/DeliveryStream.html
- Returns
delivery_stream – A Kinesis Firehose Delivery Stream
- Return type
firehose.IDeliveryStream
- static s3_destination(id: str, environment_id: str, bucket: aws_cdk.aws_s3.IBucket, buffering_interval: typing.Optional[aws_ddk_core.resources.commons.Duration] = None, buffering_size: typing.Optional[aws_ddk_core.resources.commons.Size] = None, compression: typing.Optional[aws_cdk.aws_kinesisfirehose_destinations_alpha.Compression] = <aws_cdk.aws_kinesisfirehose_destinations_alpha.Compression object>, data_output_prefix: typing.Optional[str] = None, encryption_key: typing.Optional[aws_cdk.aws_kms.IKey] = None, error_output_prefix: typing.Optional[str] = None, logging: typing.Optional[bool] = True, log_group: typing.Optional[aws_cdk.aws_logs.ILogGroup] = None, processor: typing.Optional[aws_cdk.aws_kinesisfirehose_alpha.IDataProcessor] = None, role: typing.Optional[aws_cdk.aws_iam.IRole] = None, s3_backup: typing.Optional[aws_cdk.aws_kinesisfirehose_destinations_alpha.DestinationS3BackupProps] = None, **destination_props: typing.Any) aws_cdk.aws_kinesisfirehose_destinations_alpha.S3Bucket ¶
Create and configure Firehose delivery S3 destination.
This construct allows to configure parameters of the firehose destination using ddk.json configuration file depending on the environment_id in which the function is used. Supported parameters are: buffering_interval and buffering_size
- Parameters
id (str) – Identifier of the destination
environment_id (str) – Identifier of the environment
bucket (IBucket) – S3 Bucket to use for the destination.
buffering_interval (Optional[Duration] = None) – The length of time that Firehose buffers incoming data before delivering it to the S3 bucket. Minimum: Duration.seconds(60) Maximum: Duration.seconds(900) Default: Duration.seconds(300)
buffering_size (Optional[Size] = None) – The size of the buffer that Kinesis Data Firehose uses for incoming data before delivering it to the S3 bucket. Minimum: Size.mebibytes(1) Maximum: Size.mebibytes(128) Default: Size.mebibytes(5)
compression (Optional[Compression] = None) – The type of compression that Kinesis Data Firehose uses to compress the data that it delivers to the Amazon S3 bucket. Default: Compression.GZIP
data_output_prefix (Optional[str] = None) – A prefix that Kinesis Data Firehose evaluates and adds to records before writing them to S3
encryption_key (Optional[IKey] = None) – The AWS KMS key used to encrypt the data that it delivers to your Amazon S3 bucket.
error_output_prefix (Optional[str] = None) – A prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. This prefix appears immediately following the bucket name
logging (Optional[bool] = True) – If true, log errors when data transformation or data delivery fails. If logGroup is provided, this will be implicitly set to true. Default: true - errors are logged.
log_group (Optional[ILogGroup] = None) – The CloudWatch log group where log streams will be created to hold error logs. Default: - if logging is set to true, a log group will be created for you.
processor (Optional[IDataProcessor] = None) – The data transformation that should be performed on the data before writing to the destination.
role (Optional[IRole] = None) – The IAM role associated with this destination. Assumed by Kinesis Data Firehose to invoke processors and write to destinations
s3_backup (Optional[DestinationS3BackupProps] = None) – The configuration for backing up source records to S3.
**destination_props (Any) – Additional properties. For complete list of properties refer to CDK Documentation - Firehose S3 Destinations: https://docs.aws.amazon.com/cdk/api/v1/python/aws_cdk.aws_kinesisfirehose_destinations/S3Bucket.html
- Returns
destination – A Kinesis Firehose S3 Delivery Destination
- Return type
destinations.S3Bucket