-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-sagemaker-metrics): This release introduces support for t…
…he SageMaker Metrics BatchGetMetrics API.
- Loading branch information
awstools
committed
Sep 20, 2024
1 parent
a39132c
commit 5b6c0db
Showing
9 changed files
with
733 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 113 additions & 0 deletions
113
clients/client-sagemaker-metrics/src/commands/BatchGetMetricsCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
// smithy-typescript generated code | ||
import { getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { getSerdePlugin } from "@smithy/middleware-serde"; | ||
import { Command as $Command } from "@smithy/smithy-client"; | ||
import { MetadataBearer as __MetadataBearer } from "@smithy/types"; | ||
|
||
import { commonParams } from "../endpoint/EndpointParameters"; | ||
import { BatchGetMetricsRequest, BatchGetMetricsResponse } from "../models/models_0"; | ||
import { de_BatchGetMetricsCommand, se_BatchGetMetricsCommand } from "../protocols/Aws_restJson1"; | ||
import { SageMakerMetricsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerMetricsClient"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link BatchGetMetricsCommand}. | ||
*/ | ||
export interface BatchGetMetricsCommandInput extends BatchGetMetricsRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link BatchGetMetricsCommand}. | ||
*/ | ||
export interface BatchGetMetricsCommandOutput extends BatchGetMetricsResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Used to retrieve training metrics from SageMaker.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { SageMakerMetricsClient, BatchGetMetricsCommand } from "@aws-sdk/client-sagemaker-metrics"; // ES Modules import | ||
* // const { SageMakerMetricsClient, BatchGetMetricsCommand } = require("@aws-sdk/client-sagemaker-metrics"); // CommonJS import | ||
* const client = new SageMakerMetricsClient(config); | ||
* const input = { // BatchGetMetricsRequest | ||
* MetricQueries: [ // MetricQueryList // required | ||
* { // MetricQuery | ||
* MetricName: "STRING_VALUE", // required | ||
* ResourceArn: "STRING_VALUE", // required | ||
* MetricStat: "Min" || "Max" || "Avg" || "Count" || "StdDev" || "Last", // required | ||
* Period: "OneMinute" || "FiveMinute" || "OneHour" || "IterationNumber", // required | ||
* XAxisType: "IterationNumber" || "Timestamp", // required | ||
* Start: Number("long"), | ||
* End: Number("long"), | ||
* }, | ||
* ], | ||
* }; | ||
* const command = new BatchGetMetricsCommand(input); | ||
* const response = await client.send(command); | ||
* // { // BatchGetMetricsResponse | ||
* // MetricQueryResults: [ // MetricQueryResultList | ||
* // { // MetricQueryResult | ||
* // Status: "Complete" || "Truncated" || "InternalError" || "ValidationError", // required | ||
* // Message: "STRING_VALUE", | ||
* // XAxisValues: [ // XAxisValues // required | ||
* // Number("long"), | ||
* // ], | ||
* // MetricValues: [ // MetricValues // required | ||
* // Number("double"), | ||
* // ], | ||
* // }, | ||
* // ], | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param BatchGetMetricsCommandInput - {@link BatchGetMetricsCommandInput} | ||
* @returns {@link BatchGetMetricsCommandOutput} | ||
* @see {@link BatchGetMetricsCommandInput} for command's `input` shape. | ||
* @see {@link BatchGetMetricsCommandOutput} for command's `response` shape. | ||
* @see {@link SageMakerMetricsClientResolvedConfig | config} for SageMakerMetricsClient's `config` shape. | ||
* | ||
* @throws {@link SageMakerMetricsServiceException} | ||
* <p>Base exception class for all service exceptions from SageMakerMetrics service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class BatchGetMetricsCommand extends $Command | ||
.classBuilder< | ||
BatchGetMetricsCommandInput, | ||
BatchGetMetricsCommandOutput, | ||
SageMakerMetricsClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep(commonParams) | ||
.m(function (this: any, Command: any, cs: any, config: SageMakerMetricsClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("SageMakerMetricsService", "BatchGetMetrics", {}) | ||
.n("SageMakerMetricsClient", "BatchGetMetricsCommand") | ||
.f(void 0, void 0) | ||
.ser(se_BatchGetMetricsCommand) | ||
.de(de_BatchGetMetricsCommand) | ||
.build() { | ||
/** @internal type navigation helper, not in runtime. */ | ||
protected declare static __types: { | ||
api: { | ||
input: BatchGetMetricsRequest; | ||
output: BatchGetMetricsResponse; | ||
}; | ||
sdk: { | ||
input: BatchGetMetricsCommandInput; | ||
output: BatchGetMetricsCommandOutput; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
// smithy-typescript generated code | ||
export * from "./BatchGetMetricsCommand"; | ||
export * from "./BatchPutMetricsCommand"; |
Oops, something went wrong.