Skip to content

Commit

Permalink
feat(client-medialive): AWS Elemental Link now supports attaching a L…
Browse files Browse the repository at this point in the history
…ink UHD device to a MediaConnect flow.
  • Loading branch information
awstools committed Sep 11, 2023
1 parent c885d48 commit 29e9aba
Show file tree
Hide file tree
Showing 17 changed files with 1,382 additions and 193 deletions.
16 changes: 16 additions & 0 deletions clients/client-medialive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,14 @@ StartChannel

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/classes/startchannelcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/interfaces/startchannelcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/interfaces/startchannelcommandoutput.html)

</details>
<details>
<summary>
StartInputDevice
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/classes/startinputdevicecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/interfaces/startinputdevicecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/interfaces/startinputdevicecommandoutput.html)

</details>
<details>
<summary>
Expand All @@ -610,6 +618,14 @@ StopChannel

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/classes/stopchannelcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/interfaces/stopchannelcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/interfaces/stopchannelcommandoutput.html)

</details>
<details>
<summary>
StopInputDevice
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/classes/stopinputdevicecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/interfaces/stopinputdevicecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-medialive/interfaces/stopinputdevicecommandoutput.html)

</details>
<details>
<summary>
Expand Down
43 changes: 43 additions & 0 deletions clients/client-medialive/src/MediaLive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ import {
StartChannelCommandInput,
StartChannelCommandOutput,
} from "./commands/StartChannelCommand";
import {
StartInputDeviceCommand,
StartInputDeviceCommandInput,
StartInputDeviceCommandOutput,
} from "./commands/StartInputDeviceCommand";
import {
StartInputDeviceMaintenanceWindowCommand,
StartInputDeviceMaintenanceWindowCommandInput,
Expand All @@ -217,6 +222,11 @@ import {
StartMultiplexCommandOutput,
} from "./commands/StartMultiplexCommand";
import { StopChannelCommand, StopChannelCommandInput, StopChannelCommandOutput } from "./commands/StopChannelCommand";
import {
StopInputDeviceCommand,
StopInputDeviceCommandInput,
StopInputDeviceCommandOutput,
} from "./commands/StopInputDeviceCommand";
import {
StopMultiplexCommand,
StopMultiplexCommandInput,
Expand Down Expand Up @@ -319,9 +329,11 @@ const commands = {
RebootInputDeviceCommand,
RejectInputDeviceTransferCommand,
StartChannelCommand,
StartInputDeviceCommand,
StartInputDeviceMaintenanceWindowCommand,
StartMultiplexCommand,
StopChannelCommand,
StopInputDeviceCommand,
StopMultiplexCommand,
TransferInputDeviceCommand,
UpdateAccountConfigurationCommand,
Expand Down Expand Up @@ -1047,6 +1059,23 @@ export interface MediaLive {
cb: (err: any, data?: StartChannelCommandOutput) => void
): void;

/**
* @see {@link StartInputDeviceCommand}
*/
startInputDevice(
args: StartInputDeviceCommandInput,
options?: __HttpHandlerOptions
): Promise<StartInputDeviceCommandOutput>;
startInputDevice(
args: StartInputDeviceCommandInput,
cb: (err: any, data?: StartInputDeviceCommandOutput) => void
): void;
startInputDevice(
args: StartInputDeviceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartInputDeviceCommandOutput) => void
): void;

/**
* @see {@link StartInputDeviceMaintenanceWindowCommand}
*/
Expand Down Expand Up @@ -1089,6 +1118,20 @@ export interface MediaLive {
cb: (err: any, data?: StopChannelCommandOutput) => void
): void;

/**
* @see {@link StopInputDeviceCommand}
*/
stopInputDevice(
args: StopInputDeviceCommandInput,
options?: __HttpHandlerOptions
): Promise<StopInputDeviceCommandOutput>;
stopInputDevice(args: StopInputDeviceCommandInput, cb: (err: any, data?: StopInputDeviceCommandOutput) => void): void;
stopInputDevice(
args: StopInputDeviceCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StopInputDeviceCommandOutput) => void
): void;

/**
* @see {@link StopMultiplexCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-medialive/src/MediaLiveClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,14 @@ import {
RejectInputDeviceTransferCommandOutput,
} from "./commands/RejectInputDeviceTransferCommand";
import { StartChannelCommandInput, StartChannelCommandOutput } from "./commands/StartChannelCommand";
import { StartInputDeviceCommandInput, StartInputDeviceCommandOutput } from "./commands/StartInputDeviceCommand";
import {
StartInputDeviceMaintenanceWindowCommandInput,
StartInputDeviceMaintenanceWindowCommandOutput,
} from "./commands/StartInputDeviceMaintenanceWindowCommand";
import { StartMultiplexCommandInput, StartMultiplexCommandOutput } from "./commands/StartMultiplexCommand";
import { StopChannelCommandInput, StopChannelCommandOutput } from "./commands/StopChannelCommand";
import { StopInputDeviceCommandInput, StopInputDeviceCommandOutput } from "./commands/StopInputDeviceCommand";
import { StopMultiplexCommandInput, StopMultiplexCommandOutput } from "./commands/StopMultiplexCommand";
import {
TransferInputDeviceCommandInput,
Expand Down Expand Up @@ -245,9 +247,11 @@ export type ServiceInputTypes =
| RebootInputDeviceCommandInput
| RejectInputDeviceTransferCommandInput
| StartChannelCommandInput
| StartInputDeviceCommandInput
| StartInputDeviceMaintenanceWindowCommandInput
| StartMultiplexCommandInput
| StopChannelCommandInput
| StopInputDeviceCommandInput
| StopMultiplexCommandInput
| TransferInputDeviceCommandInput
| UpdateAccountConfigurationCommandInput
Expand Down Expand Up @@ -312,9 +316,11 @@ export type ServiceOutputTypes =
| RebootInputDeviceCommandOutput
| RejectInputDeviceTransferCommandOutput
| StartChannelCommandOutput
| StartInputDeviceCommandOutput
| StartInputDeviceMaintenanceWindowCommandOutput
| StartMultiplexCommandOutput
| StopChannelCommandOutput
| StopInputDeviceCommandOutput
| StopMultiplexCommandOutput
| TransferInputDeviceCommandOutput
| UpdateAccountConfigurationCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,22 @@ export interface DescribeInputDeviceCommandOutput extends DescribeInputDeviceRes
* // ScanType: "INTERLACED" || "PROGRESSIVE",
* // Width: Number("int"),
* // LatencyMs: Number("int"),
* // Codec: "HEVC" || "AVC",
* // MediaconnectSettings: { // InputDeviceMediaConnectSettings
* // FlowArn: "STRING_VALUE",
* // RoleArn: "STRING_VALUE",
* // SecretArn: "STRING_VALUE",
* // SourceName: "STRING_VALUE",
* // },
* // },
* // Tags: { // Tags
* // "<keys>": "STRING_VALUE",
* // },
* // AvailabilityZone: "STRING_VALUE",
* // MedialiveInputArns: [
* // "STRING_VALUE",
* // ],
* // OutputType: "NONE" || "MEDIALIVE_INPUT" || "MEDIACONNECT_FLOW",
* // };
*
* ```
Expand Down
11 changes: 11 additions & 0 deletions clients/client-medialive/src/commands/ListInputDevicesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,22 @@ export interface ListInputDevicesCommandOutput extends ListInputDevicesResponse,
* // ScanType: "INTERLACED" || "PROGRESSIVE",
* // Width: Number("int"),
* // LatencyMs: Number("int"),
* // Codec: "HEVC" || "AVC",
* // MediaconnectSettings: { // InputDeviceMediaConnectSettings
* // FlowArn: "STRING_VALUE",
* // RoleArn: "STRING_VALUE",
* // SecretArn: "STRING_VALUE",
* // SourceName: "STRING_VALUE",
* // },
* // },
* // Tags: { // Tags
* // "<keys>": "STRING_VALUE",
* // },
* // AvailabilityZone: "STRING_VALUE",
* // MedialiveInputArns: [
* // "STRING_VALUE",
* // ],
* // OutputType: "NONE" || "MEDIALIVE_INPUT" || "MEDIACONNECT_FLOW",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "@smithy/types";

import { MediaLiveClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaLiveClient";
import { ListMultiplexProgramsRequest, ListMultiplexProgramsResponse } from "../models/models_1";
import { ListMultiplexProgramsRequest, ListMultiplexProgramsResponse } from "../models/models_2";
import { de_ListMultiplexProgramsCommand, se_ListMultiplexProgramsCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import {
} from "@smithy/types";

import { MediaLiveClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaLiveClient";
import { ListMultiplexesRequest, ListMultiplexesResponse } from "../models/models_1";
import { ListMultiplexesRequest } from "../models/models_1";
import { ListMultiplexesResponse } from "../models/models_2";
import { de_ListMultiplexesCommand, se_ListMultiplexesCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import {
} from "@smithy/types";

import { MediaLiveClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaLiveClient";
import { ListOfferingsRequest } from "../models/models_1";
import { ListOfferingsResponse } from "../models/models_2";
import { ListOfferingsRequest, ListOfferingsResponse } from "../models/models_2";
import { de_ListOfferingsCommand, se_ListOfferingsCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
164 changes: 164 additions & 0 deletions clients/client-medialive/src/commands/StartInputDeviceCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
import { Command as $Command } from "@smithy/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@smithy/types";

import { MediaLiveClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaLiveClient";
import { StartInputDeviceRequest, StartInputDeviceResponse } from "../models/models_2";
import { de_StartInputDeviceCommand, se_StartInputDeviceCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link StartInputDeviceCommand}.
*/
export interface StartInputDeviceCommandInput extends StartInputDeviceRequest {}
/**
* @public
*
* The output of {@link StartInputDeviceCommand}.
*/
export interface StartInputDeviceCommandOutput extends StartInputDeviceResponse, __MetadataBearer {}

/**
* @public
* Start an input device that is attached to a MediaConnect flow. (There is no need to start a device that is attached to a MediaLive input; MediaLive starts the device when the channel starts.)
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { MediaLiveClient, StartInputDeviceCommand } from "@aws-sdk/client-medialive"; // ES Modules import
* // const { MediaLiveClient, StartInputDeviceCommand } = require("@aws-sdk/client-medialive"); // CommonJS import
* const client = new MediaLiveClient(config);
* const input = { // StartInputDeviceRequest
* InputDeviceId: "STRING_VALUE", // required
* };
* const command = new StartInputDeviceCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param StartInputDeviceCommandInput - {@link StartInputDeviceCommandInput}
* @returns {@link StartInputDeviceCommandOutput}
* @see {@link StartInputDeviceCommandInput} for command's `input` shape.
* @see {@link StartInputDeviceCommandOutput} for command's `response` shape.
* @see {@link MediaLiveClientResolvedConfig | config} for MediaLiveClient's `config` shape.
*
* @throws {@link BadGatewayException} (server fault)
* Placeholder documentation for BadGatewayException
*
* @throws {@link BadRequestException} (client fault)
* Placeholder documentation for BadRequestException
*
* @throws {@link ForbiddenException} (client fault)
* Placeholder documentation for ForbiddenException
*
* @throws {@link GatewayTimeoutException} (server fault)
* Placeholder documentation for GatewayTimeoutException
*
* @throws {@link InternalServerErrorException} (server fault)
* Placeholder documentation for InternalServerErrorException
*
* @throws {@link NotFoundException} (client fault)
* Placeholder documentation for NotFoundException
*
* @throws {@link TooManyRequestsException} (client fault)
* Placeholder documentation for TooManyRequestsException
*
* @throws {@link UnprocessableEntityException} (client fault)
* Placeholder documentation for UnprocessableEntityException
*
* @throws {@link MediaLiveServiceException}
* <p>Base exception class for all service exceptions from MediaLive service.</p>
*
*/
export class StartInputDeviceCommand extends $Command<
StartInputDeviceCommandInput,
StartInputDeviceCommandOutput,
MediaLiveClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

/**
* @public
*/
constructor(readonly input: StartInputDeviceCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: MediaLiveClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<StartInputDeviceCommandInput, StartInputDeviceCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, StartInputDeviceCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "MediaLiveClient";
const commandName = "StartInputDeviceCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

/**
* @internal
*/
private serialize(input: StartInputDeviceCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return se_StartInputDeviceCommand(input, context);
}

/**
* @internal
*/
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<StartInputDeviceCommandOutput> {
return de_StartInputDeviceCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Loading

0 comments on commit 29e9aba

Please sign in to comment.