Skip to content

Commit 0eb9cee

Browse files
author
awstools
committed
feat(client-mediaconvert): The AWS MediaConvert Probe API allows you to analyze media files and retrieve detailed metadata about their content, format, and structure.
1 parent 1b88608 commit 0eb9cee

File tree

8 files changed

+1883
-19
lines changed

8 files changed

+1883
-19
lines changed

clients/client-mediaconvert/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,14 @@ ListVersions
386386

387387
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconvert/command/ListVersionsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconvert/Interface/ListVersionsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconvert/Interface/ListVersionsCommandOutput/)
388388

389+
</details>
390+
<details>
391+
<summary>
392+
Probe
393+
</summary>
394+
395+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/mediaconvert/command/ProbeCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconvert/Interface/ProbeCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-mediaconvert/Interface/ProbeCommandOutput/)
396+
389397
</details>
390398
<details>
391399
<summary>

clients/client-mediaconvert/src/MediaConvert.ts

+14
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ import {
7373
ListVersionsCommandInput,
7474
ListVersionsCommandOutput,
7575
} from "./commands/ListVersionsCommand";
76+
import { ProbeCommand, ProbeCommandInput, ProbeCommandOutput } from "./commands/ProbeCommand";
7677
import { PutPolicyCommand, PutPolicyCommandInput, PutPolicyCommandOutput } from "./commands/PutPolicyCommand";
7778
import { SearchJobsCommand, SearchJobsCommandInput, SearchJobsCommandOutput } from "./commands/SearchJobsCommand";
7879
import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -118,6 +119,7 @@ const commands = {
118119
ListQueuesCommand,
119120
ListTagsForResourceCommand,
120121
ListVersionsCommand,
122+
ProbeCommand,
121123
PutPolicyCommand,
122124
SearchJobsCommand,
123125
TagResourceCommand,
@@ -434,6 +436,18 @@ export interface MediaConvert {
434436
cb: (err: any, data?: ListVersionsCommandOutput) => void
435437
): void;
436438

439+
/**
440+
* @see {@link ProbeCommand}
441+
*/
442+
probe(): Promise<ProbeCommandOutput>;
443+
probe(args: ProbeCommandInput, options?: __HttpHandlerOptions): Promise<ProbeCommandOutput>;
444+
probe(args: ProbeCommandInput, cb: (err: any, data?: ProbeCommandOutput) => void): void;
445+
probe(
446+
args: ProbeCommandInput,
447+
options: __HttpHandlerOptions,
448+
cb: (err: any, data?: ProbeCommandOutput) => void
449+
): void;
450+
437451
/**
438452
* @see {@link PutPolicyCommand}
439453
*/

clients/client-mediaconvert/src/MediaConvertClient.ts

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import {
8585
ListTagsForResourceCommandOutput,
8686
} from "./commands/ListTagsForResourceCommand";
8787
import { ListVersionsCommandInput, ListVersionsCommandOutput } from "./commands/ListVersionsCommand";
88+
import { ProbeCommandInput, ProbeCommandOutput } from "./commands/ProbeCommand";
8889
import { PutPolicyCommandInput, PutPolicyCommandOutput } from "./commands/PutPolicyCommand";
8990
import { SearchJobsCommandInput, SearchJobsCommandOutput } from "./commands/SearchJobsCommand";
9091
import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
@@ -130,6 +131,7 @@ export type ServiceInputTypes =
130131
| ListQueuesCommandInput
131132
| ListTagsForResourceCommandInput
132133
| ListVersionsCommandInput
134+
| ProbeCommandInput
133135
| PutPolicyCommandInput
134136
| SearchJobsCommandInput
135137
| TagResourceCommandInput
@@ -165,6 +167,7 @@ export type ServiceOutputTypes =
165167
| ListQueuesCommandOutput
166168
| ListTagsForResourceCommandOutput
167169
| ListVersionsCommandOutput
170+
| ProbeCommandOutput
168171
| PutPolicyCommandOutput
169172
| SearchJobsCommandOutput
170173
| TagResourceCommandOutput
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
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 { MediaConvertClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../MediaConvertClient";
9+
import { ProbeRequest, ProbeResponse } from "../models/models_2";
10+
import { de_ProbeCommand, se_ProbeCommand } from "../protocols/Aws_restJson1";
11+
12+
/**
13+
* @public
14+
*/
15+
export type { __MetadataBearer };
16+
export { $Command };
17+
/**
18+
* @public
19+
*
20+
* The input for {@link ProbeCommand}.
21+
*/
22+
export interface ProbeCommandInput extends ProbeRequest {}
23+
/**
24+
* @public
25+
*
26+
* The output of {@link ProbeCommand}.
27+
*/
28+
export interface ProbeCommandOutput extends ProbeResponse, __MetadataBearer {}
29+
30+
/**
31+
* The Probe operation analyzes the provided media file and returns comprehensive metadata about its container format, tracks, and any encountered errors.
32+
* @example
33+
* Use a bare-bones client and the command you need to make an API call.
34+
* ```javascript
35+
* import { MediaConvertClient, ProbeCommand } from "@aws-sdk/client-mediaconvert"; // ES Modules import
36+
* // const { MediaConvertClient, ProbeCommand } = require("@aws-sdk/client-mediaconvert"); // CommonJS import
37+
* const client = new MediaConvertClient(config);
38+
* const input = { // ProbeRequest
39+
* InputFiles: [ // __listOfProbeInputFile
40+
* { // ProbeInputFile
41+
* FileUrl: "STRING_VALUE",
42+
* },
43+
* ],
44+
* };
45+
* const command = new ProbeCommand(input);
46+
* const response = await client.send(command);
47+
* // { // ProbeResponse
48+
* // ProbeResults: [ // __listOfProbeResult
49+
* // { // ProbeResult
50+
* // Container: { // Container
51+
* // Duration: Number("double"),
52+
* // Format: "mp4" || "quicktime" || "matroska" || "webm",
53+
* // Tracks: [ // __listOfTrack
54+
* // { // Track
55+
* // AudioProperties: { // AudioProperties
56+
* // BitDepth: Number("int"),
57+
* // BitRate: Number("int"),
58+
* // Channels: Number("int"),
59+
* // FrameRate: { // FrameRate
60+
* // Denominator: Number("int"),
61+
* // Numerator: Number("int"),
62+
* // },
63+
* // LanguageCode: "STRING_VALUE",
64+
* // SampleRate: Number("int"),
65+
* // },
66+
* // Codec: "UNKNOWN" || "AAC" || "AC3" || "EAC3" || "FLAC" || "MP3" || "OPUS" || "PCM" || "VORBIS" || "AV1" || "AVC" || "HEVC" || "MJPEG" || "MP4V" || "MPEG2" || "PRORES" || "THEORA" || "VP8" || "VP9" || "C608" || "C708" || "WEBVTT",
67+
* // DataProperties: { // DataProperties
68+
* // LanguageCode: "STRING_VALUE",
69+
* // },
70+
* // Duration: Number("double"),
71+
* // Index: Number("int"),
72+
* // TrackType: "video" || "audio" || "data",
73+
* // VideoProperties: { // VideoProperties
74+
* // BitDepth: Number("int"),
75+
* // BitRate: Number("int"),
76+
* // ColorPrimaries: "ITU_709" || "UNSPECIFIED" || "RESERVED" || "ITU_470M" || "ITU_470BG" || "SMPTE_170M" || "SMPTE_240M" || "GENERIC_FILM" || "ITU_2020" || "SMPTE_428_1" || "SMPTE_431_2" || "SMPTE_EG_432_1" || "IPT" || "SMPTE_2067XYZ" || "EBU_3213_E" || "LAST",
77+
* // FrameRate: {
78+
* // Denominator: Number("int"),
79+
* // Numerator: Number("int"),
80+
* // },
81+
* // Height: Number("int"),
82+
* // MatrixCoefficients: "RGB" || "ITU_709" || "UNSPECIFIED" || "RESERVED" || "FCC" || "ITU_470BG" || "SMPTE_170M" || "SMPTE_240M" || "YCgCo" || "ITU_2020_NCL" || "ITU_2020_CL" || "SMPTE_2085" || "CD_NCL" || "CD_CL" || "ITU_2100ICtCp" || "IPT" || "EBU3213" || "LAST",
83+
* // TransferCharacteristics: "ITU_709" || "UNSPECIFIED" || "RESERVED" || "ITU_470M" || "ITU_470BG" || "SMPTE_170M" || "SMPTE_240M" || "LINEAR" || "LOG10_2" || "LOC10_2_5" || "IEC_61966_2_4" || "ITU_1361" || "IEC_61966_2_1" || "ITU_2020_10bit" || "ITU_2020_12bit" || "SMPTE_2084" || "SMPTE_428_1" || "ARIB_B67" || "LAST",
84+
* // Width: Number("int"),
85+
* // },
86+
* // },
87+
* // ],
88+
* // },
89+
* // Metadata: { // Metadata
90+
* // ETag: "STRING_VALUE",
91+
* // FileSize: Number("long"),
92+
* // LastModified: new Date("TIMESTAMP"),
93+
* // MimeType: "STRING_VALUE",
94+
* // },
95+
* // TrackMappings: [ // __listOfTrackMapping
96+
* // { // TrackMapping
97+
* // AudioTrackIndexes: [ // __listOf__integer
98+
* // Number("int"),
99+
* // ],
100+
* // DataTrackIndexes: [
101+
* // Number("int"),
102+
* // ],
103+
* // VideoTrackIndexes: [
104+
* // Number("int"),
105+
* // ],
106+
* // },
107+
* // ],
108+
* // },
109+
* // ],
110+
* // };
111+
*
112+
* ```
113+
*
114+
* @param ProbeCommandInput - {@link ProbeCommandInput}
115+
* @returns {@link ProbeCommandOutput}
116+
* @see {@link ProbeCommandInput} for command's `input` shape.
117+
* @see {@link ProbeCommandOutput} for command's `response` shape.
118+
* @see {@link MediaConvertClientResolvedConfig | config} for MediaConvertClient's `config` shape.
119+
*
120+
* @throws {@link BadRequestException} (client fault)
121+
* The service can't process your request because of a problem in the request. Please check your request form and syntax.
122+
*
123+
* @throws {@link ConflictException} (client fault)
124+
* The service couldn't complete your request because there is a conflict with the current state of the resource.
125+
*
126+
* @throws {@link ForbiddenException} (client fault)
127+
* You don't have permissions for this action with the credentials you sent.
128+
*
129+
* @throws {@link InternalServerErrorException} (server fault)
130+
* The service encountered an unexpected condition and can't fulfill your request.
131+
*
132+
* @throws {@link NotFoundException} (client fault)
133+
* The resource you requested doesn't exist.
134+
*
135+
* @throws {@link TooManyRequestsException} (client fault)
136+
* Too many requests have been sent in too short of a time. The service limits the rate at which it will accept requests.
137+
*
138+
* @throws {@link MediaConvertServiceException}
139+
* <p>Base exception class for all service exceptions from MediaConvert service.</p>
140+
*
141+
* @public
142+
*/
143+
export class ProbeCommand extends $Command
144+
.classBuilder<
145+
ProbeCommandInput,
146+
ProbeCommandOutput,
147+
MediaConvertClientResolvedConfig,
148+
ServiceInputTypes,
149+
ServiceOutputTypes
150+
>()
151+
.ep(commonParams)
152+
.m(function (this: any, Command: any, cs: any, config: MediaConvertClientResolvedConfig, o: any) {
153+
return [
154+
getSerdePlugin(config, this.serialize, this.deserialize),
155+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
156+
];
157+
})
158+
.s("MediaConvert", "Probe", {})
159+
.n("MediaConvertClient", "ProbeCommand")
160+
.f(void 0, void 0)
161+
.ser(se_ProbeCommand)
162+
.de(de_ProbeCommand)
163+
.build() {
164+
/** @internal type navigation helper, not in runtime. */
165+
protected declare static __types: {
166+
api: {
167+
input: ProbeRequest;
168+
output: ProbeResponse;
169+
};
170+
sdk: {
171+
input: ProbeCommandInput;
172+
output: ProbeCommandOutput;
173+
};
174+
};
175+
}

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

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export * from "./ListPresetsCommand";
2222
export * from "./ListQueuesCommand";
2323
export * from "./ListTagsForResourceCommand";
2424
export * from "./ListVersionsCommand";
25+
export * from "./ProbeCommand";
2526
export * from "./PutPolicyCommand";
2627
export * from "./SearchJobsCommand";
2728
export * from "./TagResourceCommand";

0 commit comments

Comments
 (0)