Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-kinesis-video-archived-media): Add support for GetImages …
…API for retrieving images from a video stream
- Loading branch information
awstools
committed
May 3, 2022
1 parent
d3b2e8c
commit a775394
Showing
7 changed files
with
745 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
clients/client-kinesis-video-archived-media/src/commands/GetImagesCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import { getSerdePlugin } from "@aws-sdk/middleware-serde"; | ||
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; | ||
import { Command as $Command } from "@aws-sdk/smithy-client"; | ||
import { | ||
FinalizeHandlerArguments, | ||
Handler, | ||
HandlerExecutionContext, | ||
HttpHandlerOptions as __HttpHandlerOptions, | ||
MetadataBearer as __MetadataBearer, | ||
MiddlewareStack, | ||
SerdeContext as __SerdeContext, | ||
} from "@aws-sdk/types"; | ||
|
||
import { | ||
KinesisVideoArchivedMediaClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes, | ||
} from "../KinesisVideoArchivedMediaClient"; | ||
import { GetImagesInput, GetImagesOutput } from "../models/models_0"; | ||
import { | ||
deserializeAws_restJson1GetImagesCommand, | ||
serializeAws_restJson1GetImagesCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
|
||
export interface GetImagesCommandInput extends GetImagesInput {} | ||
export interface GetImagesCommandOutput extends GetImagesOutput, __MetadataBearer {} | ||
|
||
/** | ||
* <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 | ||
* import { KinesisVideoArchivedMediaClient, GetImagesCommand } from "@aws-sdk/client-kinesis-video-archived-media"; // ES Modules import | ||
* // const { KinesisVideoArchivedMediaClient, GetImagesCommand } = require("@aws-sdk/client-kinesis-video-archived-media"); // CommonJS import | ||
* const client = new KinesisVideoArchivedMediaClient(config); | ||
* const command = new GetImagesCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link GetImagesCommandInput} for command's `input` shape. | ||
* @see {@link GetImagesCommandOutput} for command's `response` shape. | ||
* @see {@link KinesisVideoArchivedMediaClientResolvedConfig | config} for KinesisVideoArchivedMediaClient's `config` shape. | ||
* | ||
*/ | ||
export class GetImagesCommand extends $Command< | ||
GetImagesCommandInput, | ||
GetImagesCommandOutput, | ||
KinesisVideoArchivedMediaClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: GetImagesCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: KinesisVideoArchivedMediaClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<GetImagesCommandInput, GetImagesCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "KinesisVideoArchivedMediaClient"; | ||
const commandName = "GetImagesCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: GetImagesInput.filterSensitiveLog, | ||
outputFilterSensitiveLog: GetImagesOutput.filterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: GetImagesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_restJson1GetImagesCommand(input, context); | ||
} | ||
|
||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetImagesCommandOutput> { | ||
return deserializeAws_restJson1GetImagesCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
1 change: 1 addition & 0 deletions
1
clients/client-kinesis-video-archived-media/src/commands/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
export * from "./GetClipCommand"; | ||
export * from "./GetDASHStreamingSessionURLCommand"; | ||
export * from "./GetHLSStreamingSessionURLCommand"; | ||
export * from "./GetImagesCommand"; | ||
export * from "./GetMediaForFragmentListCommand"; | ||
export * from "./ListFragmentsCommand"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.