Skip to content

Commit 7f6b5df

Browse files
author
awstools
committed
feat(client-mediaconnect): AWS Elemental MediaConnect introduces thumbnails for Flow source monitoring. Thumbnails provide still image previews of the live content feeding your MediaConnect Flow allowing you to easily verify that your source is operating as expected.
1 parent c4db70b commit 7f6b5df

File tree

11 files changed

+516
-0
lines changed

11 files changed

+516
-0
lines changed

clients/client-mediaconnect/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,14 @@ DescribeFlowSourceMetadata
330330

331331
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconnect/command/DescribeFlowSourceMetadataCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconnect/Interface/DescribeFlowSourceMetadataCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconnect/Interface/DescribeFlowSourceMetadataCommandOutput/)
332332

333+
</details>
334+
<details>
335+
<summary>
336+
DescribeFlowSourceThumbnail
337+
</summary>
338+
339+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconnect/command/DescribeFlowSourceThumbnailCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconnect/Interface/DescribeFlowSourceThumbnailCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconnect/Interface/DescribeFlowSourceThumbnailCommandOutput/)
340+
333341
</details>
334342
<details>
335343
<summary>

clients/client-mediaconnect/src/MediaConnect.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ import {
7474
DescribeFlowSourceMetadataCommandInput,
7575
DescribeFlowSourceMetadataCommandOutput,
7676
} from "./commands/DescribeFlowSourceMetadataCommand";
77+
import {
78+
DescribeFlowSourceThumbnailCommand,
79+
DescribeFlowSourceThumbnailCommandInput,
80+
DescribeFlowSourceThumbnailCommandOutput,
81+
} from "./commands/DescribeFlowSourceThumbnailCommand";
7782
import {
7883
DescribeGatewayCommand,
7984
DescribeGatewayCommandInput,
@@ -244,6 +249,7 @@ const commands = {
244249
DescribeBridgeCommand,
245250
DescribeFlowCommand,
246251
DescribeFlowSourceMetadataCommand,
252+
DescribeFlowSourceThumbnailCommand,
247253
DescribeGatewayCommand,
248254
DescribeGatewayInstanceCommand,
249255
DescribeOfferingCommand,
@@ -503,6 +509,23 @@ export interface MediaConnect {
503509
cb: (err: any, data?: DescribeFlowSourceMetadataCommandOutput) => void
504510
): void;
505511

512+
/**
513+
* @see {@link DescribeFlowSourceThumbnailCommand}
514+
*/
515+
describeFlowSourceThumbnail(
516+
args: DescribeFlowSourceThumbnailCommandInput,
517+
options?: __HttpHandlerOptions
518+
): Promise<DescribeFlowSourceThumbnailCommandOutput>;
519+
describeFlowSourceThumbnail(
520+
args: DescribeFlowSourceThumbnailCommandInput,
521+
cb: (err: any, data?: DescribeFlowSourceThumbnailCommandOutput) => void
522+
): void;
523+
describeFlowSourceThumbnail(
524+
args: DescribeFlowSourceThumbnailCommandInput,
525+
options: __HttpHandlerOptions,
526+
cb: (err: any, data?: DescribeFlowSourceThumbnailCommandOutput) => void
527+
): void;
528+
506529
/**
507530
* @see {@link DescribeGatewayCommand}
508531
*/

clients/client-mediaconnect/src/MediaConnectClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ import {
8181
DescribeFlowSourceMetadataCommandInput,
8282
DescribeFlowSourceMetadataCommandOutput,
8383
} from "./commands/DescribeFlowSourceMetadataCommand";
84+
import {
85+
DescribeFlowSourceThumbnailCommandInput,
86+
DescribeFlowSourceThumbnailCommandOutput,
87+
} from "./commands/DescribeFlowSourceThumbnailCommand";
8488
import { DescribeGatewayCommandInput, DescribeGatewayCommandOutput } from "./commands/DescribeGatewayCommand";
8589
import {
8690
DescribeGatewayInstanceCommandInput,
@@ -180,6 +184,7 @@ export type ServiceInputTypes =
180184
| DescribeBridgeCommandInput
181185
| DescribeFlowCommandInput
182186
| DescribeFlowSourceMetadataCommandInput
187+
| DescribeFlowSourceThumbnailCommandInput
183188
| DescribeGatewayCommandInput
184189
| DescribeGatewayInstanceCommandInput
185190
| DescribeOfferingCommandInput
@@ -236,6 +241,7 @@ export type ServiceOutputTypes =
236241
| DescribeBridgeCommandOutput
237242
| DescribeFlowCommandOutput
238243
| DescribeFlowSourceMetadataCommandOutput
244+
| DescribeFlowSourceThumbnailCommandOutput
239245
| DescribeGatewayCommandOutput
240246
| DescribeGatewayInstanceCommandOutput
241247
| DescribeOfferingCommandOutput

clients/client-mediaconnect/src/commands/CreateFlowCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
257257
* MaintenanceDay: "Monday" || "Tuesday" || "Wednesday" || "Thursday" || "Friday" || "Saturday" || "Sunday", // required
258258
* MaintenanceStartHour: "STRING_VALUE", // required
259259
* },
260+
* SourceMonitoringConfig: { // MonitoringConfig
261+
* ThumbnailState: "ENABLED" || "DISABLED",
262+
* },
260263
* };
261264
* const command = new CreateFlowCommand(input);
262265
* const response = await client.send(command);
@@ -535,6 +538,9 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
535538
* // MaintenanceScheduledDate: "STRING_VALUE",
536539
* // MaintenanceStartHour: "STRING_VALUE",
537540
* // },
541+
* // SourceMonitoringConfig: { // MonitoringConfig
542+
* // ThumbnailState: "ENABLED" || "DISABLED",
543+
* // },
538544
* // },
539545
* // };
540546
*

clients/client-mediaconnect/src/commands/DescribeFlowCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,9 @@ export interface DescribeFlowCommandOutput extends DescribeFlowResponse, __Metad
315315
* // MaintenanceScheduledDate: "STRING_VALUE",
316316
* // MaintenanceStartHour: "STRING_VALUE",
317317
* // },
318+
* // SourceMonitoringConfig: { // MonitoringConfig
319+
* // ThumbnailState: "ENABLED" || "DISABLED",
320+
* // },
318321
* // },
319322
* // Messages: { // Messages
320323
* // Errors: "<__listOf__string>", // required
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { MediaConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaConnectClient";
9+
import { DescribeFlowSourceThumbnailRequest, DescribeFlowSourceThumbnailResponse } from "../models/models_0";
10+
import {
11+
de_DescribeFlowSourceThumbnailCommand,
12+
se_DescribeFlowSourceThumbnailCommand,
13+
} from "../protocols/Aws_restJson1";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link DescribeFlowSourceThumbnailCommand}.
24+
*/
25+
export interface DescribeFlowSourceThumbnailCommandInput extends DescribeFlowSourceThumbnailRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link DescribeFlowSourceThumbnailCommand}.
30+
*/
31+
export interface DescribeFlowSourceThumbnailCommandOutput
32+
extends DescribeFlowSourceThumbnailResponse,
33+
__MetadataBearer {}
34+
35+
/**
36+
* Displays the thumbnail details of a flow's source stream.
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { MediaConnectClient, DescribeFlowSourceThumbnailCommand } from "@aws-sdk/client-mediaconnect"; // ES Modules import
41+
* // const { MediaConnectClient, DescribeFlowSourceThumbnailCommand } = require("@aws-sdk/client-mediaconnect"); // CommonJS import
42+
* const client = new MediaConnectClient(config);
43+
* const input = { // DescribeFlowSourceThumbnailRequest
44+
* FlowArn: "STRING_VALUE", // required
45+
* };
46+
* const command = new DescribeFlowSourceThumbnailCommand(input);
47+
* const response = await client.send(command);
48+
* // { // DescribeFlowSourceThumbnailResponse
49+
* // ThumbnailDetails: { // ThumbnailDetails
50+
* // FlowArn: "STRING_VALUE", // required
51+
* // Thumbnail: "STRING_VALUE",
52+
* // ThumbnailMessages: [ // __listOfMessageDetail // required
53+
* // { // MessageDetail
54+
* // Code: "STRING_VALUE", // required
55+
* // Message: "STRING_VALUE", // required
56+
* // ResourceName: "STRING_VALUE",
57+
* // },
58+
* // ],
59+
* // Timecode: "STRING_VALUE",
60+
* // Timestamp: new Date("TIMESTAMP"),
61+
* // },
62+
* // };
63+
*
64+
* ```
65+
*
66+
* @param DescribeFlowSourceThumbnailCommandInput - {@link DescribeFlowSourceThumbnailCommandInput}
67+
* @returns {@link DescribeFlowSourceThumbnailCommandOutput}
68+
* @see {@link DescribeFlowSourceThumbnailCommandInput} for command's `input` shape.
69+
* @see {@link DescribeFlowSourceThumbnailCommandOutput} for command's `response` shape.
70+
* @see {@link MediaConnectClientResolvedConfig | config} for MediaConnectClient's `config` shape.
71+
*
72+
* @throws {@link BadRequestException} (client fault)
73+
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
74+
*
75+
* @throws {@link ForbiddenException} (client fault)
76+
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
77+
*
78+
* @throws {@link InternalServerErrorException} (server fault)
79+
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
80+
*
81+
* @throws {@link NotFoundException} (client fault)
82+
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
83+
*
84+
* @throws {@link ServiceUnavailableException} (server fault)
85+
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
86+
*
87+
* @throws {@link TooManyRequestsException} (client fault)
88+
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
89+
*
90+
* @throws {@link MediaConnectServiceException}
91+
* <p>Base exception class for all service exceptions from MediaConnect service.</p>
92+
*
93+
* @public
94+
*/
95+
export class DescribeFlowSourceThumbnailCommand extends $Command
96+
.classBuilder<
97+
DescribeFlowSourceThumbnailCommandInput,
98+
DescribeFlowSourceThumbnailCommandOutput,
99+
MediaConnectClientResolvedConfig,
100+
ServiceInputTypes,
101+
ServiceOutputTypes
102+
>()
103+
.ep({
104+
...commonParams,
105+
})
106+
.m(function (this: any, Command: any, cs: any, config: MediaConnectClientResolvedConfig, o: any) {
107+
return [
108+
getSerdePlugin(config, this.serialize, this.deserialize),
109+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
110+
];
111+
})
112+
.s("MediaConnect", "DescribeFlowSourceThumbnail", {})
113+
.n("MediaConnectClient", "DescribeFlowSourceThumbnailCommand")
114+
.f(void 0, void 0)
115+
.ser(se_DescribeFlowSourceThumbnailCommand)
116+
.de(de_DescribeFlowSourceThumbnailCommand)
117+
.build() {}

clients/client-mediaconnect/src/commands/UpdateFlowCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ export interface UpdateFlowCommandOutput extends UpdateFlowResponse, __MetadataB
5050
* MaintenanceScheduledDate: "STRING_VALUE",
5151
* MaintenanceStartHour: "STRING_VALUE",
5252
* },
53+
* SourceMonitoringConfig: { // MonitoringConfig
54+
* ThumbnailState: "ENABLED" || "DISABLED",
55+
* },
5356
* };
5457
* const command = new UpdateFlowCommand(input);
5558
* const response = await client.send(command);
@@ -328,6 +331,9 @@ export interface UpdateFlowCommandOutput extends UpdateFlowResponse, __MetadataB
328331
* // MaintenanceScheduledDate: "STRING_VALUE",
329332
* // MaintenanceStartHour: "STRING_VALUE",
330333
* // },
334+
* // SourceMonitoringConfig: { // MonitoringConfig
335+
* // ThumbnailState: "ENABLED" || "DISABLED",
336+
* // },
331337
* // },
332338
* // };
333339
*

clients/client-mediaconnect/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export * from "./DeregisterGatewayInstanceCommand";
1515
export * from "./DescribeBridgeCommand";
1616
export * from "./DescribeFlowCommand";
1717
export * from "./DescribeFlowSourceMetadataCommand";
18+
export * from "./DescribeFlowSourceThumbnailCommand";
1819
export * from "./DescribeGatewayCommand";
1920
export * from "./DescribeGatewayInstanceCommand";
2021
export * from "./DescribeOfferingCommand";

clients/client-mediaconnect/src/models/models_0.ts

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,6 +3200,32 @@ export class CreateFlow420Exception extends __BaseException {
32003200
}
32013201
}
32023202

3203+
/**
3204+
* @public
3205+
* @enum
3206+
*/
3207+
export const ThumbnailState = {
3208+
DISABLED: "DISABLED",
3209+
ENABLED: "ENABLED",
3210+
} as const;
3211+
3212+
/**
3213+
* @public
3214+
*/
3215+
export type ThumbnailState = (typeof ThumbnailState)[keyof typeof ThumbnailState];
3216+
3217+
/**
3218+
* The settings for source monitoring.
3219+
* @public
3220+
*/
3221+
export interface MonitoringConfig {
3222+
/**
3223+
* The state of thumbnail monitoring.
3224+
* @public
3225+
*/
3226+
ThumbnailState?: ThumbnailState;
3227+
}
3228+
32033229
/**
32043230
* Creates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).
32053231
* @public
@@ -3259,6 +3285,12 @@ export interface CreateFlowRequest {
32593285
* @public
32603286
*/
32613287
Maintenance?: AddMaintenance;
3288+
3289+
/**
3290+
* The settings for source monitoring.
3291+
* @public
3292+
*/
3293+
SourceMonitoringConfig?: MonitoringConfig;
32623294
}
32633295

32643296
/**
@@ -3344,6 +3376,12 @@ export interface Flow {
33443376
* @public
33453377
*/
33463378
Maintenance?: Maintenance;
3379+
3380+
/**
3381+
* The settings for source monitoring.
3382+
* @public
3383+
*/
3384+
SourceMonitoringConfig?: MonitoringConfig;
33473385
}
33483386

33493387
/**
@@ -3675,6 +3713,64 @@ export interface DescribeFlowSourceMetadataResponse {
36753713
TransportMediaInfo?: TransportMediaInfo;
36763714
}
36773715

3716+
/**
3717+
* @public
3718+
*/
3719+
export interface DescribeFlowSourceThumbnailRequest {
3720+
/**
3721+
* The Amazon Resource Name (ARN) of the flow.
3722+
* @public
3723+
*/
3724+
FlowArn: string | undefined;
3725+
}
3726+
3727+
/**
3728+
* The details of the thumbnail, including thumbnail base64 string, timecode and the time when thumbnail was generated.
3729+
* @public
3730+
*/
3731+
export interface ThumbnailDetails {
3732+
/**
3733+
* The ARN of the flow that DescribeFlowSourceThumbnail was performed on.
3734+
* @public
3735+
*/
3736+
FlowArn: string | undefined;
3737+
3738+
/**
3739+
* Thumbnail Base64 string.
3740+
* @public
3741+
*/
3742+
Thumbnail?: string;
3743+
3744+
/**
3745+
* Status code and messages about the flow source thumbnail.
3746+
* @public
3747+
*/
3748+
ThumbnailMessages: MessageDetail[] | undefined;
3749+
3750+
/**
3751+
* Timecode of thumbnail.
3752+
* @public
3753+
*/
3754+
Timecode?: string;
3755+
3756+
/**
3757+
* The timestamp of when thumbnail was generated.
3758+
* @public
3759+
*/
3760+
Timestamp?: Date;
3761+
}
3762+
3763+
/**
3764+
* @public
3765+
*/
3766+
export interface DescribeFlowSourceThumbnailResponse {
3767+
/**
3768+
* The details of the thumbnail, including thumbnail base64 string, timecode and the time when thumbnail was generated.
3769+
* @public
3770+
*/
3771+
ThumbnailDetails?: ThumbnailDetails;
3772+
}
3773+
36783774
/**
36793775
* @public
36803776
*/
@@ -4846,6 +4942,12 @@ export interface UpdateFlowRequest {
48464942
* @public
48474943
*/
48484944
Maintenance?: UpdateMaintenance;
4945+
4946+
/**
4947+
* The settings for source monitoring.
4948+
* @public
4949+
*/
4950+
SourceMonitoringConfig?: MonitoringConfig;
48494951
}
48504952

48514953
/**

0 commit comments

Comments
 (0)