|
| 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 | +} |
0 commit comments