amazonka-kinesis-firehose-1.6.0: Amazon Kinesis Firehose SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Firehose.PutRecord

Contents

Description

Writes a single data record into an Amazon Kinesis Data Firehose delivery stream. To write multiple data records into a delivery stream, use PutRecordBatch . Applications using these operations are referred to as producers.

By default, each delivery stream can take in up to 2,000 transactions per second, 5,000 records per second, or 5 MB per second. If you use PutRecord and PutRecordBatch , the limits are an aggregate across these two operations for each delivery stream. For more information about limits and how to request an increase, see Amazon Kinesis Data Firehose Limits .

You must specify the name of the delivery stream and the data record when using PutRecord . The data record consists of a data blob that can be up to 1,000 KB in size, and any kind of data. For example, it can be a segment from a log file, geographic location data, website clickstream data, and so on.

Kinesis Data Firehose buffers records before delivering them to the destination. To disambiguate the data blobs at the destination, a common solution is to use delimiters in the data, such as a newline (n ) or some other character unique within the data. This allows the consumer application to parse individual data items when reading the data from the destination.

The PutRecord operation returns a RecordId , which is a unique string assigned to each record. Producer applications can use this ID for purposes such as auditability and investigation.

If the PutRecord operation throws a ServiceUnavailableException , back off and retry. If the exception persists, it is possible that the throughput limits have been exceeded for the delivery stream.

Data records sent to Kinesis Data Firehose are stored for 24 hours from the time they are added to a delivery stream as it tries to send the records to the destination. If the destination is unreachable for more than 24 hours, the data is no longer available.

Synopsis

Creating a Request

putRecord #

Creates a value of PutRecord with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data PutRecord #

See: putRecord smart constructor.

Instances

Eq PutRecord # 
Data PutRecord # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutRecord -> c PutRecord #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutRecord #

toConstr :: PutRecord -> Constr #

dataTypeOf :: PutRecord -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PutRecord) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutRecord) #

gmapT :: (forall b. Data b => b -> b) -> PutRecord -> PutRecord #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutRecord -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutRecord -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutRecord -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutRecord -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutRecord -> m PutRecord #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutRecord -> m PutRecord #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutRecord -> m PutRecord #

Read PutRecord # 
Show PutRecord # 
Generic PutRecord # 

Associated Types

type Rep PutRecord :: * -> * #

Hashable PutRecord # 
ToJSON PutRecord # 
NFData PutRecord # 

Methods

rnf :: PutRecord -> () #

AWSRequest PutRecord # 
ToHeaders PutRecord # 

Methods

toHeaders :: PutRecord -> [Header] #

ToPath PutRecord # 
ToQuery PutRecord # 
type Rep PutRecord # 
type Rep PutRecord = D1 * (MetaData "PutRecord" "Network.AWS.Firehose.PutRecord" "amazonka-kinesis-firehose-1.6.0-9aQ2as1jDFrEvzl6oqKSFi" False) (C1 * (MetaCons "PutRecord'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_prDeliveryStreamName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_prRecord") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Record))))
type Rs PutRecord # 

Request Lenses

prDeliveryStreamName :: Lens' PutRecord Text #

The name of the delivery stream.

Destructuring the Response

putRecordResponse #

Creates a value of PutRecordResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data PutRecordResponse #

See: putRecordResponse smart constructor.

Instances

Eq PutRecordResponse # 
Data PutRecordResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutRecordResponse -> c PutRecordResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutRecordResponse #

toConstr :: PutRecordResponse -> Constr #

dataTypeOf :: PutRecordResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c PutRecordResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutRecordResponse) #

gmapT :: (forall b. Data b => b -> b) -> PutRecordResponse -> PutRecordResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutRecordResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutRecordResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutRecordResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutRecordResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutRecordResponse -> m PutRecordResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutRecordResponse -> m PutRecordResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutRecordResponse -> m PutRecordResponse #

Read PutRecordResponse # 
Show PutRecordResponse # 
Generic PutRecordResponse # 
NFData PutRecordResponse # 

Methods

rnf :: PutRecordResponse -> () #

type Rep PutRecordResponse # 
type Rep PutRecordResponse = D1 * (MetaData "PutRecordResponse" "Network.AWS.Firehose.PutRecord" "amazonka-kinesis-firehose-1.6.0-9aQ2as1jDFrEvzl6oqKSFi" False) (C1 * (MetaCons "PutRecordResponse'" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "_prrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int)) (S1 * (MetaSel (Just Symbol "_prrsRecordId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))))

Response Lenses

prrsResponseStatus :: Lens' PutRecordResponse Int #

  • - | The response status code.

prrsRecordId :: Lens' PutRecordResponse Text #

The ID of the record.