Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Derived from API version 2017-09-30
of the AWS service descriptions, licensed under Apache 2.0.
Synopsis
- defaultService :: Service
- _ConnectionLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidArgumentException :: AsError a => Getting (First ServiceError) a ServiceError
- _NotAuthorizedException :: AsError a => Getting (First ServiceError) a ServiceError
- _ClientLimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError
- _InvalidEndpointException :: AsError a => Getting (First ServiceError) a ServiceError
- _ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
- data GetMedia = GetMedia' (Maybe Text) (Maybe Text) StartSelector
- newGetMedia :: StartSelector -> GetMedia
- data GetMediaResponse = GetMediaResponse' (Maybe Text) Int ResponseBody
- newGetMediaResponse :: Int -> ResponseBody -> GetMediaResponse
- newtype StartSelectorType where
- StartSelectorType' { }
- pattern StartSelectorType_CONTINUATION_TOKEN :: StartSelectorType
- pattern StartSelectorType_EARLIEST :: StartSelectorType
- pattern StartSelectorType_FRAGMENT_NUMBER :: StartSelectorType
- pattern StartSelectorType_NOW :: StartSelectorType
- pattern StartSelectorType_PRODUCER_TIMESTAMP :: StartSelectorType
- pattern StartSelectorType_SERVER_TIMESTAMP :: StartSelectorType
- data StartSelector = StartSelector' (Maybe Text) (Maybe Text) (Maybe POSIX) StartSelectorType
- newStartSelector :: StartSelectorType -> StartSelector
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
See: newGetMedia
smart constructor.
Instances
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
:: Int | |
-> ResponseBody | |
-> GetMediaResponse |
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 #
pattern StartSelectorType_CONTINUATION_TOKEN :: StartSelectorType | |
pattern StartSelectorType_EARLIEST :: StartSelectorType | |
pattern StartSelectorType_FRAGMENT_NUMBER :: StartSelectorType | |
pattern StartSelectorType_NOW :: StartSelectorType | |
pattern StartSelectorType_PRODUCER_TIMESTAMP :: StartSelectorType | |
pattern StartSelectorType_SERVER_TIMESTAMP :: StartSelectorType |
Instances
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 previousGetMedia
request terminated, you can use this tag value in your nextGetMedia
request. The API then starts returning chunks starting where the last API ended.
See: newStartSelector
smart constructor.
Instances
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
.