|
| 1 | +// smithy-typescript generated code |
| 2 | +import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; |
| 5 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 6 | +import { |
| 7 | + FinalizeHandlerArguments, |
| 8 | + Handler, |
| 9 | + HandlerExecutionContext, |
| 10 | + HttpHandlerOptions as __HttpHandlerOptions, |
| 11 | + MetadataBearer as __MetadataBearer, |
| 12 | + MiddlewareStack, |
| 13 | + SerdeContext as __SerdeContext, |
| 14 | + SMITHY_CONTEXT_KEY, |
| 15 | +} from "@smithy/types"; |
| 16 | + |
| 17 | +import { MediaConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaConnectClient"; |
| 18 | +import { DescribeFlowSourceMetadataRequest, DescribeFlowSourceMetadataResponse } from "../models/models_0"; |
| 19 | +import { de_DescribeFlowSourceMetadataCommand, se_DescribeFlowSourceMetadataCommand } from "../protocols/Aws_restJson1"; |
| 20 | + |
| 21 | +/** |
| 22 | + * @public |
| 23 | + */ |
| 24 | +export { __MetadataBearer, $Command }; |
| 25 | +/** |
| 26 | + * @public |
| 27 | + * |
| 28 | + * The input for {@link DescribeFlowSourceMetadataCommand}. |
| 29 | + */ |
| 30 | +export interface DescribeFlowSourceMetadataCommandInput extends DescribeFlowSourceMetadataRequest {} |
| 31 | +/** |
| 32 | + * @public |
| 33 | + * |
| 34 | + * The output of {@link DescribeFlowSourceMetadataCommand}. |
| 35 | + */ |
| 36 | +export interface DescribeFlowSourceMetadataCommandOutput extends DescribeFlowSourceMetadataResponse, __MetadataBearer {} |
| 37 | + |
| 38 | +/** |
| 39 | + * @public |
| 40 | + * Displays details of the flow's source stream. The response contains information about the contents of the stream and its programs. |
| 41 | + * @example |
| 42 | + * Use a bare-bones client and the command you need to make an API call. |
| 43 | + * ```javascript |
| 44 | + * import { MediaConnectClient, DescribeFlowSourceMetadataCommand } from "@aws-sdk/client-mediaconnect"; // ES Modules import |
| 45 | + * // const { MediaConnectClient, DescribeFlowSourceMetadataCommand } = require("@aws-sdk/client-mediaconnect"); // CommonJS import |
| 46 | + * const client = new MediaConnectClient(config); |
| 47 | + * const input = { // DescribeFlowSourceMetadataRequest |
| 48 | + * FlowArn: "STRING_VALUE", // required |
| 49 | + * }; |
| 50 | + * const command = new DescribeFlowSourceMetadataCommand(input); |
| 51 | + * const response = await client.send(command); |
| 52 | + * // { // DescribeFlowSourceMetadataResponse |
| 53 | + * // FlowArn: "STRING_VALUE", |
| 54 | + * // Messages: [ // __listOfMessageDetail |
| 55 | + * // { // MessageDetail |
| 56 | + * // Code: "STRING_VALUE", // required |
| 57 | + * // Message: "STRING_VALUE", // required |
| 58 | + * // ResourceName: "STRING_VALUE", |
| 59 | + * // }, |
| 60 | + * // ], |
| 61 | + * // Timestamp: new Date("TIMESTAMP"), |
| 62 | + * // TransportMediaInfo: { // TransportMediaInfo |
| 63 | + * // Programs: [ // __listOfTransportStreamProgram // required |
| 64 | + * // { // TransportStreamProgram |
| 65 | + * // PcrPid: Number("int"), // required |
| 66 | + * // ProgramName: "STRING_VALUE", |
| 67 | + * // ProgramNumber: Number("int"), // required |
| 68 | + * // ProgramPid: Number("int"), // required |
| 69 | + * // Streams: [ // __listOfTransportStream // required |
| 70 | + * // { // TransportStream |
| 71 | + * // Channels: Number("int"), |
| 72 | + * // Codec: "STRING_VALUE", |
| 73 | + * // FrameRate: "STRING_VALUE", |
| 74 | + * // FrameResolution: { // FrameResolution |
| 75 | + * // FrameHeight: Number("int"), // required |
| 76 | + * // FrameWidth: Number("int"), // required |
| 77 | + * // }, |
| 78 | + * // Pid: Number("int"), // required |
| 79 | + * // SampleRate: Number("int"), |
| 80 | + * // SampleSize: Number("int"), |
| 81 | + * // StreamType: "STRING_VALUE", // required |
| 82 | + * // }, |
| 83 | + * // ], |
| 84 | + * // }, |
| 85 | + * // ], |
| 86 | + * // }, |
| 87 | + * // }; |
| 88 | + * |
| 89 | + * ``` |
| 90 | + * |
| 91 | + * @param DescribeFlowSourceMetadataCommandInput - {@link DescribeFlowSourceMetadataCommandInput} |
| 92 | + * @returns {@link DescribeFlowSourceMetadataCommandOutput} |
| 93 | + * @see {@link DescribeFlowSourceMetadataCommandInput} for command's `input` shape. |
| 94 | + * @see {@link DescribeFlowSourceMetadataCommandOutput} for command's `response` shape. |
| 95 | + * @see {@link MediaConnectClientResolvedConfig | config} for MediaConnectClient's `config` shape. |
| 96 | + * |
| 97 | + * @throws {@link BadRequestException} (client fault) |
| 98 | + * Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. |
| 99 | + * |
| 100 | + * @throws {@link ForbiddenException} (client fault) |
| 101 | + * Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. |
| 102 | + * |
| 103 | + * @throws {@link InternalServerErrorException} (server fault) |
| 104 | + * Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. |
| 105 | + * |
| 106 | + * @throws {@link NotFoundException} (client fault) |
| 107 | + * Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. |
| 108 | + * |
| 109 | + * @throws {@link ServiceUnavailableException} (server fault) |
| 110 | + * Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. |
| 111 | + * |
| 112 | + * @throws {@link TooManyRequestsException} (client fault) |
| 113 | + * Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception. |
| 114 | + * |
| 115 | + * @throws {@link MediaConnectServiceException} |
| 116 | + * <p>Base exception class for all service exceptions from MediaConnect service.</p> |
| 117 | + * |
| 118 | + */ |
| 119 | +export class DescribeFlowSourceMetadataCommand extends $Command< |
| 120 | + DescribeFlowSourceMetadataCommandInput, |
| 121 | + DescribeFlowSourceMetadataCommandOutput, |
| 122 | + MediaConnectClientResolvedConfig |
| 123 | +> { |
| 124 | + public static getEndpointParameterInstructions(): EndpointParameterInstructions { |
| 125 | + return { |
| 126 | + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, |
| 127 | + Endpoint: { type: "builtInParams", name: "endpoint" }, |
| 128 | + Region: { type: "builtInParams", name: "region" }, |
| 129 | + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, |
| 130 | + }; |
| 131 | + } |
| 132 | + |
| 133 | + /** |
| 134 | + * @public |
| 135 | + */ |
| 136 | + constructor(readonly input: DescribeFlowSourceMetadataCommandInput) { |
| 137 | + super(); |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * @internal |
| 142 | + */ |
| 143 | + resolveMiddleware( |
| 144 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 145 | + configuration: MediaConnectClientResolvedConfig, |
| 146 | + options?: __HttpHandlerOptions |
| 147 | + ): Handler<DescribeFlowSourceMetadataCommandInput, DescribeFlowSourceMetadataCommandOutput> { |
| 148 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 149 | + this.middlewareStack.use( |
| 150 | + getEndpointPlugin(configuration, DescribeFlowSourceMetadataCommand.getEndpointParameterInstructions()) |
| 151 | + ); |
| 152 | + |
| 153 | + const stack = clientStack.concat(this.middlewareStack); |
| 154 | + |
| 155 | + const { logger } = configuration; |
| 156 | + const clientName = "MediaConnectClient"; |
| 157 | + const commandName = "DescribeFlowSourceMetadataCommand"; |
| 158 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 159 | + logger, |
| 160 | + clientName, |
| 161 | + commandName, |
| 162 | + inputFilterSensitiveLog: (_: any) => _, |
| 163 | + outputFilterSensitiveLog: (_: any) => _, |
| 164 | + [SMITHY_CONTEXT_KEY]: { |
| 165 | + service: "MediaConnect", |
| 166 | + operation: "DescribeFlowSourceMetadata", |
| 167 | + }, |
| 168 | + }; |
| 169 | + const { requestHandler } = configuration; |
| 170 | + return stack.resolve( |
| 171 | + (request: FinalizeHandlerArguments<any>) => |
| 172 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 173 | + handlerExecutionContext |
| 174 | + ); |
| 175 | + } |
| 176 | + |
| 177 | + /** |
| 178 | + * @internal |
| 179 | + */ |
| 180 | + private serialize(input: DescribeFlowSourceMetadataCommandInput, context: __SerdeContext): Promise<__HttpRequest> { |
| 181 | + return se_DescribeFlowSourceMetadataCommand(input, context); |
| 182 | + } |
| 183 | + |
| 184 | + /** |
| 185 | + * @internal |
| 186 | + */ |
| 187 | + private deserialize( |
| 188 | + output: __HttpResponse, |
| 189 | + context: __SerdeContext |
| 190 | + ): Promise<DescribeFlowSourceMetadataCommandOutput> { |
| 191 | + return de_DescribeFlowSourceMetadataCommand(output, context); |
| 192 | + } |
| 193 | +} |
0 commit comments