@aws-sdk/client-sagemaker-metrics 3.303.0 → 3.309.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/commands/BatchPutMetricsCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +15 -15
- package/dist-es/commands/BatchPutMetricsCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +12 -12
- package/dist-types/protocols/Aws_restJson1.d.ts +8 -2
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +2 -2
- package/package.json +29 -29
|
@@ -36,10 +36,10 @@ class BatchPutMetricsCommand extends smithy_client_1.Command {
|
|
|
36
36
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
37
37
|
}
|
|
38
38
|
serialize(input, context) {
|
|
39
|
-
return (0, Aws_restJson1_1.
|
|
39
|
+
return (0, Aws_restJson1_1.se_BatchPutMetricsCommand)(input, context);
|
|
40
40
|
}
|
|
41
41
|
deserialize(output, context) {
|
|
42
|
-
return (0, Aws_restJson1_1.
|
|
42
|
+
return (0, Aws_restJson1_1.de_BatchPutMetricsCommand)(output, context);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
exports.BatchPutMetricsCommand = BatchPutMetricsCommand;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.de_BatchPutMetricsCommand = exports.se_BatchPutMetricsCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const SageMakerMetricsServiceException_1 = require("../models/SageMakerMetricsServiceException");
|
|
7
|
-
const
|
|
7
|
+
const se_BatchPutMetricsCommand = async (input, context) => {
|
|
8
8
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
9
9
|
const headers = {
|
|
10
10
|
"content-type": "application/json",
|
|
@@ -12,7 +12,7 @@ const serializeAws_restJson1BatchPutMetricsCommand = async (input, context) => {
|
|
|
12
12
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchPutMetrics";
|
|
13
13
|
let body;
|
|
14
14
|
body = JSON.stringify({
|
|
15
|
-
...(input.MetricData != null && { MetricData:
|
|
15
|
+
...(input.MetricData != null && { MetricData: se_RawMetricDataList(input.MetricData, context) }),
|
|
16
16
|
...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }),
|
|
17
17
|
});
|
|
18
18
|
return new protocol_http_1.HttpRequest({
|
|
@@ -25,22 +25,22 @@ const serializeAws_restJson1BatchPutMetricsCommand = async (input, context) => {
|
|
|
25
25
|
body,
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
exports.
|
|
29
|
-
const
|
|
28
|
+
exports.se_BatchPutMetricsCommand = se_BatchPutMetricsCommand;
|
|
29
|
+
const de_BatchPutMetricsCommand = async (output, context) => {
|
|
30
30
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31
|
-
return
|
|
31
|
+
return de_BatchPutMetricsCommandError(output, context);
|
|
32
32
|
}
|
|
33
33
|
const contents = map({
|
|
34
34
|
$metadata: deserializeMetadata(output),
|
|
35
35
|
});
|
|
36
36
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
37
37
|
if (data.Errors != null) {
|
|
38
|
-
contents.Errors =
|
|
38
|
+
contents.Errors = de_BatchPutMetricsErrorList(data.Errors, context);
|
|
39
39
|
}
|
|
40
40
|
return contents;
|
|
41
41
|
};
|
|
42
|
-
exports.
|
|
43
|
-
const
|
|
42
|
+
exports.de_BatchPutMetricsCommand = de_BatchPutMetricsCommand;
|
|
43
|
+
const de_BatchPutMetricsCommandError = async (output, context) => {
|
|
44
44
|
const parsedOutput = {
|
|
45
45
|
...output,
|
|
46
46
|
body: await parseErrorBody(output.body, context),
|
|
@@ -55,7 +55,7 @@ const deserializeAws_restJson1BatchPutMetricsCommandError = async (output, conte
|
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
57
|
const map = smithy_client_1.map;
|
|
58
|
-
const
|
|
58
|
+
const se_RawMetricData = (input, context) => {
|
|
59
59
|
return {
|
|
60
60
|
...(input.MetricName != null && { MetricName: input.MetricName }),
|
|
61
61
|
...(input.Step != null && { Step: input.Step }),
|
|
@@ -63,27 +63,27 @@ const serializeAws_restJson1RawMetricData = (input, context) => {
|
|
|
63
63
|
...(input.Value != null && { Value: (0, smithy_client_1.serializeFloat)(input.Value) }),
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
const
|
|
66
|
+
const se_RawMetricDataList = (input, context) => {
|
|
67
67
|
return input
|
|
68
68
|
.filter((e) => e != null)
|
|
69
69
|
.map((entry) => {
|
|
70
|
-
return
|
|
70
|
+
return se_RawMetricData(entry, context);
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
const
|
|
73
|
+
const de_BatchPutMetricsError = (output, context) => {
|
|
74
74
|
return {
|
|
75
75
|
Code: (0, smithy_client_1.expectString)(output.Code),
|
|
76
76
|
MetricIndex: (0, smithy_client_1.expectInt32)(output.MetricIndex),
|
|
77
77
|
};
|
|
78
78
|
};
|
|
79
|
-
const
|
|
79
|
+
const de_BatchPutMetricsErrorList = (output, context) => {
|
|
80
80
|
const retVal = (output || [])
|
|
81
81
|
.filter((e) => e != null)
|
|
82
82
|
.map((entry) => {
|
|
83
83
|
if (entry === null) {
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return de_BatchPutMetricsError(entry, context);
|
|
87
87
|
});
|
|
88
88
|
return retVal;
|
|
89
89
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
2
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
3
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
-
import {
|
|
4
|
+
import { de_BatchPutMetricsCommand, se_BatchPutMetricsCommand } from "../protocols/Aws_restJson1";
|
|
5
5
|
export class BatchPutMetricsCommand extends $Command {
|
|
6
6
|
static getEndpointParameterInstructions() {
|
|
7
7
|
return {
|
|
@@ -33,9 +33,9 @@ export class BatchPutMetricsCommand extends $Command {
|
|
|
33
33
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
34
|
}
|
|
35
35
|
serialize(input, context) {
|
|
36
|
-
return
|
|
36
|
+
return se_BatchPutMetricsCommand(input, context);
|
|
37
37
|
}
|
|
38
38
|
deserialize(output, context) {
|
|
39
|
-
return
|
|
39
|
+
return de_BatchPutMetricsCommand(output, context);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
2
|
import { expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { SageMakerMetricsServiceException as __BaseException } from "../models/SageMakerMetricsServiceException";
|
|
4
|
-
export const
|
|
4
|
+
export const se_BatchPutMetricsCommand = async (input, context) => {
|
|
5
5
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
6
6
|
const headers = {
|
|
7
7
|
"content-type": "application/json",
|
|
@@ -9,7 +9,7 @@ export const serializeAws_restJson1BatchPutMetricsCommand = async (input, contex
|
|
|
9
9
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/BatchPutMetrics";
|
|
10
10
|
let body;
|
|
11
11
|
body = JSON.stringify({
|
|
12
|
-
...(input.MetricData != null && { MetricData:
|
|
12
|
+
...(input.MetricData != null && { MetricData: se_RawMetricDataList(input.MetricData, context) }),
|
|
13
13
|
...(input.TrialComponentName != null && { TrialComponentName: input.TrialComponentName }),
|
|
14
14
|
});
|
|
15
15
|
return new __HttpRequest({
|
|
@@ -22,20 +22,20 @@ export const serializeAws_restJson1BatchPutMetricsCommand = async (input, contex
|
|
|
22
22
|
body,
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
export const
|
|
25
|
+
export const de_BatchPutMetricsCommand = async (output, context) => {
|
|
26
26
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
27
|
-
return
|
|
27
|
+
return de_BatchPutMetricsCommandError(output, context);
|
|
28
28
|
}
|
|
29
29
|
const contents = map({
|
|
30
30
|
$metadata: deserializeMetadata(output),
|
|
31
31
|
});
|
|
32
32
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
33
33
|
if (data.Errors != null) {
|
|
34
|
-
contents.Errors =
|
|
34
|
+
contents.Errors = de_BatchPutMetricsErrorList(data.Errors, context);
|
|
35
35
|
}
|
|
36
36
|
return contents;
|
|
37
37
|
};
|
|
38
|
-
const
|
|
38
|
+
const de_BatchPutMetricsCommandError = async (output, context) => {
|
|
39
39
|
const parsedOutput = {
|
|
40
40
|
...output,
|
|
41
41
|
body: await parseErrorBody(output.body, context),
|
|
@@ -50,7 +50,7 @@ const deserializeAws_restJson1BatchPutMetricsCommandError = async (output, conte
|
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
52
|
const map = __map;
|
|
53
|
-
const
|
|
53
|
+
const se_RawMetricData = (input, context) => {
|
|
54
54
|
return {
|
|
55
55
|
...(input.MetricName != null && { MetricName: input.MetricName }),
|
|
56
56
|
...(input.Step != null && { Step: input.Step }),
|
|
@@ -58,27 +58,27 @@ const serializeAws_restJson1RawMetricData = (input, context) => {
|
|
|
58
58
|
...(input.Value != null && { Value: __serializeFloat(input.Value) }),
|
|
59
59
|
};
|
|
60
60
|
};
|
|
61
|
-
const
|
|
61
|
+
const se_RawMetricDataList = (input, context) => {
|
|
62
62
|
return input
|
|
63
63
|
.filter((e) => e != null)
|
|
64
64
|
.map((entry) => {
|
|
65
|
-
return
|
|
65
|
+
return se_RawMetricData(entry, context);
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
const
|
|
68
|
+
const de_BatchPutMetricsError = (output, context) => {
|
|
69
69
|
return {
|
|
70
70
|
Code: __expectString(output.Code),
|
|
71
71
|
MetricIndex: __expectInt32(output.MetricIndex),
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
-
const
|
|
74
|
+
const de_BatchPutMetricsErrorList = (output, context) => {
|
|
75
75
|
const retVal = (output || [])
|
|
76
76
|
.filter((e) => e != null)
|
|
77
77
|
.map((entry) => {
|
|
78
78
|
if (entry === null) {
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return de_BatchPutMetricsError(entry, context);
|
|
82
82
|
});
|
|
83
83
|
return retVal;
|
|
84
84
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
2
2
|
import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
|
|
3
3
|
import { BatchPutMetricsCommandInput, BatchPutMetricsCommandOutput } from "../commands/BatchPutMetricsCommand";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* serializeAws_restJson1BatchPutMetricsCommand
|
|
6
|
+
*/
|
|
7
|
+
export declare const se_BatchPutMetricsCommand: (input: BatchPutMetricsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
8
|
+
/**
|
|
9
|
+
* deserializeAws_restJson1BatchPutMetricsCommand
|
|
10
|
+
*/
|
|
11
|
+
export declare const de_BatchPutMetricsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchPutMetricsCommandOutput>;
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
BatchPutMetricsCommandInput,
|
|
8
8
|
BatchPutMetricsCommandOutput,
|
|
9
9
|
} from "../commands/BatchPutMetricsCommand";
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const se_BatchPutMetricsCommand: (
|
|
11
11
|
input: BatchPutMetricsCommandInput,
|
|
12
12
|
context: __SerdeContext
|
|
13
13
|
) => Promise<__HttpRequest>;
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const de_BatchPutMetricsCommand: (
|
|
15
15
|
output: __HttpResponse,
|
|
16
16
|
context: __SerdeContext
|
|
17
17
|
) => Promise<BatchPutMetricsCommandOutput>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sagemaker-metrics",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sagemaker Metrics Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.309.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,37 +21,37 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/config-resolver": "3.
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
28
|
-
"@aws-sdk/hash-node": "3.
|
|
29
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
30
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
31
|
-
"@aws-sdk/middleware-endpoint": "3.
|
|
32
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
33
|
-
"@aws-sdk/middleware-logger": "3.
|
|
34
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
35
|
-
"@aws-sdk/middleware-retry": "3.
|
|
36
|
-
"@aws-sdk/middleware-serde": "3.
|
|
37
|
-
"@aws-sdk/middleware-signing": "3.
|
|
38
|
-
"@aws-sdk/middleware-stack": "3.
|
|
39
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
40
|
-
"@aws-sdk/node-config-provider": "3.
|
|
41
|
-
"@aws-sdk/node-http-handler": "3.
|
|
42
|
-
"@aws-sdk/protocol-http": "3.
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
44
|
-
"@aws-sdk/types": "3.
|
|
45
|
-
"@aws-sdk/url-parser": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.309.0",
|
|
25
|
+
"@aws-sdk/config-resolver": "3.306.0",
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.309.0",
|
|
27
|
+
"@aws-sdk/fetch-http-handler": "3.306.0",
|
|
28
|
+
"@aws-sdk/hash-node": "3.306.0",
|
|
29
|
+
"@aws-sdk/invalid-dependency": "3.306.0",
|
|
30
|
+
"@aws-sdk/middleware-content-length": "3.306.0",
|
|
31
|
+
"@aws-sdk/middleware-endpoint": "3.306.0",
|
|
32
|
+
"@aws-sdk/middleware-host-header": "3.306.0",
|
|
33
|
+
"@aws-sdk/middleware-logger": "3.306.0",
|
|
34
|
+
"@aws-sdk/middleware-recursion-detection": "3.306.0",
|
|
35
|
+
"@aws-sdk/middleware-retry": "3.306.0",
|
|
36
|
+
"@aws-sdk/middleware-serde": "3.306.0",
|
|
37
|
+
"@aws-sdk/middleware-signing": "3.306.0",
|
|
38
|
+
"@aws-sdk/middleware-stack": "3.306.0",
|
|
39
|
+
"@aws-sdk/middleware-user-agent": "3.306.0",
|
|
40
|
+
"@aws-sdk/node-config-provider": "3.306.0",
|
|
41
|
+
"@aws-sdk/node-http-handler": "3.306.0",
|
|
42
|
+
"@aws-sdk/protocol-http": "3.306.0",
|
|
43
|
+
"@aws-sdk/smithy-client": "3.309.0",
|
|
44
|
+
"@aws-sdk/types": "3.306.0",
|
|
45
|
+
"@aws-sdk/url-parser": "3.306.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.303.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.303.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.303.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
51
|
-
"@aws-sdk/util-endpoints": "3.
|
|
52
|
-
"@aws-sdk/util-retry": "3.
|
|
53
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
54
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.309.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.309.0",
|
|
51
|
+
"@aws-sdk/util-endpoints": "3.306.0",
|
|
52
|
+
"@aws-sdk/util-retry": "3.306.0",
|
|
53
|
+
"@aws-sdk/util-user-agent-browser": "3.306.0",
|
|
54
|
+
"@aws-sdk/util-user-agent-node": "3.306.0",
|
|
55
55
|
"@aws-sdk/util-utf8": "3.303.0",
|
|
56
56
|
"tslib": "^2.5.0"
|
|
57
57
|
},
|