Skip to content

Commit 92ebebb

Browse files
author
awstools
committed
feat(client-mediaconnect): This release adds the DescribeSourceMetadata API. This API can be used to view the stream information of the flow's source.
1 parent ec0ecf7 commit 92ebebb

File tree

8 files changed

+823
-0
lines changed

8 files changed

+823
-0
lines changed

clients/client-mediaconnect/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,14 @@ DescribeFlow
322322

323323
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconnect/command/DescribeFlowCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconnect/Interface/DescribeFlowCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconnect/Interface/DescribeFlowCommandOutput/)
324324

325+
</details>
326+
<details>
327+
<summary>
328+
DescribeFlowSourceMetadata
329+
</summary>
330+
331+
[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/)
332+
325333
</details>
326334
<details>
327335
<summary>

clients/client-mediaconnect/src/MediaConnect.ts

+23
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ import {
6969
DescribeFlowCommandInput,
7070
DescribeFlowCommandOutput,
7171
} from "./commands/DescribeFlowCommand";
72+
import {
73+
DescribeFlowSourceMetadataCommand,
74+
DescribeFlowSourceMetadataCommandInput,
75+
DescribeFlowSourceMetadataCommandOutput,
76+
} from "./commands/DescribeFlowSourceMetadataCommand";
7277
import {
7378
DescribeGatewayCommand,
7479
DescribeGatewayCommandInput,
@@ -238,6 +243,7 @@ const commands = {
238243
DeregisterGatewayInstanceCommand,
239244
DescribeBridgeCommand,
240245
DescribeFlowCommand,
246+
DescribeFlowSourceMetadataCommand,
241247
DescribeGatewayCommand,
242248
DescribeGatewayInstanceCommand,
243249
DescribeOfferingCommand,
@@ -480,6 +486,23 @@ export interface MediaConnect {
480486
cb: (err: any, data?: DescribeFlowCommandOutput) => void
481487
): void;
482488

489+
/**
490+
* @see {@link DescribeFlowSourceMetadataCommand}
491+
*/
492+
describeFlowSourceMetadata(
493+
args: DescribeFlowSourceMetadataCommandInput,
494+
options?: __HttpHandlerOptions
495+
): Promise<DescribeFlowSourceMetadataCommandOutput>;
496+
describeFlowSourceMetadata(
497+
args: DescribeFlowSourceMetadataCommandInput,
498+
cb: (err: any, data?: DescribeFlowSourceMetadataCommandOutput) => void
499+
): void;
500+
describeFlowSourceMetadata(
501+
args: DescribeFlowSourceMetadataCommandInput,
502+
options: __HttpHandlerOptions,
503+
cb: (err: any, data?: DescribeFlowSourceMetadataCommandOutput) => void
504+
): void;
505+
483506
/**
484507
* @see {@link DescribeGatewayCommand}
485508
*/

clients/client-mediaconnect/src/MediaConnectClient.ts

+6
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ import {
7272
} from "./commands/DeregisterGatewayInstanceCommand";
7373
import { DescribeBridgeCommandInput, DescribeBridgeCommandOutput } from "./commands/DescribeBridgeCommand";
7474
import { DescribeFlowCommandInput, DescribeFlowCommandOutput } from "./commands/DescribeFlowCommand";
75+
import {
76+
DescribeFlowSourceMetadataCommandInput,
77+
DescribeFlowSourceMetadataCommandOutput,
78+
} from "./commands/DescribeFlowSourceMetadataCommand";
7579
import { DescribeGatewayCommandInput, DescribeGatewayCommandOutput } from "./commands/DescribeGatewayCommand";
7680
import {
7781
DescribeGatewayInstanceCommandInput,
@@ -170,6 +174,7 @@ export type ServiceInputTypes =
170174
| DeregisterGatewayInstanceCommandInput
171175
| DescribeBridgeCommandInput
172176
| DescribeFlowCommandInput
177+
| DescribeFlowSourceMetadataCommandInput
173178
| DescribeGatewayCommandInput
174179
| DescribeGatewayInstanceCommandInput
175180
| DescribeOfferingCommandInput
@@ -225,6 +230,7 @@ export type ServiceOutputTypes =
225230
| DeregisterGatewayInstanceCommandOutput
226231
| DescribeBridgeCommandOutput
227232
| DescribeFlowCommandOutput
233+
| DescribeFlowSourceMetadataCommandOutput
228234
| DescribeGatewayCommandOutput
229235
| DescribeGatewayInstanceCommandOutput
230236
| DescribeOfferingCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
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+
}

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

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export * from "./DeleteGatewayCommand";
1414
export * from "./DeregisterGatewayInstanceCommand";
1515
export * from "./DescribeBridgeCommand";
1616
export * from "./DescribeFlowCommand";
17+
export * from "./DescribeFlowSourceMetadataCommand";
1718
export * from "./DescribeGatewayCommand";
1819
export * from "./DescribeGatewayInstanceCommand";
1920
export * from "./DescribeOfferingCommand";

0 commit comments

Comments
 (0)