« blib/lib/Paws/KinesisVideoArchivedMedia/TimestampRange.pm
↑ Summary
blib/lib/Paws/KinesisVideoMedia/GetMedia.pm »
| 1 | package Paws::KinesisVideoMedia; | ||
| 2 | use Moose; | ||
| 3 | sub service { 'kinesisvideo' } | ||
| 4 | sub signing_name { 'kinesisvideo' } | ||
| 5 | sub version { '2017-09-30' } | ||
| 6 | sub flattened_arrays { 0 } | ||
| 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::RestJsonCaller'; | ||
| 15 | |||
| 16 | |||
| 17 | sub GetMedia { | ||
| 18 | my $self = shift; | ||
| 19 | my $call_object = $self->new_with_coercions('Paws::KinesisVideoMedia::GetMedia', @_); | ||
| 20 | return $self->caller->do_call($self, $call_object); | ||
| 21 | } | ||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | sub operations { qw/GetMedia / } | ||
| 26 | |||
| 27 | 1; | ||
| 28 | |||
| 29 | ### main pod documentation begin ### | ||
| 30 | |||
| 31 | =head1 NAME | ||
| 32 | |||
| 33 | Paws::KinesisVideoMedia - Perl Interface to AWS Amazon Kinesis Video Streams Media | ||
| 34 | |||
| 35 | =head1 SYNOPSIS | ||
| 36 | |||
| 37 | use Paws; | ||
| 38 | |||
| 39 | my $obj = Paws->service('KinesisVideoMedia'); | ||
| 40 | my $res = $obj->Method( | ||
| 41 | Arg1 => $val1, | ||
| 42 | Arg2 => [ 'V1', 'V2' ], | ||
| 43 | # if Arg3 is an object, the HashRef will be used as arguments to the constructor | ||
| 44 | # of the arguments type | ||
| 45 | Arg3 => { Att1 => 'Val1' }, | ||
| 46 | # if Arg4 is an array of objects, the HashRefs will be passed as arguments to | ||
| 47 | # the constructor of the arguments type | ||
| 48 | Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ], | ||
| 49 | ); | ||
| 50 | |||
| 51 | =head1 DESCRIPTION | ||
| 52 | |||
| 53 | |||
| 54 | |||
| 55 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/kinesisvideo-2017-09-30> | ||
| 56 | |||
| 57 | |||
| 58 | =head1 METHODS | ||
| 59 | |||
| 60 | =head2 GetMedia | ||
| 61 | |||
| 62 | =over | ||
| 63 | |||
| 64 | =item StartSelector => L<Paws::KinesisVideoMedia::StartSelector> | ||
| 65 | |||
| 66 | =item [StreamARN => Str] | ||
| 67 | |||
| 68 | =item [StreamName => Str] | ||
| 69 | |||
| 70 | |||
| 71 | =back | ||
| 72 | |||
| 73 | Each argument is described in detail in: L<Paws::KinesisVideoMedia::GetMedia> | ||
| 74 | |||
| 75 | Returns: a L<Paws::KinesisVideoMedia::GetMediaOutput> instance | ||
| 76 | |||
| 77 | Use this API to retrieve media content from a Kinesis video stream. In | ||
| 78 | the request, you identify the stream name or stream Amazon Resource | ||
| 79 | Name (ARN), and the starting chunk. Kinesis Video Streams then returns | ||
| 80 | a stream of chunks in order by fragment number. | ||
| 81 | |||
| 82 | You must first call the C<GetDataEndpoint> API to get an endpoint. Then | ||
| 83 | send the C<GetMedia> requests to this endpoint using the --endpoint-url | ||
| 84 | parameter (https://docs.aws.amazon.com/cli/latest/reference/). | ||
| 85 | |||
| 86 | When you put media data (fragments) on a stream, Kinesis Video Streams | ||
| 87 | stores each incoming fragment and related metadata in what is called a | ||
| 88 | "chunk." For more information, see PutMedia | ||
| 89 | (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html). | ||
| 90 | The C<GetMedia> API returns a stream of these chunks starting from the | ||
| 91 | chunk that you specify in the request. | ||
| 92 | |||
| 93 | The following limits apply when using the C<GetMedia> API: | ||
| 94 | |||
| 95 | =over | ||
| 96 | |||
| 97 | =item * | ||
| 98 | |||
| 99 | A client can call C<GetMedia> up to five times per second per stream. | ||
| 100 | |||
| 101 | =item * | ||
| 102 | |||
| 103 | Kinesis Video Streams sends media data at a rate of up to 25 megabytes | ||
| 104 | per second (or 200 megabits per second) during a C<GetMedia> session. | ||
| 105 | |||
| 106 | =back | ||
| 107 | |||
| 108 | If an error is thrown after invoking a Kinesis Video Streams media API, | ||
| 109 | in addition to the HTTP status code and the response body, it includes | ||
| 110 | the following pieces of information: | ||
| 111 | |||
| 112 | =over | ||
| 113 | |||
| 114 | =item * | ||
| 115 | |||
| 116 | C<x-amz-ErrorType> HTTP header E<ndash> contains a more specific error | ||
| 117 | type in addition to what the HTTP status code provides. | ||
| 118 | |||
| 119 | =item * | ||
| 120 | |||
| 121 | C<x-amz-RequestId> HTTP header E<ndash> if you want to report an issue | ||
| 122 | to AWS, the support team can better diagnose the problem if given the | ||
| 123 | Request Id. | ||
| 124 | |||
| 125 | =back | ||
| 126 | |||
| 127 | Both the HTTP status code and the ErrorType header can be utilized to | ||
| 128 | make programmatic decisions about whether errors are retry-able and | ||
| 129 | under what conditions, as well as provide information on what actions | ||
| 130 | the client programmer might need to take in order to successfully try | ||
| 131 | again. | ||
| 132 | |||
| 133 | For more information, see the B<Errors> section at the bottom of this | ||
| 134 | topic, as well as Common Errors | ||
| 135 | (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). | ||
| 136 | |||
| 137 | |||
| 138 | |||
| 139 | |||
| 140 | =head1 PAGINATORS | ||
| 141 | |||
| 142 | Paginator methods are helpers that repetively call methods that return partial results | ||
| 143 | |||
| 144 | |||
| 145 | |||
| 146 | |||
| 147 | =head1 SEE ALSO | ||
| 148 | |||
| 149 | This service class forms part of L<Paws> | ||
| 150 | |||
| 151 | =head1 BUGS and CONTRIBUTIONS | ||
| 152 | |||
| 153 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 154 | |||
| 155 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 156 | |||
| 157 | =cut | ||
| 158 |