amazonka-kinesis-1.5.0: Amazon Kinesis SDK.

Copyright(c) 2013-2017 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.Kinesis.CreateStream

Contents

Description

Creates an Amazon Kinesis stream. A stream captures and transports data records that are continuously emitted from different data sources or producers . Scale-out within a stream is explicitly supported by means of shards, which are uniquely identified groups of data records in a stream.

You specify and control the number of shards that a stream is composed of. Each shard can support reads up to 5 transactions per second, up to a maximum data read total of 2 MB per second. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MB per second. You can add shards to a stream if the amount of data input increases and you can remove shards if the amount of data input decreases.

The stream name identifies the stream. The name is scoped to the AWS account used by the application. It is also scoped by region. That is, two streams in two different accounts can have the same name, and two streams in the same account, but in two different regions, can have the same name.

CreateStream is an asynchronous operation. Upon receiving a CreateStream request, Amazon Kinesis immediately returns and sets the stream status to CREATING . After the stream is created, Amazon Kinesis sets the stream status to ACTIVE . You should perform read and write operations only on an ACTIVE stream.

You receive a LimitExceededException when making a CreateStream request if you try to do one of the following:

  • Have more than five streams in the CREATING state at any point in time.
  • Create more shards than are authorized for your account.

For the default shard limit for an AWS account, see Streams Limits in the Amazon Kinesis Streams Developer Guide . If you need to increase this limit, contact AWS Support .

You can use DescribeStream to check the stream status, which is returned in StreamStatus .

CreateStream has a limit of 5 transactions per second per account.

Synopsis

Creating a Request

createStream Source #

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

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

  • csStreamName - A name to identify the stream. The stream name is scoped to the AWS account used by the application that creates the stream. It is also scoped by region. That is, two streams in two different AWS accounts can have the same name, and two streams in the same AWS account but in two different regions can have the same name.
  • csShardCount - The number of shards that the stream will use. The throughput of the stream is a function of the number of shards; more shards are required for greater provisioned throughput. DefaultShardLimit;

data CreateStream Source #

Represents the input for CreateStream .

See: createStream smart constructor.

Instances

Eq CreateStream Source # 
Data CreateStream Source # 

Methods

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

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

toConstr :: CreateStream -> Constr #

dataTypeOf :: CreateStream -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateStream Source # 
Show CreateStream Source # 
Generic CreateStream Source # 

Associated Types

type Rep CreateStream :: * -> * #

Hashable CreateStream Source # 
ToJSON CreateStream Source # 
NFData CreateStream Source # 

Methods

rnf :: CreateStream -> () #

AWSRequest CreateStream Source # 
ToQuery CreateStream Source # 
ToPath CreateStream Source # 
ToHeaders CreateStream Source # 
type Rep CreateStream Source # 
type Rep CreateStream = D1 (MetaData "CreateStream" "Network.AWS.Kinesis.CreateStream" "amazonka-kinesis-1.5.0-9sBOxcpdcTN2BghkYmkXAp" False) (C1 (MetaCons "CreateStream'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_csStreamName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) (S1 (MetaSel (Just Symbol "_csShardCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Nat))))
type Rs CreateStream Source # 

Request Lenses

csStreamName :: Lens' CreateStream Text Source #

A name to identify the stream. The stream name is scoped to the AWS account used by the application that creates the stream. It is also scoped by region. That is, two streams in two different AWS accounts can have the same name, and two streams in the same AWS account but in two different regions can have the same name.

csShardCount :: Lens' CreateStream Natural Source #

The number of shards that the stream will use. The throughput of the stream is a function of the number of shards; more shards are required for greater provisioned throughput. DefaultShardLimit;

Destructuring the Response

createStreamResponse :: CreateStreamResponse Source #

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

data CreateStreamResponse Source #

See: createStreamResponse smart constructor.

Instances

Eq CreateStreamResponse Source # 
Data CreateStreamResponse Source # 

Methods

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

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

toConstr :: CreateStreamResponse -> Constr #

dataTypeOf :: CreateStreamResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateStreamResponse Source # 
Show CreateStreamResponse Source # 
Generic CreateStreamResponse Source # 
NFData CreateStreamResponse Source # 

Methods

rnf :: CreateStreamResponse -> () #

type Rep CreateStreamResponse Source # 
type Rep CreateStreamResponse = D1 (MetaData "CreateStreamResponse" "Network.AWS.Kinesis.CreateStream" "amazonka-kinesis-1.5.0-9sBOxcpdcTN2BghkYmkXAp" False) (C1 (MetaCons "CreateStreamResponse'" PrefixI False) U1)