|
| 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 { BatchGetMetricsRequest, BatchGetMetricsResponse } from "../models/models_0"; |
| 9 | +import { de_BatchGetMetricsCommand, se_BatchGetMetricsCommand } from "../protocols/Aws_restJson1"; |
| 10 | +import { SageMakerMetricsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerMetricsClient"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export type { __MetadataBearer }; |
| 16 | +export { $Command }; |
| 17 | +/** |
| 18 | + * @public |
| 19 | + * |
| 20 | + * The input for {@link BatchGetMetricsCommand}. |
| 21 | + */ |
| 22 | +export interface BatchGetMetricsCommandInput extends BatchGetMetricsRequest {} |
| 23 | +/** |
| 24 | + * @public |
| 25 | + * |
| 26 | + * The output of {@link BatchGetMetricsCommand}. |
| 27 | + */ |
| 28 | +export interface BatchGetMetricsCommandOutput extends BatchGetMetricsResponse, __MetadataBearer {} |
| 29 | + |
| 30 | +/** |
| 31 | + * <p>Used to retrieve training metrics from SageMaker.</p> |
| 32 | + * @example |
| 33 | + * Use a bare-bones client and the command you need to make an API call. |
| 34 | + * ```javascript |
| 35 | + * import { SageMakerMetricsClient, BatchGetMetricsCommand } from "@aws-sdk/client-sagemaker-metrics"; // ES Modules import |
| 36 | + * // const { SageMakerMetricsClient, BatchGetMetricsCommand } = require("@aws-sdk/client-sagemaker-metrics"); // CommonJS import |
| 37 | + * const client = new SageMakerMetricsClient(config); |
| 38 | + * const input = { // BatchGetMetricsRequest |
| 39 | + * MetricQueries: [ // MetricQueryList // required |
| 40 | + * { // MetricQuery |
| 41 | + * MetricName: "STRING_VALUE", // required |
| 42 | + * ResourceArn: "STRING_VALUE", // required |
| 43 | + * MetricStat: "Min" || "Max" || "Avg" || "Count" || "StdDev" || "Last", // required |
| 44 | + * Period: "OneMinute" || "FiveMinute" || "OneHour" || "IterationNumber", // required |
| 45 | + * XAxisType: "IterationNumber" || "Timestamp", // required |
| 46 | + * Start: Number("long"), |
| 47 | + * End: Number("long"), |
| 48 | + * }, |
| 49 | + * ], |
| 50 | + * }; |
| 51 | + * const command = new BatchGetMetricsCommand(input); |
| 52 | + * const response = await client.send(command); |
| 53 | + * // { // BatchGetMetricsResponse |
| 54 | + * // MetricQueryResults: [ // MetricQueryResultList |
| 55 | + * // { // MetricQueryResult |
| 56 | + * // Status: "Complete" || "Truncated" || "InternalError" || "ValidationError", // required |
| 57 | + * // Message: "STRING_VALUE", |
| 58 | + * // XAxisValues: [ // XAxisValues // required |
| 59 | + * // Number("long"), |
| 60 | + * // ], |
| 61 | + * // MetricValues: [ // MetricValues // required |
| 62 | + * // Number("double"), |
| 63 | + * // ], |
| 64 | + * // }, |
| 65 | + * // ], |
| 66 | + * // }; |
| 67 | + * |
| 68 | + * ``` |
| 69 | + * |
| 70 | + * @param BatchGetMetricsCommandInput - {@link BatchGetMetricsCommandInput} |
| 71 | + * @returns {@link BatchGetMetricsCommandOutput} |
| 72 | + * @see {@link BatchGetMetricsCommandInput} for command's `input` shape. |
| 73 | + * @see {@link BatchGetMetricsCommandOutput} for command's `response` shape. |
| 74 | + * @see {@link SageMakerMetricsClientResolvedConfig | config} for SageMakerMetricsClient's `config` shape. |
| 75 | + * |
| 76 | + * @throws {@link SageMakerMetricsServiceException} |
| 77 | + * <p>Base exception class for all service exceptions from SageMakerMetrics service.</p> |
| 78 | + * |
| 79 | + * @public |
| 80 | + */ |
| 81 | +export class BatchGetMetricsCommand extends $Command |
| 82 | + .classBuilder< |
| 83 | + BatchGetMetricsCommandInput, |
| 84 | + BatchGetMetricsCommandOutput, |
| 85 | + SageMakerMetricsClientResolvedConfig, |
| 86 | + ServiceInputTypes, |
| 87 | + ServiceOutputTypes |
| 88 | + >() |
| 89 | + .ep(commonParams) |
| 90 | + .m(function (this: any, Command: any, cs: any, config: SageMakerMetricsClientResolvedConfig, o: any) { |
| 91 | + return [ |
| 92 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 93 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 94 | + ]; |
| 95 | + }) |
| 96 | + .s("SageMakerMetricsService", "BatchGetMetrics", {}) |
| 97 | + .n("SageMakerMetricsClient", "BatchGetMetricsCommand") |
| 98 | + .f(void 0, void 0) |
| 99 | + .ser(se_BatchGetMetricsCommand) |
| 100 | + .de(de_BatchGetMetricsCommand) |
| 101 | + .build() { |
| 102 | + /** @internal type navigation helper, not in runtime. */ |
| 103 | + protected declare static __types: { |
| 104 | + api: { |
| 105 | + input: BatchGetMetricsRequest; |
| 106 | + output: BatchGetMetricsResponse; |
| 107 | + }; |
| 108 | + sdk: { |
| 109 | + input: BatchGetMetricsCommandInput; |
| 110 | + output: BatchGetMetricsCommandOutput; |
| 111 | + }; |
| 112 | + }; |
| 113 | +} |
0 commit comments