File Coverage

blib/lib/Paws/Kinesis.pm
Criterion Covered Total %
statement 10 110 9.0
branch 0 8 0.0
condition n/a
subroutine 4 30 13.3
pod 23 28 82.1
total 37 176 21.0


line stmt bran cond sub pod time code
1             package Paws::Kinesis;
2 1     1   4215 use Moose;
  1     2   11  
  1         9  
  2         2705  
  2         6  
  2         25  
3 5     5 0 27 sub service { 'kinesis' }
4 0     0 0 0 sub version { '2013-12-02' }
5 0     0 0 0 sub target_prefix { 'Kinesis_20131202' }
6 0     0 0 0 sub json_version { "1.1" }
7             has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8             has retry => (is => 'ro', isa => 'HashRef', default => sub {
9             { base => 'rand', type => 'exponential', growth_factor => 2 }
10             });
11             has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12             ] });
13              
14             with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller', 'Paws::Net::JsonResponse';
15              
16            
17             sub AddTagsToStream {
18 0     0 1 0 my $self = shift;
19 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::AddTagsToStream', @_);
20 0         0 return $self->caller->do_call($self, $call_object);
21             }
22             sub CreateStream {
23 0     0 1 0 my $self = shift;
24 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::CreateStream', @_);
25 0         0 return $self->caller->do_call($self, $call_object);
26             }
27             sub DecreaseStreamRetentionPeriod {
28 0     0 1 0 my $self = shift;
29 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::DecreaseStreamRetentionPeriod', @_);
30 0         0 return $self->caller->do_call($self, $call_object);
31             }
32             sub DeleteStream {
33 0     0 1 0 my $self = shift;
34 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::DeleteStream', @_);
35 0         0 return $self->caller->do_call($self, $call_object);
36             }
37             sub DescribeLimits {
38 0     0 1 0 my $self = shift;
39 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::DescribeLimits', @_);
40 0         0 return $self->caller->do_call($self, $call_object);
41             }
42             sub DescribeStream {
43 0     0 1 0 my $self = shift;
44 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::DescribeStream', @_);
45 0         0 return $self->caller->do_call($self, $call_object);
46             }
47             sub DisableEnhancedMonitoring {
48 0     0 1 0 my $self = shift;
49 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::DisableEnhancedMonitoring', @_);
50 0         0 return $self->caller->do_call($self, $call_object);
51             }
52             sub EnableEnhancedMonitoring {
53 0     0 1 0 my $self = shift;
54 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::EnableEnhancedMonitoring', @_);
55 0         0 return $self->caller->do_call($self, $call_object);
56             }
57             sub GetRecords {
58 0     0 1 0 my $self = shift;
59 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::GetRecords', @_);
60 0         0 return $self->caller->do_call($self, $call_object);
61             }
62             sub GetShardIterator {
63 0     0 1 0 my $self = shift;
64 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::GetShardIterator', @_);
65 0         0 return $self->caller->do_call($self, $call_object);
66             }
67             sub IncreaseStreamRetentionPeriod {
68 0     0 1 0 my $self = shift;
69 0         0 my $call_object = $self->new_with_coercions('Paws::Kinesis::IncreaseStreamRetentionPeriod', @_);
70 0         0 return $self->caller->do_call($self, $call_object);
71             }
72             sub ListStreams {
73 4     4 1 12 my $self = shift;
74 4         33 my $call_object = $self->new_with_coercions('Paws::Kinesis::ListStreams', @_);
75 4         1874 return $self->caller->do_call($self, $call_object);
76             }
77             sub ListTagsForStream {
78 0     0 1   my $self = shift;
79 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::ListTagsForStream', @_);
80 0           return $self->caller->do_call($self, $call_object);
81             }
82             sub MergeShards {
83 0     0 1   my $self = shift;
84 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::MergeShards', @_);
85 0           return $self->caller->do_call($self, $call_object);
86             }
87             sub PutRecord {
88 0     0 1   my $self = shift;
89 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::PutRecord', @_);
90 0           return $self->caller->do_call($self, $call_object);
91             }
92             sub PutRecords {
93 0     0 1   my $self = shift;
94 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::PutRecords', @_);
95 0           return $self->caller->do_call($self, $call_object);
96             }
97             sub RemoveTagsFromStream {
98 0     0 1   my $self = shift;
99 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::RemoveTagsFromStream', @_);
100 0           return $self->caller->do_call($self, $call_object);
101             }
102             sub SplitShard {
103 0     0 1   my $self = shift;
104 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::SplitShard', @_);
105 0           return $self->caller->do_call($self, $call_object);
106             }
107             sub StartStreamEncryption {
108 0     0 1   my $self = shift;
109 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::StartStreamEncryption', @_);
110 0           return $self->caller->do_call($self, $call_object);
111             }
112             sub StopStreamEncryption {
113 0     0 1   my $self = shift;
114 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::StopStreamEncryption', @_);
115 0           return $self->caller->do_call($self, $call_object);
116             }
117             sub UpdateShardCount {
118 0     0 1   my $self = shift;
119 0           my $call_object = $self->new_with_coercions('Paws::Kinesis::UpdateShardCount', @_);
120 0           return $self->caller->do_call($self, $call_object);
121             }
122            
123             sub DescribeAllStream {
124 0     0 1   my $self = shift;
125              
126 0 0         my $callback = shift @_ if (ref($_[0]) eq 'CODE');
127 0           my $result = $self->DescribeStream(@_);
128 0           my $next_result = $result;
129              
130 0 0         if (not defined $callback) {
131 0           while ($next_result->StreamDescription->HasMoreShards) {
132 0           $next_result = $self->DescribeStream(@_, ExclusiveStartShardId => $next_result->StreamDescription->Shards->[-1]->ShardId);
133 0           push @{ $result->StreamDescription->Shards }, @{ $next_result->StreamDescription->Shards };
  0            
  0            
134             }
135 0           return $result;
136             } else {
137 0           while ($result->StreamDescription->HasMoreShards) {
138 0           $callback->($_ => 'StreamDescription.Shards') foreach (@{ $result->StreamDescription->Shards });
  0            
139 0           $result = $self->DescribeStream(@_, ExclusiveStartShardId => $result->StreamDescription->Shards->[-1]->ShardId);
140             }
141 0           $callback->($_ => 'StreamDescription.Shards') foreach (@{ $result->StreamDescription->Shards });
  0            
142             }
143              
144             return undef
145 0           }
146             sub ListAllStreams {
147 0     0 1   my $self = shift;
148              
149 0 0         my $callback = shift @_ if (ref($_[0]) eq 'CODE');
150 0           my $result = $self->ListStreams(@_);
151 0           my $next_result = $result;
152              
153 0 0         if (not defined $callback) {
154 0           while ($next_result->HasMoreStreams) {
155 0           $next_result = $self->ListStreams(@_, ExclusiveStartStreamName => $next_result->StreamNames->[-1]);
156 0           push @{ $result->StreamNames }, @{ $next_result->StreamNames };
  0            
  0            
157             }
158 0           return $result;
159             } else {
160 0           while ($result->HasMoreStreams) {
161 0           $callback->($_ => 'StreamNames') foreach (@{ $result->StreamNames });
  0            
162 0           $result = $self->ListStreams(@_, ExclusiveStartStreamName => $result->StreamNames->[-1]);
163             }
164 0           $callback->($_ => 'StreamNames') foreach (@{ $result->StreamNames });
  0            
165             }
166              
167             return undef
168 0           }
169              
170              
171 0     0 0   sub operations { qw/AddTagsToStream CreateStream DecreaseStreamRetentionPeriod DeleteStream DescribeLimits DescribeStream DisableEnhancedMonitoring EnableEnhancedMonitoring GetRecords GetShardIterator IncreaseStreamRetentionPeriod ListStreams ListTagsForStream MergeShards PutRecord PutRecords RemoveTagsFromStream SplitShard StartStreamEncryption StopStreamEncryption UpdateShardCount / }
172              
173             1;
174              
175             ### main pod documentation begin ###
176              
177             =head1 NAME
178              
179             Paws::Kinesis - Perl Interface to AWS Amazon Kinesis
180              
181             =head1 SYNOPSIS
182              
183             use Paws;
184              
185             my $obj = Paws->service('Kinesis');
186             my $res = $obj->Method(
187             Arg1 => $val1,
188             Arg2 => [ 'V1', 'V2' ],
189             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
190             # of the arguments type
191             Arg3 => { Att1 => 'Val1' },
192             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
193             # the constructor of the arguments type
194             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
195             );
196              
197             =head1 DESCRIPTION
198              
199             Amazon Kinesis Streams Service API Reference
200              
201             Amazon Kinesis Streams is a managed service that scales elastically for
202             real time processing of streaming big data.
203              
204             =head1 METHODS
205              
206             =head2 AddTagsToStream(StreamName => Str, Tags => L<Paws::Kinesis::TagMap>)
207              
208             Each argument is described in detail in: L<Paws::Kinesis::AddTagsToStream>
209              
210             Returns: nothing
211              
212             Adds or updates tags for the specified Amazon Kinesis stream. Each
213             stream can have up to 10 tags.
214              
215             If tags have already been assigned to the stream, C<AddTagsToStream>
216             overwrites any existing tags that correspond to the specified tag keys.
217              
218              
219             =head2 CreateStream(ShardCount => Int, StreamName => Str)
220              
221             Each argument is described in detail in: L<Paws::Kinesis::CreateStream>
222              
223             Returns: nothing
224              
225             Creates an Amazon Kinesis stream. A stream captures and transports data
226             records that are continuously emitted from different data sources or
227             I<producers>. Scale-out within a stream is explicitly supported by
228             means of shards, which are uniquely identified groups of data records
229             in a stream.
230              
231             You specify and control the number of shards that a stream is composed
232             of. Each shard can support reads up to 5 transactions per second, up to
233             a maximum data read total of 2 MB per second. Each shard can support
234             writes up to 1,000 records per second, up to a maximum data write total
235             of 1 MB per second. You can add shards to a stream if the amount of
236             data input increases and you can remove shards if the amount of data
237             input decreases.
238              
239             The stream name identifies the stream. The name is scoped to the AWS
240             account used by the application. It is also scoped by region. That is,
241             two streams in two different accounts can have the same name, and two
242             streams in the same account, but in two different regions, can have the
243             same name.
244              
245             C<CreateStream> is an asynchronous operation. Upon receiving a
246             C<CreateStream> request, Amazon Kinesis immediately returns and sets
247             the stream status to C<CREATING>. After the stream is created, Amazon
248             Kinesis sets the stream status to C<ACTIVE>. You should perform read
249             and write operations only on an C<ACTIVE> stream.
250              
251             You receive a C<LimitExceededException> when making a C<CreateStream>
252             request if you try to do one of the following:
253              
254             =over
255              
256             =item *
257              
258             Have more than five streams in the C<CREATING> state at any point in
259             time.
260              
261             =item *
262              
263             Create more shards than are authorized for your account.
264              
265             =back
266              
267             For the default shard limit for an AWS account, see Streams Limits in
268             the I<Amazon Kinesis Streams Developer Guide>. If you need to increase
269             this limit, contact AWS Support.
270              
271             You can use C<DescribeStream> to check the stream status, which is
272             returned in C<StreamStatus>.
273              
274             CreateStream has a limit of 5 transactions per second per account.
275              
276              
277             =head2 DecreaseStreamRetentionPeriod(RetentionPeriodHours => Int, StreamName => Str)
278              
279             Each argument is described in detail in: L<Paws::Kinesis::DecreaseStreamRetentionPeriod>
280              
281             Returns: nothing
282              
283             Decreases the Amazon Kinesis stream's retention period, which is the
284             length of time data records are accessible after they are added to the
285             stream. The minimum value of a stream's retention period is 24 hours.
286              
287             This operation may result in lost data. For example, if the stream's
288             retention period is 48 hours and is decreased to 24 hours, any data
289             already in the stream that is older than 24 hours is inaccessible.
290              
291              
292             =head2 DeleteStream(StreamName => Str)
293              
294             Each argument is described in detail in: L<Paws::Kinesis::DeleteStream>
295              
296             Returns: nothing
297              
298             Deletes an Amazon Kinesis stream and all its shards and data. You must
299             shut down any applications that are operating on the stream before you
300             delete the stream. If an application attempts to operate on a deleted
301             stream, it will receive the exception C<ResourceNotFoundException>.
302              
303             If the stream is in the C<ACTIVE> state, you can delete it. After a
304             C<DeleteStream> request, the specified stream is in the C<DELETING>
305             state until Amazon Kinesis completes the deletion.
306              
307             B<Note:> Amazon Kinesis might continue to accept data read and write
308             operations, such as PutRecord, PutRecords, and GetRecords, on a stream
309             in the C<DELETING> state until the stream deletion is complete.
310              
311             When you delete a stream, any shards in that stream are also deleted,
312             and any tags are dissociated from the stream.
313              
314             You can use the DescribeStream operation to check the state of the
315             stream, which is returned in C<StreamStatus>.
316              
317             DeleteStream has a limit of 5 transactions per second per account.
318              
319              
320             =head2 DescribeLimits()
321              
322             Each argument is described in detail in: L<Paws::Kinesis::DescribeLimits>
323              
324             Returns: a L<Paws::Kinesis::DescribeLimitsOutput> instance
325              
326             Describes the shard limits and usage for the account.
327              
328             If you update your account limits, the old limits might be returned for
329             a few minutes.
330              
331             This operation has a limit of 1 transaction per second per account.
332              
333              
334             =head2 DescribeStream(StreamName => Str, [ExclusiveStartShardId => Str, Limit => Int])
335              
336             Each argument is described in detail in: L<Paws::Kinesis::DescribeStream>
337              
338             Returns: a L<Paws::Kinesis::DescribeStreamOutput> instance
339              
340             Describes the specified Amazon Kinesis stream.
341              
342             The information returned includes the stream name, Amazon Resource Name
343             (ARN), creation time, enhanced metric configuration, and shard map. The
344             shard map is an array of shard objects. For each shard object, there is
345             the hash key and sequence number ranges that the shard spans, and the
346             IDs of any earlier shards that played in a role in creating the shard.
347             Every record ingested in the stream is identified by a sequence number,
348             which is assigned when the record is put into the stream.
349              
350             You can limit the number of shards returned by each call. For more
351             information, see Retrieving Shards from a Stream in the I<Amazon
352             Kinesis Streams Developer Guide>.
353              
354             There are no guarantees about the chronological order shards returned.
355             To process shards in chronological order, use the ID of the parent
356             shard to track the lineage to the oldest shard.
357              
358             This operation has a limit of 10 transactions per second per account.
359              
360              
361             =head2 DisableEnhancedMonitoring(ShardLevelMetrics => ArrayRef[Str|Undef], StreamName => Str)
362              
363             Each argument is described in detail in: L<Paws::Kinesis::DisableEnhancedMonitoring>
364              
365             Returns: a L<Paws::Kinesis::EnhancedMonitoringOutput> instance
366              
367             Disables enhanced monitoring.
368              
369              
370             =head2 EnableEnhancedMonitoring(ShardLevelMetrics => ArrayRef[Str|Undef], StreamName => Str)
371              
372             Each argument is described in detail in: L<Paws::Kinesis::EnableEnhancedMonitoring>
373              
374             Returns: a L<Paws::Kinesis::EnhancedMonitoringOutput> instance
375              
376             Enables enhanced Amazon Kinesis stream monitoring for shard-level
377             metrics.
378              
379              
380             =head2 GetRecords(ShardIterator => Str, [Limit => Int])
381              
382             Each argument is described in detail in: L<Paws::Kinesis::GetRecords>
383              
384             Returns: a L<Paws::Kinesis::GetRecordsOutput> instance
385              
386             Gets data records from an Amazon Kinesis stream's shard.
387              
388             Specify a shard iterator using the C<ShardIterator> parameter. The
389             shard iterator specifies the position in the shard from which you want
390             to start reading data records sequentially. If there are no records
391             available in the portion of the shard that the iterator points to,
392             GetRecords returns an empty list. Note that it might take multiple
393             calls to get to a portion of the shard that contains records.
394              
395             You can scale by provisioning multiple shards per stream while
396             considering service limits (for more information, see Streams Limits in
397             the I<Amazon Kinesis Streams Developer Guide>). Your application should
398             have one thread per shard, each reading continuously from its stream.
399             To read from a stream continually, call GetRecords in a loop. Use
400             GetShardIterator to get the shard iterator to specify in the first
401             GetRecords call. GetRecords returns a new shard iterator in
402             C<NextShardIterator>. Specify the shard iterator returned in
403             C<NextShardIterator> in subsequent calls to GetRecords. Note that if
404             the shard has been closed, the shard iterator can't return more data
405             and GetRecords returns C<null> in C<NextShardIterator>. You can
406             terminate the loop when the shard is closed, or when the shard iterator
407             reaches the record with the sequence number or other attribute that
408             marks it as the last record to process.
409              
410             Each data record can be up to 1 MB in size, and each shard can read up
411             to 2 MB per second. You can ensure that your calls don't exceed the
412             maximum supported size or throughput by using the C<Limit> parameter to
413             specify the maximum number of records that GetRecords can return.
414             Consider your average record size when determining this limit.
415              
416             The size of the data returned by GetRecords varies depending on the
417             utilization of the shard. The maximum size of data that GetRecords can
418             return is 10 MB. If a call returns this amount of data, subsequent
419             calls made within the next 5 seconds throw
420             C<ProvisionedThroughputExceededException>. If there is insufficient
421             provisioned throughput on the shard, subsequent calls made within the
422             next 1 second throw C<ProvisionedThroughputExceededException>. Note
423             that GetRecords won't return any data when it throws an exception. For
424             this reason, we recommend that you wait one second between calls to
425             GetRecords; however, it's possible that the application will get
426             exceptions for longer than 1 second.
427              
428             To detect whether the application is falling behind in processing, you
429             can use the C<MillisBehindLatest> response attribute. You can also
430             monitor the stream using CloudWatch metrics and other mechanisms (see
431             Monitoring in the I<Amazon Kinesis Streams Developer Guide>).
432              
433             Each Amazon Kinesis record includes a value,
434             C<ApproximateArrivalTimestamp>, that is set when a stream successfully
435             receives and stores a record. This is commonly referred to as a
436             server-side timestamp, whereas a client-side timestamp is set when a
437             data producer creates or sends the record to a stream (a data producer
438             is any data source putting data records into a stream, for example with
439             PutRecords). The timestamp has millisecond precision. There are no
440             guarantees about the timestamp accuracy, or that the timestamp is
441             always increasing. For example, records in a shard or across a stream
442             might have timestamps that are out of order.
443              
444              
445             =head2 GetShardIterator(ShardId => Str, ShardIteratorType => Str, StreamName => Str, [StartingSequenceNumber => Str, Timestamp => Str])
446              
447             Each argument is described in detail in: L<Paws::Kinesis::GetShardIterator>
448              
449             Returns: a L<Paws::Kinesis::GetShardIteratorOutput> instance
450              
451             Gets an Amazon Kinesis shard iterator. A shard iterator expires five
452             minutes after it is returned to the requester.
453              
454             A shard iterator specifies the shard position from which to start
455             reading data records sequentially. The position is specified using the
456             sequence number of a data record in a shard. A sequence number is the
457             identifier associated with every record ingested in the stream, and is
458             assigned when a record is put into the stream. Each stream has one or
459             more shards.
460              
461             You must specify the shard iterator type. For example, you can set the
462             C<ShardIteratorType> parameter to read exactly from the position
463             denoted by a specific sequence number by using the
464             C<AT_SEQUENCE_NUMBER> shard iterator type, or right after the sequence
465             number by using the C<AFTER_SEQUENCE_NUMBER> shard iterator type, using
466             sequence numbers returned by earlier calls to PutRecord, PutRecords,
467             GetRecords, or DescribeStream. In the request, you can specify the
468             shard iterator type C<AT_TIMESTAMP> to read records from an arbitrary
469             point in time, C<TRIM_HORIZON> to cause C<ShardIterator> to point to
470             the last untrimmed record in the shard in the system (the oldest data
471             record in the shard), or C<LATEST> so that you always read the most
472             recent data in the shard.
473              
474             When you read repeatedly from a stream, use a GetShardIterator request
475             to get the first shard iterator for use in your first GetRecords
476             request and for subsequent reads use the shard iterator returned by the
477             GetRecords request in C<NextShardIterator>. A new shard iterator is
478             returned by every GetRecords request in C<NextShardIterator>, which you
479             use in the C<ShardIterator> parameter of the next GetRecords request.
480              
481             If a GetShardIterator request is made too often, you receive a
482             C<ProvisionedThroughputExceededException>. For more information about
483             throughput limits, see GetRecords, and Streams Limits in the I<Amazon
484             Kinesis Streams Developer Guide>.
485              
486             If the shard is closed, GetShardIterator returns a valid iterator for
487             the last sequence number of the shard. Note that a shard can be closed
488             as a result of using SplitShard or MergeShards.
489              
490             GetShardIterator has a limit of 5 transactions per second per account
491             per open shard.
492              
493              
494             =head2 IncreaseStreamRetentionPeriod(RetentionPeriodHours => Int, StreamName => Str)
495              
496             Each argument is described in detail in: L<Paws::Kinesis::IncreaseStreamRetentionPeriod>
497              
498             Returns: nothing
499              
500             Increases the Amazon Kinesis stream's retention period, which is the
501             length of time data records are accessible after they are added to the
502             stream. The maximum value of a stream's retention period is 168 hours
503             (7 days).
504              
505             Upon choosing a longer stream retention period, this operation will
506             increase the time period records are accessible that have not yet
507             expired. However, it will not make previous data that has expired
508             (older than the stream's previous retention period) accessible after
509             the operation has been called. For example, if a stream's retention
510             period is set to 24 hours and is increased to 168 hours, any data that
511             is older than 24 hours will remain inaccessible to consumer
512             applications.
513              
514              
515             =head2 ListStreams([ExclusiveStartStreamName => Str, Limit => Int])
516              
517             Each argument is described in detail in: L<Paws::Kinesis::ListStreams>
518              
519             Returns: a L<Paws::Kinesis::ListStreamsOutput> instance
520              
521             Lists your Amazon Kinesis streams.
522              
523             The number of streams may be too large to return from a single call to
524             C<ListStreams>. You can limit the number of returned streams using the
525             C<Limit> parameter. If you do not specify a value for the C<Limit>
526             parameter, Amazon Kinesis uses the default limit, which is currently
527             10.
528              
529             You can detect if there are more streams available to list by using the
530             C<HasMoreStreams> flag from the returned output. If there are more
531             streams available, you can request more streams by using the name of
532             the last stream returned by the C<ListStreams> request in the
533             C<ExclusiveStartStreamName> parameter in a subsequent request to
534             C<ListStreams>. The group of stream names returned by the subsequent
535             request is then added to the list. You can continue this process until
536             all the stream names have been collected in the list.
537              
538             ListStreams has a limit of 5 transactions per second per account.
539              
540              
541             =head2 ListTagsForStream(StreamName => Str, [ExclusiveStartTagKey => Str, Limit => Int])
542              
543             Each argument is described in detail in: L<Paws::Kinesis::ListTagsForStream>
544              
545             Returns: a L<Paws::Kinesis::ListTagsForStreamOutput> instance
546              
547             Lists the tags for the specified Amazon Kinesis stream.
548              
549              
550             =head2 MergeShards(AdjacentShardToMerge => Str, ShardToMerge => Str, StreamName => Str)
551              
552             Each argument is described in detail in: L<Paws::Kinesis::MergeShards>
553              
554             Returns: nothing
555              
556             Merges two adjacent shards in an Amazon Kinesis stream and combines
557             them into a single shard to reduce the stream's capacity to ingest and
558             transport data. Two shards are considered adjacent if the union of the
559             hash key ranges for the two shards form a contiguous set with no gaps.
560             For example, if you have two shards, one with a hash key range of
561             276...381 and the other with a hash key range of 382...454, then you
562             could merge these two shards into a single shard that would have a hash
563             key range of 276...454. After the merge, the single child shard
564             receives data for all hash key values covered by the two parent shards.
565              
566             C<MergeShards> is called when there is a need to reduce the overall
567             capacity of a stream because of excess capacity that is not being used.
568             You must specify the shard to be merged and the adjacent shard for a
569             stream. For more information about merging shards, see Merge Two Shards
570             in the I<Amazon Kinesis Streams Developer Guide>.
571              
572             If the stream is in the C<ACTIVE> state, you can call C<MergeShards>.
573             If a stream is in the C<CREATING>, C<UPDATING>, or C<DELETING> state,
574             C<MergeShards> returns a C<ResourceInUseException>. If the specified
575             stream does not exist, C<MergeShards> returns a
576             C<ResourceNotFoundException>.
577              
578             You can use DescribeStream to check the state of the stream, which is
579             returned in C<StreamStatus>.
580              
581             C<MergeShards> is an asynchronous operation. Upon receiving a
582             C<MergeShards> request, Amazon Kinesis immediately returns a response
583             and sets the C<StreamStatus> to C<UPDATING>. After the operation is
584             completed, Amazon Kinesis sets the C<StreamStatus> to C<ACTIVE>. Read
585             and write operations continue to work while the stream is in the
586             C<UPDATING> state.
587              
588             You use DescribeStream to determine the shard IDs that are specified in
589             the C<MergeShards> request.
590              
591             If you try to operate on too many streams in parallel using
592             CreateStream, DeleteStream, C<MergeShards> or SplitShard, you will
593             receive a C<LimitExceededException>.
594              
595             C<MergeShards> has limit of 5 transactions per second per account.
596              
597              
598             =head2 PutRecord(Data => Str, PartitionKey => Str, StreamName => Str, [ExplicitHashKey => Str, SequenceNumberForOrdering => Str])
599              
600             Each argument is described in detail in: L<Paws::Kinesis::PutRecord>
601              
602             Returns: a L<Paws::Kinesis::PutRecordOutput> instance
603              
604             Writes a single data record into an Amazon Kinesis stream. Call
605             C<PutRecord> to send data into the stream for real-time ingestion and
606             subsequent processing, one record at a time. Each shard can support
607             writes up to 1,000 records per second, up to a maximum data write total
608             of 1 MB per second.
609              
610             You must specify the name of the stream that captures, stores, and
611             transports the data; a partition key; and the data blob itself.
612              
613             The data blob can be any type of data; for example, a segment from a
614             log file, geographic/location data, website clickstream data, and so
615             on.
616              
617             The partition key is used by Amazon Kinesis to distribute data across
618             shards. Amazon Kinesis segregates the data records that belong to a
619             stream into multiple shards, using the partition key associated with
620             each data record to determine which shard a given data record belongs
621             to.
622              
623             Partition keys are Unicode strings, with a maximum length limit of 256
624             characters for each key. An MD5 hash function is used to map partition
625             keys to 128-bit integer values and to map associated data records to
626             shards using the hash key ranges of the shards. You can override
627             hashing the partition key to determine the shard by explicitly
628             specifying a hash value using the C<ExplicitHashKey> parameter. For
629             more information, see Adding Data to a Stream in the I<Amazon Kinesis
630             Streams Developer Guide>.
631              
632             C<PutRecord> returns the shard ID of where the data record was placed
633             and the sequence number that was assigned to the data record.
634              
635             Sequence numbers increase over time and are specific to a shard within
636             a stream, not across all shards within a stream. To guarantee strictly
637             increasing ordering, write serially to a shard and use the
638             C<SequenceNumberForOrdering> parameter. For more information, see
639             Adding Data to a Stream in the I<Amazon Kinesis Streams Developer
640             Guide>.
641              
642             If a C<PutRecord> request cannot be processed because of insufficient
643             provisioned throughput on the shard involved in the request,
644             C<PutRecord> throws C<ProvisionedThroughputExceededException>.
645              
646             By default, data records are accessible for 24 hours from the time that
647             they are added to a stream. You can use IncreaseStreamRetentionPeriod
648             or DecreaseStreamRetentionPeriod to modify this retention period.
649              
650              
651             =head2 PutRecords(Records => ArrayRef[L<Paws::Kinesis::PutRecordsRequestEntry>], StreamName => Str)
652              
653             Each argument is described in detail in: L<Paws::Kinesis::PutRecords>
654              
655             Returns: a L<Paws::Kinesis::PutRecordsOutput> instance
656              
657             Writes multiple data records into an Amazon Kinesis stream in a single
658             call (also referred to as a C<PutRecords> request). Use this operation
659             to send data into the stream for data ingestion and processing.
660              
661             Each C<PutRecords> request can support up to 500 records. Each record
662             in the request can be as large as 1 MB, up to a limit of 5 MB for the
663             entire request, including partition keys. Each shard can support writes
664             up to 1,000 records per second, up to a maximum data write total of 1
665             MB per second.
666              
667             You must specify the name of the stream that captures, stores, and
668             transports the data; and an array of request C<Records>, with each
669             record in the array requiring a partition key and data blob. The record
670             size limit applies to the total size of the partition key and data
671             blob.
672              
673             The data blob can be any type of data; for example, a segment from a
674             log file, geographic/location data, website clickstream data, and so
675             on.
676              
677             The partition key is used by Amazon Kinesis as input to a hash function
678             that maps the partition key and associated data to a specific shard. An
679             MD5 hash function is used to map partition keys to 128-bit integer
680             values and to map associated data records to shards. As a result of
681             this hashing mechanism, all data records with the same partition key
682             map to the same shard within the stream. For more information, see
683             Adding Data to a Stream in the I<Amazon Kinesis Streams Developer
684             Guide>.
685              
686             Each record in the C<Records> array may include an optional parameter,
687             C<ExplicitHashKey>, which overrides the partition key to shard mapping.
688             This parameter allows a data producer to determine explicitly the shard
689             where the record is stored. For more information, see Adding Multiple
690             Records with PutRecords in the I<Amazon Kinesis Streams Developer
691             Guide>.
692              
693             The C<PutRecords> response includes an array of response C<Records>.
694             Each record in the response array directly correlates with a record in
695             the request array using natural ordering, from the top to the bottom of
696             the request and response. The response C<Records> array always includes
697             the same number of records as the request array.
698              
699             The response C<Records> array includes both successfully and
700             unsuccessfully processed records. Amazon Kinesis attempts to process
701             all records in each C<PutRecords> request. A single record failure does
702             not stop the processing of subsequent records.
703              
704             A successfully-processed record includes C<ShardId> and
705             C<SequenceNumber> values. The C<ShardId> parameter identifies the shard
706             in the stream where the record is stored. The C<SequenceNumber>
707             parameter is an identifier assigned to the put record, unique to all
708             records in the stream.
709              
710             An unsuccessfully-processed record includes C<ErrorCode> and
711             C<ErrorMessage> values. C<ErrorCode> reflects the type of error and can
712             be one of the following values:
713             C<ProvisionedThroughputExceededException> or C<InternalFailure>.
714             C<ErrorMessage> provides more detailed information about the
715             C<ProvisionedThroughputExceededException> exception including the
716             account ID, stream name, and shard ID of the record that was throttled.
717             For more information about partially successful responses, see Adding
718             Multiple Records with PutRecords in the I<Amazon Kinesis Streams
719             Developer Guide>.
720              
721             By default, data records are accessible for 24 hours from the time that
722             they are added to a stream. You can use IncreaseStreamRetentionPeriod
723             or DecreaseStreamRetentionPeriod to modify this retention period.
724              
725              
726             =head2 RemoveTagsFromStream(StreamName => Str, TagKeys => ArrayRef[Str|Undef])
727              
728             Each argument is described in detail in: L<Paws::Kinesis::RemoveTagsFromStream>
729              
730             Returns: nothing
731              
732             Removes tags from the specified Amazon Kinesis stream. Removed tags are
733             deleted and cannot be recovered after this operation successfully
734             completes.
735              
736             If you specify a tag that does not exist, it is ignored.
737              
738              
739             =head2 SplitShard(NewStartingHashKey => Str, ShardToSplit => Str, StreamName => Str)
740              
741             Each argument is described in detail in: L<Paws::Kinesis::SplitShard>
742              
743             Returns: nothing
744              
745             Splits a shard into two new shards in the Amazon Kinesis stream to
746             increase the stream's capacity to ingest and transport data.
747             C<SplitShard> is called when there is a need to increase the overall
748             capacity of a stream because of an expected increase in the volume of
749             data records being ingested.
750              
751             You can also use C<SplitShard> when a shard appears to be approaching
752             its maximum utilization; for example, the producers sending data into
753             the specific shard are suddenly sending more than previously
754             anticipated. You can also call C<SplitShard> to increase stream
755             capacity, so that more Amazon Kinesis applications can simultaneously
756             read data from the stream for real-time processing.
757              
758             You must specify the shard to be split and the new hash key, which is
759             the position in the shard where the shard gets split in two. In many
760             cases, the new hash key might simply be the average of the beginning
761             and ending hash key, but it can be any hash key value in the range
762             being mapped into the shard. For more information about splitting
763             shards, see Split a Shard in the I<Amazon Kinesis Streams Developer
764             Guide>.
765              
766             You can use DescribeStream to determine the shard ID and hash key
767             values for the C<ShardToSplit> and C<NewStartingHashKey> parameters
768             that are specified in the C<SplitShard> request.
769              
770             C<SplitShard> is an asynchronous operation. Upon receiving a
771             C<SplitShard> request, Amazon Kinesis immediately returns a response
772             and sets the stream status to C<UPDATING>. After the operation is
773             completed, Amazon Kinesis sets the stream status to C<ACTIVE>. Read and
774             write operations continue to work while the stream is in the
775             C<UPDATING> state.
776              
777             You can use C<DescribeStream> to check the status of the stream, which
778             is returned in C<StreamStatus>. If the stream is in the C<ACTIVE>
779             state, you can call C<SplitShard>. If a stream is in C<CREATING> or
780             C<UPDATING> or C<DELETING> states, C<DescribeStream> returns a
781             C<ResourceInUseException>.
782              
783             If the specified stream does not exist, C<DescribeStream> returns a
784             C<ResourceNotFoundException>. If you try to create more shards than are
785             authorized for your account, you receive a C<LimitExceededException>.
786              
787             For the default shard limit for an AWS account, see Streams Limits in
788             the I<Amazon Kinesis Streams Developer Guide>. If you need to increase
789             this limit, contact AWS Support.
790              
791             If you try to operate on too many streams simultaneously using
792             CreateStream, DeleteStream, MergeShards, and/or SplitShard, you receive
793             a C<LimitExceededException>.
794              
795             C<SplitShard> has limit of 5 transactions per second per account.
796              
797              
798             =head2 StartStreamEncryption(EncryptionType => Str, KeyId => Str, StreamName => Str)
799              
800             Each argument is described in detail in: L<Paws::Kinesis::StartStreamEncryption>
801              
802             Returns: nothing
803              
804             Enables or updates server-side encryption using an AWS KMS key for a
805             specified stream.
806              
807             Starting encryption is an asynchronous operation. Upon receiving the
808             request, Amazon Kinesis returns immediately and sets the status of the
809             stream to C<UPDATING>. After the update is complete, Amazon Kinesis
810             sets the status of the stream back to C<ACTIVE>. Updating or applying
811             encryption normally takes a few seconds to complete but it can take
812             minutes. You can continue to read and write data to your stream while
813             its status is C<UPDATING>. Once the status of the stream is C<ACTIVE>,
814             records written to the stream will begin to be encrypted.
815              
816             API Limits: You can successfully apply a new AWS KMS key for
817             server-side encryption 25 times in a rolling 24 hour period.
818              
819             Note: It can take up to 5 seconds after the stream is in an C<ACTIVE>
820             status before all records written to the stream are encrypted. After
821             youE<rsquo>ve enabled encryption, you can verify encryption was applied
822             by inspecting the API response from C<PutRecord> or C<PutRecords>.
823              
824              
825             =head2 StopStreamEncryption(EncryptionType => Str, KeyId => Str, StreamName => Str)
826              
827             Each argument is described in detail in: L<Paws::Kinesis::StopStreamEncryption>
828              
829             Returns: nothing
830              
831             Disables server-side encryption for a specified stream.
832              
833             Stopping encryption is an asynchronous operation. Upon receiving the
834             request, Amazon Kinesis returns immediately and sets the status of the
835             stream to C<UPDATING>. After the update is complete, Amazon Kinesis
836             sets the status of the stream back to C<ACTIVE>. Stopping encryption
837             normally takes a few seconds to complete but it can take minutes. You
838             can continue to read and write data to your stream while its status is
839             C<UPDATING>. Once the status of the stream is C<ACTIVE> records written
840             to the stream will no longer be encrypted by the Amazon Kinesis Streams
841             service.
842              
843             API Limits: You can successfully disable server-side encryption 25
844             times in a rolling 24 hour period.
845              
846             Note: It can take up to 5 seconds after the stream is in an C<ACTIVE>
847             status before all records written to the stream are no longer subject
848             to encryption. After youE<rsquo>ve disabled encryption, you can verify
849             encryption was not applied by inspecting the API response from
850             C<PutRecord> or C<PutRecords>.
851              
852              
853             =head2 UpdateShardCount(ScalingType => Str, StreamName => Str, TargetShardCount => Int)
854              
855             Each argument is described in detail in: L<Paws::Kinesis::UpdateShardCount>
856              
857             Returns: a L<Paws::Kinesis::UpdateShardCountOutput> instance
858              
859             Updates the shard count of the specified stream to the specified number
860             of shards.
861              
862             Updating the shard count is an asynchronous operation. Upon receiving
863             the request, Amazon Kinesis returns immediately and sets the status of
864             the stream to C<UPDATING>. After the update is complete, Amazon Kinesis
865             sets the status of the stream back to C<ACTIVE>. Depending on the size
866             of the stream, the scaling action could take a few minutes to complete.
867             You can continue to read and write data to your stream while its status
868             is C<UPDATING>.
869              
870             To update the shard count, Amazon Kinesis performs splits or merges on
871             individual shards. This can cause short-lived shards to be created, in
872             addition to the final shards. We recommend that you double or halve the
873             shard count, as this results in the fewest number of splits or merges.
874              
875             This operation has the following limits, which are per region per
876             account unless otherwise noted:
877              
878             =over
879              
880             =item *
881              
882             scale more than twice per rolling 24 hour period
883              
884             =item *
885              
886             scale up above double your current shard count
887              
888             =item *
889              
890             scale down below half your current shard count
891              
892             =item *
893              
894             scale up above 200 shards in a stream
895              
896             =item *
897              
898             scale a stream with more than 200 shards down unless the result is less
899             than 200 shards
900              
901             =item *
902              
903             scale up above the shard limits for your account
904              
905             =item *
906              
907             =back
908              
909             For the default limits for an AWS account, see Streams Limits in the
910             I<Amazon Kinesis Streams Developer Guide>. If you need to increase a
911             limit, contact AWS Support.
912              
913              
914              
915              
916             =head1 PAGINATORS
917              
918             Paginator methods are helpers that repetively call methods that return partial results
919              
920             =head2 DescribeAllStream(sub { },StreamName => Str, [ExclusiveStartShardId => Str, Limit => Int])
921              
922             =head2 DescribeAllStream(StreamName => Str, [ExclusiveStartShardId => Str, Limit => Int])
923              
924              
925             If passed a sub as first parameter, it will call the sub for each element found in :
926              
927             - StreamDescription.Shards, passing the object as the first parameter, and the string 'StreamDescription.Shards' as the second parameter
928              
929             If not, it will return a a L<Paws::Kinesis::DescribeStreamOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
930              
931              
932             =head2 ListAllStreams(sub { },[ExclusiveStartStreamName => Str, Limit => Int])
933              
934             =head2 ListAllStreams([ExclusiveStartStreamName => Str, Limit => Int])
935              
936              
937             If passed a sub as first parameter, it will call the sub for each element found in :
938              
939             - StreamNames, passing the object as the first parameter, and the string 'StreamNames' as the second parameter
940              
941             If not, it will return a a L<Paws::Kinesis::ListStreamsOutput> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
942              
943              
944              
945              
946              
947             =head1 SEE ALSO
948              
949             This service class forms part of L<Paws>
950              
951             =head1 BUGS and CONTRIBUTIONS
952              
953             The source code is located here: https://github.com/pplu/aws-sdk-perl
954              
955             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
956              
957             =cut
958