Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates a Kinesis Data Firehose delivery stream.
By default, you can create up to 50 delivery streams per AWS Region.
This is an asynchronous operation that immediately returns. The initial status of the delivery stream is CREATING
. After the delivery stream is created, its status is ACTIVE
and it now accepts data. Attempts to send data to a delivery stream that is not in the ACTIVE
state cause an exception. To check the state of a delivery stream, use DescribeDeliveryStream
.
A Kinesis Data Firehose delivery stream can be configured to receive records directly from providers using PutRecord
or PutRecordBatch
, or it can be configured to use an existing Kinesis stream as its source. To specify a Kinesis data stream as input, set the DeliveryStreamType
parameter to KinesisStreamAsSource
, and provide the Kinesis stream Amazon Resource Name (ARN) and role ARN in the KinesisStreamSourceConfiguration
parameter.
A delivery stream is configured with a single destination: Amazon S3, Amazon ES, Amazon Redshift, or Splunk. You must specify only one of the following destination configuration parameters: ExtendedS3DestinationConfiguration , S3DestinationConfiguration , ElasticsearchDestinationConfiguration , RedshiftDestinationConfiguration , or SplunkDestinationConfiguration .
When you specify S3DestinationConfiguration , you can also provide the following optional values: BufferingHints , EncryptionConfiguration , and CompressionFormat . By default, if no BufferingHints value is provided, Kinesis Data Firehose buffers data up to 5 MB or for 5 minutes, whichever condition is satisfied first. BufferingHints is a hint, so there are some cases where the service cannot adhere to these conditions strictly. For example, record boundaries might be such that the size is a little over or under the configured buffering size. By default, no encryption is performed. We strongly recommend that you enable encryption to ensure secure data storage in Amazon S3.
A few notes about Amazon Redshift as a destination:
- An Amazon Redshift destination requires an S3 bucket as intermediate location. Kinesis Data Firehose first delivers data to Amazon S3 and then uses
COPY
syntax to load data into an Amazon Redshift table. This is specified in the RedshiftDestinationConfiguration.S3Configuration parameter. - The compression formats
SNAPPY
orZIP
cannot be specified inRedshiftDestinationConfiguration.S3Configuration
because the Amazon RedshiftCOPY
operation that reads from the S3 bucket doesn't support these compression formats. - We strongly recommend that you use the user name and password you provide exclusively with Kinesis Data Firehose, and that the permissions for the account are restricted for Amazon Redshift
INSERT
permissions.
Kinesis Data Firehose assumes the IAM role that is configured as part of the destination. The role should allow the Kinesis Data Firehose principal to assume the role, and the role should have permissions that allow the service to deliver the data. For more information, see Grant Kinesis Data Firehose Access to an Amazon S3 Destination in the Amazon Kinesis Data Firehose Developer Guide .
Synopsis
- createDeliveryStream :: Text -> CreateDeliveryStream
- data CreateDeliveryStream
- cdsS3DestinationConfiguration :: Lens' CreateDeliveryStream (Maybe S3DestinationConfiguration)
- cdsRedshiftDestinationConfiguration :: Lens' CreateDeliveryStream (Maybe RedshiftDestinationConfiguration)
- cdsElasticsearchDestinationConfiguration :: Lens' CreateDeliveryStream (Maybe ElasticsearchDestinationConfiguration)
- cdsExtendedS3DestinationConfiguration :: Lens' CreateDeliveryStream (Maybe ExtendedS3DestinationConfiguration)
- cdsKinesisStreamSourceConfiguration :: Lens' CreateDeliveryStream (Maybe KinesisStreamSourceConfiguration)
- cdsDeliveryStreamType :: Lens' CreateDeliveryStream (Maybe DeliveryStreamType)
- cdsSplunkDestinationConfiguration :: Lens' CreateDeliveryStream (Maybe SplunkDestinationConfiguration)
- cdsDeliveryStreamName :: Lens' CreateDeliveryStream Text
- createDeliveryStreamResponse :: Int -> CreateDeliveryStreamResponse
- data CreateDeliveryStreamResponse
- cdsrsDeliveryStreamARN :: Lens' CreateDeliveryStreamResponse (Maybe Text)
- cdsrsResponseStatus :: Lens' CreateDeliveryStreamResponse Int
Creating a Request
Creates a value of CreateDeliveryStream
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cdsS3DestinationConfiguration
- [Deprecated] The destination in Amazon S3. You can specify only one destination.cdsRedshiftDestinationConfiguration
- The destination in Amazon Redshift. You can specify only one destination.cdsElasticsearchDestinationConfiguration
- The destination in Amazon ES. You can specify only one destination.cdsExtendedS3DestinationConfiguration
- The destination in Amazon S3. You can specify only one destination.cdsKinesisStreamSourceConfiguration
- When a Kinesis data stream is used as the source for the delivery stream, aKinesisStreamSourceConfiguration
containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.cdsDeliveryStreamType
- The delivery stream type. This parameter can be one of the following values: *DirectPut
: Provider applications access the delivery stream directly. *KinesisStreamAsSource
: The delivery stream uses a Kinesis data stream as a source.cdsSplunkDestinationConfiguration
- The destination in Splunk. You can specify only one destination.cdsDeliveryStreamName
- The name of the delivery stream. This name must be unique per AWS account in the same AWS Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.
data CreateDeliveryStream Source #
See: createDeliveryStream
smart constructor.
Instances
Request Lenses
cdsS3DestinationConfiguration :: Lens' CreateDeliveryStream (Maybe S3DestinationConfiguration) Source #
- Deprecated
- The destination in Amazon S3. You can specify only one destination.
cdsRedshiftDestinationConfiguration :: Lens' CreateDeliveryStream (Maybe RedshiftDestinationConfiguration) Source #
The destination in Amazon Redshift. You can specify only one destination.
cdsElasticsearchDestinationConfiguration :: Lens' CreateDeliveryStream (Maybe ElasticsearchDestinationConfiguration) Source #
The destination in Amazon ES. You can specify only one destination.
cdsExtendedS3DestinationConfiguration :: Lens' CreateDeliveryStream (Maybe ExtendedS3DestinationConfiguration) Source #
The destination in Amazon S3. You can specify only one destination.
cdsKinesisStreamSourceConfiguration :: Lens' CreateDeliveryStream (Maybe KinesisStreamSourceConfiguration) Source #
When a Kinesis data stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration
containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.
cdsDeliveryStreamType :: Lens' CreateDeliveryStream (Maybe DeliveryStreamType) Source #
The delivery stream type. This parameter can be one of the following values: * DirectPut
: Provider applications access the delivery stream directly. * KinesisStreamAsSource
: The delivery stream uses a Kinesis data stream as a source.
cdsSplunkDestinationConfiguration :: Lens' CreateDeliveryStream (Maybe SplunkDestinationConfiguration) Source #
The destination in Splunk. You can specify only one destination.
cdsDeliveryStreamName :: Lens' CreateDeliveryStream Text Source #
The name of the delivery stream. This name must be unique per AWS account in the same AWS Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.
Destructuring the Response
createDeliveryStreamResponse Source #
Creates a value of CreateDeliveryStreamResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
cdsrsDeliveryStreamARN
- The ARN of the delivery stream.cdsrsResponseStatus
- -- | The response status code.
data CreateDeliveryStreamResponse Source #
See: createDeliveryStreamResponse
smart constructor.
Instances
Response Lenses
cdsrsDeliveryStreamARN :: Lens' CreateDeliveryStreamResponse (Maybe Text) Source #
The ARN of the delivery stream.
cdsrsResponseStatus :: Lens' CreateDeliveryStreamResponse Int Source #
- - | The response status code.