{ "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.

\n \n

You 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

\n
\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.

\n

The following limits apply when using the GetMedia API:

\n \n\n \n

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

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.

\n

For more information, see the Errors section at the\n bottom of this topic, as well as Common Errors.

\n
", "smithy.api#http": { "method": "POST", "uri": "/getMedia", "code": 200 } } }, "com.amazonaws.kinesisvideomedia#GetMediaInput": { "type": "structure", "members": { "StreamName": { "target": "com.amazonaws.kinesisvideomedia#StreamName", "traits": { "smithy.api#documentation": "

The 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.

" } }, "StreamARN": { "target": "com.amazonaws.kinesisvideomedia#ResourceARN", "traits": { "smithy.api#documentation": "

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.

" } }, "StartSelector": { "target": "com.amazonaws.kinesisvideomedia#StartSelector", "traits": { "smithy.api#documentation": "

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:

\n \n

The following tags will be present if an error occurs:

\n \n

The error codes are as follows:

\n ", "smithy.api#httpPayload": {} } } } }, "com.amazonaws.kinesisvideomedia#InvalidArgumentException": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.kinesisvideomedia#ErrorMessage" } }, "traits": { "smithy.api#documentation": "

The 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.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } }, "com.amazonaws.kinesisvideomedia#NotAuthorizedException": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.kinesisvideomedia#ErrorMessage" } }, "traits": { "smithy.api#documentation": "

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.

\n \n \n

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

\n
", "smithy.api#required": {} } }, "AfterFragmentNumber": { "target": "com.amazonaws.kinesisvideomedia#FragmentNumberString", "traits": { "smithy.api#documentation": "

Specifies the fragment number from where you want the GetMedia API to\n start returning the fragments.

" } }, "StartTimestamp": { "target": "com.amazonaws.kinesisvideomedia#Timestamp", "traits": { "smithy.api#documentation": "

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.

" } }, "ContinuationToken": { "target": "com.amazonaws.kinesisvideomedia#ContinuationToken", "traits": { "smithy.api#documentation": "

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.

" } } }, "traits": { "smithy.api#documentation": "

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:

\n " } }, "com.amazonaws.kinesisvideomedia#StartSelectorType": { "type": "string", "traits": { "smithy.api#enum": [ { "value": "FRAGMENT_NUMBER", "name": "FRAGMENT_NUMBER" }, { "value": "SERVER_TIMESTAMP", "name": "SERVER_TIMESTAMP" }, { "value": "PRODUCER_TIMESTAMP", "name": "PRODUCER_TIMESTAMP" }, { "value": "NOW", "name": "NOW" }, { "value": "EARLIEST", "name": "EARLIEST" }, { "value": "CONTINUATION_TOKEN", "name": "CONTINUATION_TOKEN" } ] } }, "com.amazonaws.kinesisvideomedia#StreamName": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 256 }, "smithy.api#pattern": "[a-zA-Z0-9_.-]+" } }, "com.amazonaws.kinesisvideomedia#Timestamp": { "type": "timestamp" } } }