Skip to content

Commit

Permalink
feat(client-mediaconnect): AWS Elemental MediaConnect introduces thum…
Browse files Browse the repository at this point in the history
…bnails 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.
  • Loading branch information
awstools committed Sep 3, 2024
1 parent c4db70b commit 7f6b5df
Show file tree
Hide file tree
Showing 11 changed files with 516 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clients/client-mediaconnect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,14 @@ DescribeFlowSourceMetadata

[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/)

</details>
<details>
<summary>
DescribeFlowSourceThumbnail
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-mediaconnect/src/MediaConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ import {
DescribeFlowSourceMetadataCommandInput,
DescribeFlowSourceMetadataCommandOutput,
} from "./commands/DescribeFlowSourceMetadataCommand";
import {
DescribeFlowSourceThumbnailCommand,
DescribeFlowSourceThumbnailCommandInput,
DescribeFlowSourceThumbnailCommandOutput,
} from "./commands/DescribeFlowSourceThumbnailCommand";
import {
DescribeGatewayCommand,
DescribeGatewayCommandInput,
Expand Down Expand Up @@ -244,6 +249,7 @@ const commands = {
DescribeBridgeCommand,
DescribeFlowCommand,
DescribeFlowSourceMetadataCommand,
DescribeFlowSourceThumbnailCommand,
DescribeGatewayCommand,
DescribeGatewayInstanceCommand,
DescribeOfferingCommand,
Expand Down Expand Up @@ -503,6 +509,23 @@ export interface MediaConnect {
cb: (err: any, data?: DescribeFlowSourceMetadataCommandOutput) => void
): void;

/**
* @see {@link DescribeFlowSourceThumbnailCommand}
*/
describeFlowSourceThumbnail(
args: DescribeFlowSourceThumbnailCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeFlowSourceThumbnailCommandOutput>;
describeFlowSourceThumbnail(
args: DescribeFlowSourceThumbnailCommandInput,
cb: (err: any, data?: DescribeFlowSourceThumbnailCommandOutput) => void
): void;
describeFlowSourceThumbnail(
args: DescribeFlowSourceThumbnailCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeFlowSourceThumbnailCommandOutput) => void
): void;

/**
* @see {@link DescribeGatewayCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-mediaconnect/src/MediaConnectClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ import {
DescribeFlowSourceMetadataCommandInput,
DescribeFlowSourceMetadataCommandOutput,
} from "./commands/DescribeFlowSourceMetadataCommand";
import {
DescribeFlowSourceThumbnailCommandInput,
DescribeFlowSourceThumbnailCommandOutput,
} from "./commands/DescribeFlowSourceThumbnailCommand";
import { DescribeGatewayCommandInput, DescribeGatewayCommandOutput } from "./commands/DescribeGatewayCommand";
import {
DescribeGatewayInstanceCommandInput,
Expand Down Expand Up @@ -180,6 +184,7 @@ export type ServiceInputTypes =
| DescribeBridgeCommandInput
| DescribeFlowCommandInput
| DescribeFlowSourceMetadataCommandInput
| DescribeFlowSourceThumbnailCommandInput
| DescribeGatewayCommandInput
| DescribeGatewayInstanceCommandInput
| DescribeOfferingCommandInput
Expand Down Expand Up @@ -236,6 +241,7 @@ export type ServiceOutputTypes =
| DescribeBridgeCommandOutput
| DescribeFlowCommandOutput
| DescribeFlowSourceMetadataCommandOutput
| DescribeFlowSourceThumbnailCommandOutput
| DescribeGatewayCommandOutput
| DescribeGatewayInstanceCommandOutput
| DescribeOfferingCommandOutput
Expand Down
6 changes: 6 additions & 0 deletions clients/client-mediaconnect/src/commands/CreateFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* MaintenanceDay: "Monday" || "Tuesday" || "Wednesday" || "Thursday" || "Friday" || "Saturday" || "Sunday", // required
* MaintenanceStartHour: "STRING_VALUE", // required
* },
* SourceMonitoringConfig: { // MonitoringConfig
* ThumbnailState: "ENABLED" || "DISABLED",
* },
* };
* const command = new CreateFlowCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -535,6 +538,9 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* // MaintenanceScheduledDate: "STRING_VALUE",
* // MaintenanceStartHour: "STRING_VALUE",
* // },
* // SourceMonitoringConfig: { // MonitoringConfig
* // ThumbnailState: "ENABLED" || "DISABLED",
* // },
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ export interface DescribeFlowCommandOutput extends DescribeFlowResponse, __Metad
* // MaintenanceScheduledDate: "STRING_VALUE",
* // MaintenanceStartHour: "STRING_VALUE",
* // },
* // SourceMonitoringConfig: { // MonitoringConfig
* // ThumbnailState: "ENABLED" || "DISABLED",
* // },
* // },
* // Messages: { // Messages
* // Errors: "<__listOf__string>", // required
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { MediaConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaConnectClient";
import { DescribeFlowSourceThumbnailRequest, DescribeFlowSourceThumbnailResponse } from "../models/models_0";
import {
de_DescribeFlowSourceThumbnailCommand,
se_DescribeFlowSourceThumbnailCommand,
} from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link DescribeFlowSourceThumbnailCommand}.
*/
export interface DescribeFlowSourceThumbnailCommandInput extends DescribeFlowSourceThumbnailRequest {}
/**
* @public
*
* The output of {@link DescribeFlowSourceThumbnailCommand}.
*/
export interface DescribeFlowSourceThumbnailCommandOutput
extends DescribeFlowSourceThumbnailResponse,
__MetadataBearer {}

/**
* Displays the thumbnail details of a flow's source stream.
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { MediaConnectClient, DescribeFlowSourceThumbnailCommand } from "@aws-sdk/client-mediaconnect"; // ES Modules import
* // const { MediaConnectClient, DescribeFlowSourceThumbnailCommand } = require("@aws-sdk/client-mediaconnect"); // CommonJS import
* const client = new MediaConnectClient(config);
* const input = { // DescribeFlowSourceThumbnailRequest
* FlowArn: "STRING_VALUE", // required
* };
* const command = new DescribeFlowSourceThumbnailCommand(input);
* const response = await client.send(command);
* // { // DescribeFlowSourceThumbnailResponse
* // ThumbnailDetails: { // ThumbnailDetails
* // FlowArn: "STRING_VALUE", // required
* // Thumbnail: "STRING_VALUE",
* // ThumbnailMessages: [ // __listOfMessageDetail // required
* // { // MessageDetail
* // Code: "STRING_VALUE", // required
* // Message: "STRING_VALUE", // required
* // ResourceName: "STRING_VALUE",
* // },
* // ],
* // Timecode: "STRING_VALUE",
* // Timestamp: new Date("TIMESTAMP"),
* // },
* // };
*
* ```
*
* @param DescribeFlowSourceThumbnailCommandInput - {@link DescribeFlowSourceThumbnailCommandInput}
* @returns {@link DescribeFlowSourceThumbnailCommandOutput}
* @see {@link DescribeFlowSourceThumbnailCommandInput} for command's `input` shape.
* @see {@link DescribeFlowSourceThumbnailCommandOutput} for command's `response` shape.
* @see {@link MediaConnectClientResolvedConfig | config} for MediaConnectClient's `config` shape.
*
* @throws {@link BadRequestException} (client fault)
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
*
* @throws {@link ForbiddenException} (client fault)
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
*
* @throws {@link InternalServerErrorException} (server fault)
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
*
* @throws {@link NotFoundException} (client fault)
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
*
* @throws {@link ServiceUnavailableException} (server fault)
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
*
* @throws {@link TooManyRequestsException} (client fault)
* Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.
*
* @throws {@link MediaConnectServiceException}
* <p>Base exception class for all service exceptions from MediaConnect service.</p>
*
* @public
*/
export class DescribeFlowSourceThumbnailCommand extends $Command
.classBuilder<
DescribeFlowSourceThumbnailCommandInput,
DescribeFlowSourceThumbnailCommandOutput,
MediaConnectClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: MediaConnectClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("MediaConnect", "DescribeFlowSourceThumbnail", {})
.n("MediaConnectClient", "DescribeFlowSourceThumbnailCommand")
.f(void 0, void 0)
.ser(se_DescribeFlowSourceThumbnailCommand)
.de(de_DescribeFlowSourceThumbnailCommand)
.build() {}
6 changes: 6 additions & 0 deletions clients/client-mediaconnect/src/commands/UpdateFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export interface UpdateFlowCommandOutput extends UpdateFlowResponse, __MetadataB
* MaintenanceScheduledDate: "STRING_VALUE",
* MaintenanceStartHour: "STRING_VALUE",
* },
* SourceMonitoringConfig: { // MonitoringConfig
* ThumbnailState: "ENABLED" || "DISABLED",
* },
* };
* const command = new UpdateFlowCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -328,6 +331,9 @@ export interface UpdateFlowCommandOutput extends UpdateFlowResponse, __MetadataB
* // MaintenanceScheduledDate: "STRING_VALUE",
* // MaintenanceStartHour: "STRING_VALUE",
* // },
* // SourceMonitoringConfig: { // MonitoringConfig
* // ThumbnailState: "ENABLED" || "DISABLED",
* // },
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-mediaconnect/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export * from "./DeregisterGatewayInstanceCommand";
export * from "./DescribeBridgeCommand";
export * from "./DescribeFlowCommand";
export * from "./DescribeFlowSourceMetadataCommand";
export * from "./DescribeFlowSourceThumbnailCommand";
export * from "./DescribeGatewayCommand";
export * from "./DescribeGatewayInstanceCommand";
export * from "./DescribeOfferingCommand";
Expand Down
102 changes: 102 additions & 0 deletions clients/client-mediaconnect/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3200,6 +3200,32 @@ export class CreateFlow420Exception extends __BaseException {
}
}

/**
* @public
* @enum
*/
export const ThumbnailState = {
DISABLED: "DISABLED",
ENABLED: "ENABLED",
} as const;

/**
* @public
*/
export type ThumbnailState = (typeof ThumbnailState)[keyof typeof ThumbnailState];

/**
* The settings for source monitoring.
* @public
*/
export interface MonitoringConfig {
/**
* The state of thumbnail monitoring.
* @public
*/
ThumbnailState?: ThumbnailState;
}

/**
* Creates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).
* @public
Expand Down Expand Up @@ -3259,6 +3285,12 @@ export interface CreateFlowRequest {
* @public
*/
Maintenance?: AddMaintenance;

/**
* The settings for source monitoring.
* @public
*/
SourceMonitoringConfig?: MonitoringConfig;
}

/**
Expand Down Expand Up @@ -3344,6 +3376,12 @@ export interface Flow {
* @public
*/
Maintenance?: Maintenance;

/**
* The settings for source monitoring.
* @public
*/
SourceMonitoringConfig?: MonitoringConfig;
}

/**
Expand Down Expand Up @@ -3675,6 +3713,64 @@ export interface DescribeFlowSourceMetadataResponse {
TransportMediaInfo?: TransportMediaInfo;
}

/**
* @public
*/
export interface DescribeFlowSourceThumbnailRequest {
/**
* The Amazon Resource Name (ARN) of the flow.
* @public
*/
FlowArn: string | undefined;
}

/**
* The details of the thumbnail, including thumbnail base64 string, timecode and the time when thumbnail was generated.
* @public
*/
export interface ThumbnailDetails {
/**
* The ARN of the flow that DescribeFlowSourceThumbnail was performed on.
* @public
*/
FlowArn: string | undefined;

/**
* Thumbnail Base64 string.
* @public
*/
Thumbnail?: string;

/**
* Status code and messages about the flow source thumbnail.
* @public
*/
ThumbnailMessages: MessageDetail[] | undefined;

/**
* Timecode of thumbnail.
* @public
*/
Timecode?: string;

/**
* The timestamp of when thumbnail was generated.
* @public
*/
Timestamp?: Date;
}

/**
* @public
*/
export interface DescribeFlowSourceThumbnailResponse {
/**
* The details of the thumbnail, including thumbnail base64 string, timecode and the time when thumbnail was generated.
* @public
*/
ThumbnailDetails?: ThumbnailDetails;
}

/**
* @public
*/
Expand Down Expand Up @@ -4846,6 +4942,12 @@ export interface UpdateFlowRequest {
* @public
*/
Maintenance?: UpdateMaintenance;

/**
* The settings for source monitoring.
* @public
*/
SourceMonitoringConfig?: MonitoringConfig;
}

/**
Expand Down
Loading

0 comments on commit 7f6b5df

Please sign in to comment.