{ "smithy": "1.0", "metadata": { "suppressions": [ { "id": "HttpMethodSemantics", "namespace": "*" }, { "id": "HttpResponseCodeSemantics", "namespace": "*" }, { "id": "PaginatedTrait", "namespace": "*" }, { "id": "HttpHeaderTrait", "namespace": "*" }, { "id": "HttpUriConflict", "namespace": "*" }, { "id": "Service", "namespace": "*" } ] }, "shapes": { "com.amazonaws.kinesisvideomedia#AWSAcuityInletService": { "type": "service", "version": "2017-09-30", "operations": [ { "target": "com.amazonaws.kinesisvideomedia#GetMedia" } ], "traits": { "aws.api#service": { "sdkId": "Kinesis Video Media", "arnNamespace": "kinesisvideo", "cloudFormationName": "KinesisVideoMedia", "cloudTrailEventSource": "kinesisvideomedia.amazonaws.com", "endpointPrefix": "kinesisvideo" }, "aws.auth#sigv4": { "name": "kinesisvideo" }, "aws.protocols#restJson1": {}, "smithy.api#documentation": "
", "smithy.api#title": "Amazon Kinesis Video Streams Media" } }, "com.amazonaws.kinesisvideomedia#ClientLimitExceededException": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.kinesisvideomedia#ErrorMessage" } }, "traits": { "smithy.api#documentation": "Kinesis Video Streams has throttled the request because you have exceeded the limit of\n allowed client calls. Try making the call later.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.kinesisvideomedia#ConnectionLimitExceededException": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.kinesisvideomedia#ErrorMessage" } }, "traits": { "smithy.api#documentation": "Kinesis Video Streams has throttled the request because you have exceeded the limit of\n allowed client connections.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.kinesisvideomedia#ContentType": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 128 }, "smithy.api#pattern": "^[a-zA-Z0-9_\\.\\-]+$" } }, "com.amazonaws.kinesisvideomedia#ContinuationToken": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 128 }, "smithy.api#pattern": "^[a-zA-Z0-9_\\.\\-]+$" } }, "com.amazonaws.kinesisvideomedia#ErrorMessage": { "type": "string" }, "com.amazonaws.kinesisvideomedia#FragmentNumberString": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 128 }, "smithy.api#pattern": "^[0-9]+$" } }, "com.amazonaws.kinesisvideomedia#GetMedia": { "type": "operation", "input": { "target": "com.amazonaws.kinesisvideomedia#GetMediaInput" }, "output": { "target": "com.amazonaws.kinesisvideomedia#GetMediaOutput" }, "errors": [ { "target": "com.amazonaws.kinesisvideomedia#ClientLimitExceededException" }, { "target": "com.amazonaws.kinesisvideomedia#ConnectionLimitExceededException" }, { "target": "com.amazonaws.kinesisvideomedia#InvalidArgumentException" }, { "target": "com.amazonaws.kinesisvideomedia#InvalidEndpointException" }, { "target": "com.amazonaws.kinesisvideomedia#NotAuthorizedException" }, { "target": "com.amazonaws.kinesisvideomedia#ResourceNotFoundException" } ], "traits": { "smithy.api#documentation": "Use this API to retrieve media content from a Kinesis video stream. In the request,\n you identify the stream name or stream Amazon Resource Name (ARN), and the starting chunk.\n Kinesis Video Streams then returns a stream of chunks in order by fragment number.
\nYou must first call the GetDataEndpoint
API to get an endpoint. Then\n send the GetMedia
requests to this endpoint using the --endpoint-url parameter.\n
When you put media data (fragments) on a stream, Kinesis Video Streams stores each\n incoming fragment and related metadata in what is called a \"chunk.\" For more information, see\n PutMedia. The GetMedia
API returns a stream of these chunks starting\n from the chunk that you specify in the request.
The following limits apply when using the GetMedia
API:
A client can call GetMedia
up to five times per second per stream.\n
Kinesis Video Streams sends media data at a rate of up to 25 megabytes per second\n (or 200 megabits per second) during a GetMedia
session.
If an error is thrown after invoking a Kinesis Video Streams media API, in addition to\n the HTTP status code and the response body, it includes the following pieces of information:
\n\n x-amz-ErrorType
HTTP header – contains a more specific error type in\n addition to what the HTTP status code provides.
\n x-amz-RequestId
HTTP header – if you want to report an issue to AWS,\n the support team can better diagnose the problem if given the Request Id.
Both the HTTP status code and the ErrorType header can be utilized to make programmatic\n decisions about whether errors are retry-able and under what conditions, as well as provide\n information on what actions the client programmer might need to take in order to\n successfully try again.
\nFor more information, see the Errors section at the\n bottom of this topic, as well as Common Errors.
\nThe Kinesis video stream name from where you want to get the media content. If you\n don't specify the streamName
, you must specify the\n streamARN
.
The ARN of the stream from where you want to get the media content. If you don't\n specify the streamARN
, you must specify the streamName
.
Identifies the starting chunk to get from the specified stream.
", "smithy.api#required": {} } } } }, "com.amazonaws.kinesisvideomedia#GetMediaOutput": { "type": "structure", "members": { "ContentType": { "target": "com.amazonaws.kinesisvideomedia#ContentType", "traits": { "smithy.api#documentation": "The content type of the requested media.
", "smithy.api#httpHeader": "Content-Type" } }, "Payload": { "target": "com.amazonaws.kinesisvideomedia#Payload", "traits": { "smithy.api#documentation": " The payload Kinesis Video Streams returns is a sequence of chunks from the specified\n stream. For information about the chunks, see . The\n chunks that Kinesis Video Streams returns in the GetMedia
call also include the\n following additional Matroska (MKV) tags:
AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your\n GetMedia
call terminates, you can use this continuation token in your next\n request to get the next chunk where the last request terminated.
AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can use\n this tag value to determine how far behind the chunk returned in the response is from the\n latest chunk on the stream.
\nAWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.
\nAWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment.
\nAWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment.
\nThe following tags will be present if an error occurs:
\nAWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused GetMedia\n to stop.
\nAWS_KINESISVIDEO_ERROR_ID: Integer code of the error.
\nThe error codes are as follows:
\n3002 - Error writing to the stream
\n4000 - Requested fragment is not found
\n4500 - Access denied for the stream's KMS key
\n4501 - Stream's KMS key is disabled
\n4502 - Validation error on the stream's KMS key
\n4503 - KMS key specified in the stream is unavailable
\n4504 - Invalid usage of the KMS key specified in the stream
\n4505 - Invalid state of the KMS key specified in the stream
\n4506 - Unable to find the KMS key specified in the stream
\n5000 - Internal error
\nThe value for this input parameter is invalid.
", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.kinesisvideomedia#InvalidEndpointException": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.kinesisvideomedia#ErrorMessage" } }, "traits": { "smithy.api#documentation": " Status Code: 400, Caller used wrong endpoint to write data to a stream. On receiving\n such an exception, the user must call GetDataEndpoint
with\n AccessMode
set to \"READ\" and use the endpoint Kinesis Video returns in the next\n GetMedia
call.
Status Code: 403, The caller is not authorized to perform an operation on the given\n stream, or the token has expired.
", "smithy.api#error": "client", "smithy.api#httpError": 401 } }, "com.amazonaws.kinesisvideomedia#Payload": { "type": "blob", "traits": { "smithy.api#streaming": {} } }, "com.amazonaws.kinesisvideomedia#ResourceARN": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 1024 }, "smithy.api#pattern": "arn:aws:kinesisvideo:[a-z0-9-]+:[0-9]+:[a-z]+/[a-zA-Z0-9_.-]+/[0-9]+" } }, "com.amazonaws.kinesisvideomedia#ResourceNotFoundException": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.kinesisvideomedia#ErrorMessage" } }, "traits": { "smithy.api#documentation": "Status Code: 404, The stream with the given name does not exist.
", "smithy.api#error": "client", "smithy.api#httpError": 404 } }, "com.amazonaws.kinesisvideomedia#StartSelector": { "type": "structure", "members": { "StartSelectorType": { "target": "com.amazonaws.kinesisvideomedia#StartSelectorType", "traits": { "smithy.api#documentation": "Identifies the fragment on the Kinesis video stream where you want to start getting the\n data from.
\nNOW - Start with the latest chunk on the stream.
\nEARLIEST - Start with earliest available chunk on the stream.
\nFRAGMENT_NUMBER - Start with the chunk after a specific fragment. You must also\n specify the AfterFragmentNumber
parameter.
PRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with the chunk containing a fragment\n with the specified producer or server timestamp. You specify the timestamp by adding\n StartTimestamp
.
CONTINUATION_TOKEN - Read using the specified continuation token.
\nIf you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the\n startSelectorType
, you don't provide any additional information in the\n startSelector
.
Specifies the fragment number from where you want the GetMedia
API to\n start returning the fragments.
A timestamp value. This value is required if you choose the PRODUCER_TIMESTAMP or the\n SERVER_TIMESTAMP as the startSelectorType
. The GetMedia
API then\n starts with the chunk containing the fragment that has the specified timestamp.
Continuation token that Kinesis Video Streams returned in the previous\n GetMedia
response. The GetMedia
API then starts with the chunk\n identified by the continuation token.
Identifies the chunk on the Kinesis video stream where you want the\n GetMedia
API to start returning media data. You have the following options to\n identify the starting chunk:
Choose the latest (or oldest) chunk.
\nIdentify a specific chunk. You can identify a specific chunk either by providing a\n fragment number or timestamp (server or producer).
\nEach chunk's metadata includes a continuation token as a Matroska (MKV) tag\n (AWS_KINESISVIDEO_CONTINUATION_TOKEN
). If your previous\n GetMedia
request terminated, you can use this tag value in your next\n GetMedia
request. The API then starts returning chunks starting where the\n last API ended.