amazonka-kinesis-1.6.1: Amazon Kinesis 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.Kinesis.CreateStream

Contents

Description

Creates a Kinesis data 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 five 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. If the amount of data input increases or decreases, you can add or remove shards.

The stream name identifies the stream. The name is scoped to the AWS account used by the application. It is also scoped by AWS 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, Kinesis Data Streams immediately returns and sets the stream status to CREATING . After the stream is created, Kinesis Data Streams 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 when 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 Amazon Kinesis Data Streams Limits in the Amazon Kinesis Data Streams Developer Guide . 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 five 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 AWS Region. That is, two streams in two different AWS accounts can have the same name. Two streams in the same AWS account but in two different Regions can also 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 # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Data CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

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 # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Show CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Generic CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Associated Types

type Rep CreateStream :: Type -> Type #

Hashable CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

ToJSON CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

AWSRequest CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Associated Types

type Rs CreateStream :: Type #

ToHeaders CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

ToPath CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

ToQuery CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

NFData CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Methods

rnf :: CreateStream -> () #

type Rep CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

type Rep CreateStream = D1 (MetaData "CreateStream" "Network.AWS.Kinesis.CreateStream" "amazonka-kinesis-1.6.1-DicNGWPqg566LpzNlyqosm" False) (C1 (MetaCons "CreateStream'" PrefixI True) (S1 (MetaSel (Just "_csStreamName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_csShardCount") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Nat)))
type Rs CreateStream Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

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 AWS Region. That is, two streams in two different AWS accounts can have the same name. Two streams in the same AWS account but in two different Regions can also 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 # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Data CreateStreamResponse Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

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 # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Show CreateStreamResponse Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Generic CreateStreamResponse Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Associated Types

type Rep CreateStreamResponse :: Type -> Type #

NFData CreateStreamResponse Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

Methods

rnf :: CreateStreamResponse -> () #

type Rep CreateStreamResponse Source # 
Instance details

Defined in Network.AWS.Kinesis.CreateStream

type Rep CreateStreamResponse = D1 (MetaData "CreateStreamResponse" "Network.AWS.Kinesis.CreateStream" "amazonka-kinesis-1.6.1-DicNGWPqg566LpzNlyqosm" False) (C1 (MetaCons "CreateStreamResponse'" PrefixI False) (U1 :: Type -> Type))