Skip to content

Commit

Permalink
feat(client-kinesis-video-archived-media): NoDataRetentionException t…
Browse files Browse the repository at this point in the history
…hrown when GetImages requested for a Stream that does not retain data (that is, has a DataRetentionInHours of 0).
  • Loading branch information
awstools committed Dec 28, 2023
1 parent 1c08c4d commit 5e8a193
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export interface GetClipCommandOutput extends Omit<GetClipOutput, "Payload">, __
* <p>No codec private data was found in at least one of tracks of the video stream.</p>
*
* @throws {@link NoDataRetentionException} (client fault)
* <p>A streaming session was requested for a stream that does not retain data (that is, has
* <p>
* <code>GetImages</code> was requested for a stream that does not retain data (that is, has
* a <code>DataRetentionInHours</code> of 0). </p>
*
* @throws {@link NotAuthorizedException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ export interface GetDASHStreamingSessionURLCommandOutput extends GetDASHStreamin
* <p>No codec private data was found in at least one of tracks of the video stream.</p>
*
* @throws {@link NoDataRetentionException} (client fault)
* <p>A streaming session was requested for a stream that does not retain data (that is, has
* <p>
* <code>GetImages</code> was requested for a stream that does not retain data (that is, has
* a <code>DataRetentionInHours</code> of 0). </p>
*
* @throws {@link NotAuthorizedException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ export interface GetHLSStreamingSessionURLCommandOutput extends GetHLSStreamingS
* <p>No codec private data was found in at least one of tracks of the video stream.</p>
*
* @throws {@link NoDataRetentionException} (client fault)
* <p>A streaming session was requested for a stream that does not retain data (that is, has
* <p>
* <code>GetImages</code> was requested for a stream that does not retain data (that is, has
* a <code>DataRetentionInHours</code> of 0). </p>
*
* @throws {@link NotAuthorizedException} (client fault)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export interface GetImagesCommandOutput extends GetImagesOutput, __MetadataBeare

/**
* @public
* <p>Retrieves a list of Images corresponding to each timestamp for a given time range, sampling interval, and image format configuration.</p>
* <p>Retrieves a list of images corresponding to each timestamp for a given time range,
* sampling interval, and image format configuration.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -83,6 +84,11 @@ export interface GetImagesCommandOutput extends GetImagesOutput, __MetadataBeare
* <p>A specified parameter exceeds its restrictions, is not supported, or can't be
* used.</p>
*
* @throws {@link NoDataRetentionException} (client fault)
* <p>
* <code>GetImages</code> was requested for a stream that does not retain data (that is, has
* a <code>DataRetentionInHours</code> of 0). </p>
*
* @throws {@link NotAuthorizedException} (client fault)
* <p>Status Code: 403, The caller is not authorized to perform an operation on the given
* stream, or the token has expired.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ export class MissingCodecPrivateDataException extends __BaseException {

/**
* @public
* <p>A streaming session was requested for a stream that does not retain data (that is, has
* <p>
* <code>GetImages</code> was requested for a stream that does not retain data (that is, has
* a <code>DataRetentionInHours</code> of 0). </p>
*/
export class NoDataRetentionException extends __BaseException {
Expand Down Expand Up @@ -1100,13 +1101,8 @@ export interface GetImagesInput {

/**
* @public
* <p>The time interval in milliseconds (ms) at which the images need to be generated from
* the stream, with a default of 3000 ms. The minimum value that can be provided is 200 ms.
* If the timestamp range is less than the sampling interval, the Image from the
* <code>startTimestamp</code> will be returned if available. </p>
* <note>
* <p>The minimum value of 200 ms is a hard limit.</p>
* </note>
* <p>The time interval in milliseconds (ms) at which the images need to be generated from the stream. The minimum value that can be provided is 200 ms (5 images per second). If the timestamp range is less than the sampling interval, the image from the <code>startTimestamp</code> will be returned if available.
* </p>
*/
SamplingInterval?: number;

Expand Down Expand Up @@ -1402,6 +1398,9 @@ export interface ListFragmentsInput {
* @public
* <p>Describes the timestamp range and timestamp origin for the range of fragments to
* return.</p>
* <note>
* <p>This is only required when the <code>NextToken</code> isn't passed in the API.</p>
* </note>
*/
FragmentSelector?: FragmentSelector;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,9 @@ const de_GetImagesCommandError = async (
case "InvalidArgumentException":
case "com.amazonaws.kinesisvideoarchivedmedia#InvalidArgumentException":
throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
case "NoDataRetentionException":
case "com.amazonaws.kinesisvideoarchivedmedia#NoDataRetentionException":
throw await de_NoDataRetentionExceptionRes(parsedOutput, context);
case "NotAuthorizedException":
case "com.amazonaws.kinesisvideoarchivedmedia#NotAuthorizedException":
throw await de_NotAuthorizedExceptionRes(parsedOutput, context);
Expand Down
11 changes: 7 additions & 4 deletions codegen/sdk-codegen/aws-models/kinesis-video-archived-media.json
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,9 @@
{
"target": "com.amazonaws.kinesisvideoarchivedmedia#InvalidArgumentException"
},
{
"target": "com.amazonaws.kinesisvideoarchivedmedia#NoDataRetentionException"
},
{
"target": "com.amazonaws.kinesisvideoarchivedmedia#NotAuthorizedException"
},
Expand All @@ -1641,7 +1644,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Retrieves a list of Images corresponding to each timestamp for a given time range, sampling interval, and image format configuration.</p>",
"smithy.api#documentation": "<p>Retrieves a list of images corresponding to each timestamp for a given time range,\n sampling interval, and image format configuration.</p>",
"smithy.api#http": {
"method": "POST",
"uri": "/getImages",
Expand Down Expand Up @@ -1694,7 +1697,7 @@
"SamplingInterval": {
"target": "com.amazonaws.kinesisvideoarchivedmedia#SamplingInterval",
"traits": {
"smithy.api#documentation": "<p>The time interval in milliseconds (ms) at which the images need to be generated from\n the stream, with a default of 3000 ms. The minimum value that can be provided is 200 ms.\n If the timestamp range is less than the sampling interval, the Image from the\n <code>startTimestamp</code> will be returned if available. </p>\n <note>\n <p>The minimum value of 200 ms is a hard limit.</p>\n </note>"
"smithy.api#documentation": "<p>The time interval in milliseconds (ms) at which the images need to be generated from the stream. The minimum value that can be provided is 200 ms (5 images per second). If the timestamp range is less than the sampling interval, the image from the <code>startTimestamp</code> will be returned if available.\n </p>"
}
},
"Format": {
Expand Down Expand Up @@ -2171,7 +2174,7 @@
"FragmentSelector": {
"target": "com.amazonaws.kinesisvideoarchivedmedia#FragmentSelector",
"traits": {
"smithy.api#documentation": "<p>Describes the timestamp range and timestamp origin for the range of fragments to\n return.</p>"
"smithy.api#documentation": "<p>Describes the timestamp range and timestamp origin for the range of fragments to\n return.</p>\n <note>\n <p>This is only required when the <code>NextToken</code> isn't passed in the API.</p>\n </note>"
}
}
},
Expand Down Expand Up @@ -2245,7 +2248,7 @@
}
},
"traits": {
"smithy.api#documentation": "<p>A streaming session was requested for a stream that does not retain data (that is, has\n a <code>DataRetentionInHours</code> of 0). </p>",
"smithy.api#documentation": "<p>\n <code>GetImages</code> was requested for a stream that does not retain data (that is, has\n a <code>DataRetentionInHours</code> of 0). </p>",
"smithy.api#error": "client",
"smithy.api#httpError": 400
}
Expand Down

0 comments on commit 5e8a193

Please sign in to comment.