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

Amazonka.KinesisVideoMedia

Description

Derived from API version 2017-09-30 of the AWS service descriptions, licensed under Apache 2.0.

Synopsis

Service Configuration

defaultService :: Service Source #

API version 2017-09-30 of the Amazon Kinesis Video Streams Media SDK configuration.

Errors

Error matchers are designed for use with the functions provided by Control.Exception.Lens. This allows catching (and rethrowing) service specific errors returned by KinesisVideoMedia.

ConnectionLimitExceededException

_ConnectionLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client connections.

InvalidArgumentException

_InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError Source #

The value for this input parameter is invalid.

NotAuthorizedException

_NotAuthorizedException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Status Code: 403, The caller is not authorized to perform an operation on the given stream, or the token has expired.

ClientLimitExceededException

_ClientLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Kinesis Video Streams has throttled the request because you have exceeded the limit of allowed client calls. Try making the call later.

InvalidEndpointException

_InvalidEndpointException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Status Code: 400, Caller used wrong endpoint to write data to a stream. On receiving such an exception, the user must call GetDataEndpoint with AccessMode set to "READ" and use the endpoint Kinesis Video returns in the next GetMedia call.

ResourceNotFoundException

_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source #

Status Code: 404, The stream with the given name does not exist.

Waiters

Waiters poll by repeatedly sending a request until some remote success condition configured by the Wait specification is fulfilled. The Wait specification determines how many attempts should be made, in addition to delay and retry strategies.

Operations

Some AWS operations return results that are incomplete and require subsequent requests in order to obtain the entire result set. The process of sending subsequent requests to continue where a previous request left off is called pagination. For example, the ListObjects operation of Amazon S3 returns up to 1000 objects at a time, and you must send subsequent requests with the appropriate Marker in order to retrieve the next page of results.

Operations that have an AWSPager instance can transparently perform subsequent requests, correctly setting Markers and other request facets to iterate through the entire result set of a truncated API operation. Operations which support this have an additional note in the documentation.

Many operations have the ability to filter results on the server side. See the individual operation parameters for details.

GetMedia

data GetMedia Source #

See: newGetMedia smart constructor.

Instances

Instances details
Eq GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Read GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Show GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Generic GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Associated Types

type Rep GetMedia :: Type -> Type #

Methods

from :: GetMedia -> Rep GetMedia x #

to :: Rep GetMedia x -> GetMedia #

NFData GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Methods

rnf :: GetMedia -> () #

Hashable GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Methods

hashWithSalt :: Int -> GetMedia -> Int #

hash :: GetMedia -> Int #

ToJSON GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

AWSRequest GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Associated Types

type AWSResponse GetMedia #

ToHeaders GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Methods

toHeaders :: GetMedia -> [Header] #

ToPath GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

ToQuery GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

type Rep GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

type Rep GetMedia = D1 ('MetaData "GetMedia" "Amazonka.KinesisVideoMedia.GetMedia" "libZSservicesZSamazonka-kinesis-video-mediaZSamazonka-kinesis-video-media" 'False) (C1 ('MetaCons "GetMedia'" 'PrefixI 'True) (S1 ('MetaSel ('Just "streamARN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "streamName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "startSelector") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 StartSelector))))
type AWSResponse GetMedia Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

newGetMedia Source #

Create a value of GetMedia with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:streamARN:GetMedia', getMedia_streamARN - The ARN of the stream from where you want to get the media content. If you don't specify the streamARN, you must specify the streamName.

$sel:streamName:GetMedia', getMedia_streamName - The Kinesis video stream name from where you want to get the media content. If you don't specify the streamName, you must specify the streamARN.

$sel:startSelector:GetMedia', getMedia_startSelector - Identifies the starting chunk to get from the specified stream.

data GetMediaResponse Source #

See: newGetMediaResponse smart constructor.

Instances

Instances details
Show GetMediaResponse Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Generic GetMediaResponse Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

Associated Types

type Rep GetMediaResponse :: Type -> Type #

type Rep GetMediaResponse Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.GetMedia

type Rep GetMediaResponse = D1 ('MetaData "GetMediaResponse" "Amazonka.KinesisVideoMedia.GetMedia" "libZSservicesZSamazonka-kinesis-video-mediaZSamazonka-kinesis-video-media" 'False) (C1 ('MetaCons "GetMediaResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "contentType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "payload") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ResponseBody))))

newGetMediaResponse Source #

Create a value of GetMediaResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:contentType:GetMediaResponse', getMediaResponse_contentType - The content type of the requested media.

$sel:httpStatus:GetMediaResponse', getMediaResponse_httpStatus - The response's http status code.

$sel:payload:GetMediaResponse', getMediaResponse_payload - The payload Kinesis Video Streams returns is a sequence of chunks from the specified stream. For information about the chunks, see . The chunks that Kinesis Video Streams returns in the GetMedia call also include the following additional Matroska (MKV) tags:

  • AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your GetMedia call terminates, you can use this continuation token in your next request to get the next chunk where the last request terminated.
  • AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use this tag value to determine how far behind the chunk returned in the response is from the latest chunk on the stream.
  • AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.
  • AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment.
  • AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment.

The following tags will be present if an error occurs:

  • AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia to stop.
  • AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.

The error codes are as follows:

  • 3002 - Error writing to the stream
  • 4000 - Requested fragment is not found
  • 4500 - Access denied for the stream's KMS key
  • 4501 - Stream's KMS key is disabled
  • 4502 - Validation error on the stream's KMS key
  • 4503 - KMS key specified in the stream is unavailable
  • 4504 - Invalid usage of the KMS key specified in the stream
  • 4505 - Invalid state of the KMS key specified in the stream
  • 4506 - Unable to find the KMS key specified in the stream
  • 5000 - Internal error

Types

StartSelectorType

newtype StartSelectorType Source #

Instances

Instances details
Eq StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

Ord StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

Read StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

Show StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

Generic StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

Associated Types

type Rep StartSelectorType :: Type -> Type #

NFData StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

Methods

rnf :: StartSelectorType -> () #

Hashable StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

ToJSON StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

ToJSONKey StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

FromJSON StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

FromJSONKey StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

ToLog StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

ToHeader StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

ToQuery StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

FromXML StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

ToXML StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

ToByteString StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

FromText StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

ToText StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

type Rep StartSelectorType Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelectorType

type Rep StartSelectorType = D1 ('MetaData "StartSelectorType" "Amazonka.KinesisVideoMedia.Types.StartSelectorType" "libZSservicesZSamazonka-kinesis-video-mediaZSamazonka-kinesis-video-media" 'True) (C1 ('MetaCons "StartSelectorType'" 'PrefixI 'True) (S1 ('MetaSel ('Just "fromStartSelectorType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

StartSelector

data StartSelector Source #

Identifies the chunk on the Kinesis video stream where you want the GetMedia API to start returning media data. You have the following options to identify the starting chunk:

  • Choose the latest (or oldest) chunk.
  • Identify a specific chunk. You can identify a specific chunk either by providing a fragment number or timestamp (server or producer).
  • Each chunk's metadata includes a continuation token as a Matroska (MKV) tag (AWS_KINESISVIDEO_CONTINUATION_TOKEN). If your previous GetMedia request terminated, you can use this tag value in your next GetMedia request. The API then starts returning chunks starting where the last API ended.

See: newStartSelector smart constructor.

Instances

Instances details
Eq StartSelector Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelector

Read StartSelector Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelector

Show StartSelector Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelector

Generic StartSelector Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelector

Associated Types

type Rep StartSelector :: Type -> Type #

NFData StartSelector Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelector

Methods

rnf :: StartSelector -> () #

Hashable StartSelector Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelector

ToJSON StartSelector Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelector

type Rep StartSelector Source # 
Instance details

Defined in Amazonka.KinesisVideoMedia.Types.StartSelector

type Rep StartSelector = D1 ('MetaData "StartSelector" "Amazonka.KinesisVideoMedia.Types.StartSelector" "libZSservicesZSamazonka-kinesis-video-mediaZSamazonka-kinesis-video-media" 'False) (C1 ('MetaCons "StartSelector'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "continuationToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "afterFragmentNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "startTimestamp") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe POSIX)) :*: S1 ('MetaSel ('Just "startSelectorType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 StartSelectorType))))

newStartSelector Source #

Create a value of StartSelector with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:continuationToken:StartSelector', startSelector_continuationToken - Continuation token that Kinesis Video Streams returned in the previous GetMedia response. The GetMedia API then starts with the chunk identified by the continuation token.

$sel:afterFragmentNumber:StartSelector', startSelector_afterFragmentNumber - Specifies the fragment number from where you want the GetMedia API to start returning the fragments.

$sel:startTimestamp:StartSelector', startSelector_startTimestamp - A timestamp value. This value is required if you choose the PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the startSelectorType. The GetMedia API then starts with the chunk containing the fragment that has the specified timestamp.

$sel:startSelectorType:StartSelector', startSelector_startSelectorType - Identifies the fragment on the Kinesis video stream where you want to start getting the data from.

  • NOW - Start with the latest chunk on the stream.
  • EARLIEST - Start with earliest available chunk on the stream.
  • FRAGMENT_NUMBER - Start with the chunk after a specific fragment. You must also specify the AfterFragmentNumber parameter.
  • PRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with the chunk containing a fragment with the specified producer or server timestamp. You specify the timestamp by adding StartTimestamp.
  • CONTINUATION_TOKEN - Read using the specified continuation token.

If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the startSelectorType, you don't provide any additional information in the startSelector.