@aws-sdk/client-sagemaker-metrics 3.928.0 → 3.929.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/index.js CHANGED
@@ -6,6 +6,7 @@ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detect
6
6
  var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
7
  var configResolver = require('@smithy/config-resolver');
8
8
  var core = require('@smithy/core');
9
+ var schema = require('@smithy/core/schema');
9
10
  var middlewareContentLength = require('@smithy/middleware-content-length');
10
11
  var middlewareEndpoint = require('@smithy/middleware-endpoint');
11
12
  var middlewareRetry = require('@smithy/middleware-retry');
@@ -14,8 +15,6 @@ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
14
15
  var runtimeConfig = require('./runtimeConfig');
15
16
  var regionConfigResolver = require('@aws-sdk/region-config-resolver');
16
17
  var protocolHttp = require('@smithy/protocol-http');
17
- var middlewareSerde = require('@smithy/middleware-serde');
18
- var core$1 = require('@aws-sdk/core');
19
18
 
20
19
  const resolveClientEndpointParameters = (options) => {
21
20
  return Object.assign(options, {
@@ -91,6 +90,7 @@ class SageMakerMetricsClient extends smithyClient.Client {
91
90
  const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
92
91
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
93
92
  this.config = _config_8;
93
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
94
94
  this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
95
95
  this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
96
96
  this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
@@ -110,142 +110,109 @@ class SageMakerMetricsClient extends smithyClient.Client {
110
110
  }
111
111
  }
112
112
 
113
- class SageMakerMetricsServiceException extends smithyClient.ServiceException {
113
+ let SageMakerMetricsServiceException$1 = class SageMakerMetricsServiceException extends smithyClient.ServiceException {
114
114
  constructor(options) {
115
115
  super(options);
116
116
  Object.setPrototypeOf(this, SageMakerMetricsServiceException.prototype);
117
117
  }
118
- }
119
-
120
- const se_BatchGetMetricsCommand = async (input, context) => {
121
- const b = core.requestBuilder(input, context);
122
- const headers = {
123
- "content-type": "application/json",
124
- };
125
- b.bp("/BatchGetMetrics");
126
- let body;
127
- body = JSON.stringify(smithyClient.take(input, {
128
- MetricQueries: (_) => smithyClient._json(_),
129
- }));
130
- b.m("POST").h(headers).b(body);
131
- return b.build();
132
- };
133
- const se_BatchPutMetricsCommand = async (input, context) => {
134
- const b = core.requestBuilder(input, context);
135
- const headers = {
136
- "content-type": "application/json",
137
- };
138
- b.bp("/BatchPutMetrics");
139
- let body;
140
- body = JSON.stringify(smithyClient.take(input, {
141
- MetricData: (_) => se_RawMetricDataList(_),
142
- TrialComponentName: [],
143
- }));
144
- b.m("PUT").h(headers).b(body);
145
- return b.build();
146
- };
147
- const de_BatchGetMetricsCommand = async (output, context) => {
148
- if (output.statusCode !== 200 && output.statusCode >= 300) {
149
- return de_CommandError(output, context);
150
- }
151
- const contents = smithyClient.map({
152
- $metadata: deserializeMetadata(output),
153
- });
154
- const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
155
- const doc = smithyClient.take(data, {
156
- MetricQueryResults: (_) => de_MetricQueryResultList(_),
157
- });
158
- Object.assign(contents, doc);
159
- return contents;
160
- };
161
- const de_BatchPutMetricsCommand = async (output, context) => {
162
- if (output.statusCode !== 200 && output.statusCode >= 300) {
163
- return de_CommandError(output, context);
164
- }
165
- const contents = smithyClient.map({
166
- $metadata: deserializeMetadata(output),
167
- });
168
- const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
169
- const doc = smithyClient.take(data, {
170
- Errors: smithyClient._json,
171
- });
172
- Object.assign(contents, doc);
173
- return contents;
174
- };
175
- const de_CommandError = async (output, context) => {
176
- const parsedOutput = {
177
- ...output,
178
- body: await core$1.parseJsonErrorBody(output.body, context),
179
- };
180
- const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
181
- const parsedBody = parsedOutput.body;
182
- return throwDefaultError({
183
- output,
184
- parsedBody,
185
- errorCode,
186
- });
187
- };
188
- const throwDefaultError = smithyClient.withBaseException(SageMakerMetricsServiceException);
189
- const se_RawMetricData = (input, context) => {
190
- return smithyClient.take(input, {
191
- MetricName: [],
192
- Step: [],
193
- Timestamp: (_) => _.getTime() / 1_000,
194
- Value: smithyClient.serializeFloat,
195
- });
196
- };
197
- const se_RawMetricDataList = (input, context) => {
198
- return input
199
- .filter((e) => e != null)
200
- .map((entry) => {
201
- return se_RawMetricData(entry);
202
- });
203
- };
204
- const de_MetricQueryResult = (output, context) => {
205
- return smithyClient.take(output, {
206
- Message: smithyClient.expectString,
207
- MetricValues: (_) => de_MetricValues(_),
208
- Status: smithyClient.expectString,
209
- XAxisValues: smithyClient._json,
210
- });
211
- };
212
- const de_MetricQueryResultList = (output, context) => {
213
- const retVal = (output || [])
214
- .filter((e) => e != null)
215
- .map((entry) => {
216
- return de_MetricQueryResult(entry);
217
- });
218
- return retVal;
219
118
  };
220
- const de_MetricValues = (output, context) => {
221
- const retVal = (output || [])
222
- .filter((e) => e != null)
223
- .map((entry) => {
224
- return smithyClient.limitedParseDouble(entry);
225
- });
226
- return retVal;
227
- };
228
- const deserializeMetadata = (output) => ({
229
- httpStatusCode: output.statusCode,
230
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
231
- extendedRequestId: output.headers["x-amz-id-2"],
232
- cfId: output.headers["x-amz-cf-id"],
233
- });
119
+
120
+ const _BGM = "BatchGetMetrics";
121
+ const _BGMR = "BatchGetMetricsRequest";
122
+ const _BGMRa = "BatchGetMetricsResponse";
123
+ const _BPM = "BatchPutMetrics";
124
+ const _BPME = "BatchPutMetricsError";
125
+ const _BPMEL = "BatchPutMetricsErrorList";
126
+ const _BPMR = "BatchPutMetricsRequest";
127
+ const _BPMRa = "BatchPutMetricsResponse";
128
+ const _C = "Code";
129
+ const _E = "Errors";
130
+ const _En = "End";
131
+ const _M = "Message";
132
+ const _MD = "MetricData";
133
+ const _MI = "MetricIndex";
134
+ const _MN = "MetricName";
135
+ const _MQ = "MetricQueries";
136
+ const _MQL = "MetricQueryList";
137
+ const _MQR = "MetricQueryResults";
138
+ const _MQRL = "MetricQueryResultList";
139
+ const _MQRe = "MetricQueryResult";
140
+ const _MQe = "MetricQuery";
141
+ const _MS = "MetricStat";
142
+ const _MV = "MetricValues";
143
+ const _P = "Period";
144
+ const _RA = "ResourceArn";
145
+ const _RMD = "RawMetricData";
146
+ const _RMDL = "RawMetricDataList";
147
+ const _S = "Start";
148
+ const _St = "Status";
149
+ const _Ste = "Step";
150
+ const _T = "Timestamp";
151
+ const _TCN = "TrialComponentName";
152
+ const _V = "Value";
153
+ const _XAT = "XAxisType";
154
+ const _XAV = "XAxisValues";
155
+ const _h = "http";
156
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sagemakermetrics";
157
+ const n0 = "com.amazonaws.sagemakermetrics";
158
+ var BatchGetMetricsRequest = [3, n0, _BGMR, 0, [_MQ], [() => MetricQueryList]];
159
+ var BatchGetMetricsResponse = [3, n0, _BGMRa, 0, [_MQR], [() => MetricQueryResultList]];
160
+ var BatchPutMetricsError = [3, n0, _BPME, 0, [_C, _MI], [0, 1]];
161
+ var BatchPutMetricsRequest = [3, n0, _BPMR, 0, [_TCN, _MD], [0, () => RawMetricDataList]];
162
+ var BatchPutMetricsResponse = [3, n0, _BPMRa, 0, [_E], [() => BatchPutMetricsErrorList]];
163
+ var MetricQuery = [
164
+ 3,
165
+ n0,
166
+ _MQe,
167
+ 0,
168
+ [_MN, _RA, _MS, _P, _XAT, _S, _En],
169
+ [0, 0, 0, 0, 0, 1, 1],
170
+ ];
171
+ var MetricQueryResult = [3, n0, _MQRe, 0, [_St, _M, _XAV, _MV], [0, 0, 64 | 1, 64 | 1]];
172
+ var RawMetricData = [3, n0, _RMD, 0, [_MN, _T, _Ste, _V], [0, 4, 1, 1]];
173
+ var SageMakerMetricsServiceException = [
174
+ -3,
175
+ _s,
176
+ "SageMakerMetricsServiceException",
177
+ 0,
178
+ [],
179
+ [],
180
+ ];
181
+ schema.TypeRegistry.for(_s).registerError(SageMakerMetricsServiceException, SageMakerMetricsServiceException$1);
182
+ var BatchPutMetricsErrorList = [1, n0, _BPMEL, 0, () => BatchPutMetricsError];
183
+ var MetricQueryList = [1, n0, _MQL, 0, () => MetricQuery];
184
+ var MetricQueryResultList = [1, n0, _MQRL, 0, () => MetricQueryResult];
185
+ var RawMetricDataList = [1, n0, _RMDL, 0, () => RawMetricData];
186
+ var BatchGetMetrics = [
187
+ 9,
188
+ n0,
189
+ _BGM,
190
+ {
191
+ [_h]: ["POST", "/BatchGetMetrics", 200],
192
+ },
193
+ () => BatchGetMetricsRequest,
194
+ () => BatchGetMetricsResponse,
195
+ ];
196
+ var BatchPutMetrics = [
197
+ 9,
198
+ n0,
199
+ _BPM,
200
+ {
201
+ [_h]: ["PUT", "/BatchPutMetrics", 200],
202
+ },
203
+ () => BatchPutMetricsRequest,
204
+ () => BatchPutMetricsResponse,
205
+ ];
234
206
 
235
207
  class BatchGetMetricsCommand extends smithyClient.Command
236
208
  .classBuilder()
237
209
  .ep(commonParams)
238
210
  .m(function (Command, cs, config, o) {
239
- return [
240
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
241
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
242
- ];
211
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
243
212
  })
244
213
  .s("SageMakerMetricsService", "BatchGetMetrics", {})
245
214
  .n("SageMakerMetricsClient", "BatchGetMetricsCommand")
246
- .f(void 0, void 0)
247
- .ser(se_BatchGetMetricsCommand)
248
- .de(de_BatchGetMetricsCommand)
215
+ .sc(BatchGetMetrics)
249
216
  .build() {
250
217
  }
251
218
 
@@ -253,16 +220,11 @@ class BatchPutMetricsCommand extends smithyClient.Command
253
220
  .classBuilder()
254
221
  .ep(commonParams)
255
222
  .m(function (Command, cs, config, o) {
256
- return [
257
- middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
258
- middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
259
- ];
223
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
260
224
  })
261
225
  .s("SageMakerMetricsService", "BatchPutMetrics", {})
262
226
  .n("SageMakerMetricsClient", "BatchPutMetricsCommand")
263
- .f(void 0, void 0)
264
- .ser(se_BatchPutMetricsCommand)
265
- .de(de_BatchPutMetricsCommand)
227
+ .sc(BatchPutMetrics)
266
228
  .build() {
267
229
  }
268
230
 
@@ -321,5 +283,5 @@ exports.Period = Period;
321
283
  exports.PutMetricsErrorCode = PutMetricsErrorCode;
322
284
  exports.SageMakerMetrics = SageMakerMetrics;
323
285
  exports.SageMakerMetricsClient = SageMakerMetricsClient;
324
- exports.SageMakerMetricsServiceException = SageMakerMetricsServiceException;
286
+ exports.SageMakerMetricsServiceException = SageMakerMetricsServiceException$1;
325
287
  exports.XAxisType = XAxisType;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
+ const protocols_1 = require("@aws-sdk/core/protocols");
5
6
  const smithy_client_1 = require("@smithy/smithy-client");
6
7
  const url_parser_1 = require("@smithy/url-parser");
7
8
  const util_base64_1 = require("@smithy/util-base64");
@@ -25,6 +26,7 @@ const getRuntimeConfig = (config) => {
25
26
  },
26
27
  ],
27
28
  logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
29
+ protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.sagemakermetrics" }),
28
30
  serviceId: config?.serviceId ?? "SageMaker Metrics",
29
31
  urlParser: config?.urlParser ?? url_parser_1.parseUrl,
30
32
  utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
@@ -4,6 +4,7 @@ import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detec
4
4
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
5
5
  import { resolveRegionConfig } from "@smithy/config-resolver";
6
6
  import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
7
+ import { getSchemaSerdePlugin } from "@smithy/core/schema";
7
8
  import { getContentLengthPlugin } from "@smithy/middleware-content-length";
8
9
  import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
9
10
  import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
@@ -28,6 +29,7 @@ export class SageMakerMetricsClient extends __Client {
28
29
  const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
29
30
  const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
30
31
  this.config = _config_8;
32
+ this.middlewareStack.use(getSchemaSerdePlugin(this.config));
31
33
  this.middlewareStack.use(getUserAgentPlugin(this.config));
32
34
  this.middlewareStack.use(getRetryPlugin(this.config));
33
35
  this.middlewareStack.use(getContentLengthPlugin(this.config));
@@ -1,22 +1,16 @@
1
1
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
- import { getSerdePlugin } from "@smithy/middleware-serde";
3
2
  import { Command as $Command } from "@smithy/smithy-client";
4
3
  import { commonParams } from "../endpoint/EndpointParameters";
5
- import { de_BatchGetMetricsCommand, se_BatchGetMetricsCommand } from "../protocols/Aws_restJson1";
4
+ import { BatchGetMetrics } from "../schemas/schemas_0";
6
5
  export { $Command };
7
6
  export class BatchGetMetricsCommand extends $Command
8
7
  .classBuilder()
9
8
  .ep(commonParams)
10
9
  .m(function (Command, cs, config, o) {
11
- return [
12
- getSerdePlugin(config, this.serialize, this.deserialize),
13
- getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
- ];
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
15
11
  })
16
12
  .s("SageMakerMetricsService", "BatchGetMetrics", {})
17
13
  .n("SageMakerMetricsClient", "BatchGetMetricsCommand")
18
- .f(void 0, void 0)
19
- .ser(se_BatchGetMetricsCommand)
20
- .de(de_BatchGetMetricsCommand)
14
+ .sc(BatchGetMetrics)
21
15
  .build() {
22
16
  }
@@ -1,22 +1,16 @@
1
1
  import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
- import { getSerdePlugin } from "@smithy/middleware-serde";
3
2
  import { Command as $Command } from "@smithy/smithy-client";
4
3
  import { commonParams } from "../endpoint/EndpointParameters";
5
- import { de_BatchPutMetricsCommand, se_BatchPutMetricsCommand } from "../protocols/Aws_restJson1";
4
+ import { BatchPutMetrics } from "../schemas/schemas_0";
6
5
  export { $Command };
7
6
  export class BatchPutMetricsCommand extends $Command
8
7
  .classBuilder()
9
8
  .ep(commonParams)
10
9
  .m(function (Command, cs, config, o) {
11
- return [
12
- getSerdePlugin(config, this.serialize, this.deserialize),
13
- getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
- ];
10
+ return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
15
11
  })
16
12
  .s("SageMakerMetricsService", "BatchPutMetrics", {})
17
13
  .n("SageMakerMetricsClient", "BatchPutMetricsCommand")
18
- .f(void 0, void 0)
19
- .ser(se_BatchPutMetricsCommand)
20
- .de(de_BatchPutMetricsCommand)
14
+ .sc(BatchPutMetrics)
21
15
  .build() {
22
16
  }
@@ -1,4 +1,5 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core";
2
+ import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
2
3
  import { NoOpLogger } from "@smithy/smithy-client";
3
4
  import { parseUrl } from "@smithy/url-parser";
4
5
  import { fromBase64, toBase64 } from "@smithy/util-base64";
@@ -22,6 +23,7 @@ export const getRuntimeConfig = (config) => {
22
23
  },
23
24
  ],
24
25
  logger: config?.logger ?? new NoOpLogger(),
26
+ protocol: config?.protocol ?? new AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.sagemakermetrics" }),
25
27
  serviceId: config?.serviceId ?? "SageMaker Metrics",
26
28
  urlParser: config?.urlParser ?? parseUrl,
27
29
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
@@ -0,0 +1,91 @@
1
+ const _BGM = "BatchGetMetrics";
2
+ const _BGMR = "BatchGetMetricsRequest";
3
+ const _BGMRa = "BatchGetMetricsResponse";
4
+ const _BPM = "BatchPutMetrics";
5
+ const _BPME = "BatchPutMetricsError";
6
+ const _BPMEL = "BatchPutMetricsErrorList";
7
+ const _BPMR = "BatchPutMetricsRequest";
8
+ const _BPMRa = "BatchPutMetricsResponse";
9
+ const _C = "Code";
10
+ const _E = "Errors";
11
+ const _En = "End";
12
+ const _M = "Message";
13
+ const _MD = "MetricData";
14
+ const _MI = "MetricIndex";
15
+ const _MN = "MetricName";
16
+ const _MQ = "MetricQueries";
17
+ const _MQL = "MetricQueryList";
18
+ const _MQR = "MetricQueryResults";
19
+ const _MQRL = "MetricQueryResultList";
20
+ const _MQRe = "MetricQueryResult";
21
+ const _MQe = "MetricQuery";
22
+ const _MS = "MetricStat";
23
+ const _MV = "MetricValues";
24
+ const _P = "Period";
25
+ const _RA = "ResourceArn";
26
+ const _RMD = "RawMetricData";
27
+ const _RMDL = "RawMetricDataList";
28
+ const _S = "Start";
29
+ const _St = "Status";
30
+ const _Ste = "Step";
31
+ const _T = "Timestamp";
32
+ const _TCN = "TrialComponentName";
33
+ const _V = "Value";
34
+ const _XAT = "XAxisType";
35
+ const _XAV = "XAxisValues";
36
+ const _h = "http";
37
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sagemakermetrics";
38
+ const n0 = "com.amazonaws.sagemakermetrics";
39
+ import { TypeRegistry } from "@smithy/core/schema";
40
+ import { SageMakerMetricsServiceException as __SageMakerMetricsServiceException } from "../models/SageMakerMetricsServiceException";
41
+ export var BatchGetMetricsRequest = [3, n0, _BGMR, 0, [_MQ], [() => MetricQueryList]];
42
+ export var BatchGetMetricsResponse = [3, n0, _BGMRa, 0, [_MQR], [() => MetricQueryResultList]];
43
+ export var BatchPutMetricsError = [3, n0, _BPME, 0, [_C, _MI], [0, 1]];
44
+ export var BatchPutMetricsRequest = [3, n0, _BPMR, 0, [_TCN, _MD], [0, () => RawMetricDataList]];
45
+ export var BatchPutMetricsResponse = [3, n0, _BPMRa, 0, [_E], [() => BatchPutMetricsErrorList]];
46
+ export var MetricQuery = [
47
+ 3,
48
+ n0,
49
+ _MQe,
50
+ 0,
51
+ [_MN, _RA, _MS, _P, _XAT, _S, _En],
52
+ [0, 0, 0, 0, 0, 1, 1],
53
+ ];
54
+ export var MetricQueryResult = [3, n0, _MQRe, 0, [_St, _M, _XAV, _MV], [0, 0, 64 | 1, 64 | 1]];
55
+ export var RawMetricData = [3, n0, _RMD, 0, [_MN, _T, _Ste, _V], [0, 4, 1, 1]];
56
+ export var __Unit = "unit";
57
+ export var SageMakerMetricsServiceException = [
58
+ -3,
59
+ _s,
60
+ "SageMakerMetricsServiceException",
61
+ 0,
62
+ [],
63
+ [],
64
+ ];
65
+ TypeRegistry.for(_s).registerError(SageMakerMetricsServiceException, __SageMakerMetricsServiceException);
66
+ export var BatchPutMetricsErrorList = [1, n0, _BPMEL, 0, () => BatchPutMetricsError];
67
+ export var MetricQueryList = [1, n0, _MQL, 0, () => MetricQuery];
68
+ export var MetricQueryResultList = [1, n0, _MQRL, 0, () => MetricQueryResult];
69
+ export var MetricValues = 64 | 1;
70
+ export var RawMetricDataList = [1, n0, _RMDL, 0, () => RawMetricData];
71
+ export var XAxisValues = 64 | 1;
72
+ export var BatchGetMetrics = [
73
+ 9,
74
+ n0,
75
+ _BGM,
76
+ {
77
+ [_h]: ["POST", "/BatchGetMetrics", 200],
78
+ },
79
+ () => BatchGetMetricsRequest,
80
+ () => BatchGetMetricsResponse,
81
+ ];
82
+ export var BatchPutMetrics = [
83
+ 9,
84
+ n0,
85
+ _BPM,
86
+ {
87
+ [_h]: ["PUT", "/BatchPutMetrics", 200],
88
+ },
89
+ () => BatchPutMetricsRequest,
90
+ () => BatchPutMetricsResponse,
91
+ ];
@@ -5,7 +5,7 @@ import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-
5
5
  import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
6
6
  import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
7
7
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
8
- import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
8
+ import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, ClientProtocol, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, HttpRequest, HttpResponse, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
9
9
  import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
10
10
  import { BatchGetMetricsCommandInput, BatchGetMetricsCommandOutput } from "./commands/BatchGetMetricsCommand";
11
11
  import { BatchPutMetricsCommandInput, BatchPutMetricsCommandOutput } from "./commands/BatchPutMetricsCommand";
@@ -143,6 +143,15 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
143
143
  * Optional extensions
144
144
  */
145
145
  extensions?: RuntimeExtension[];
146
+ /**
147
+ * The protocol controlling the message type (e.g. HTTP) and format (e.g. JSON)
148
+ * may be overridden. A default will always be set by the client.
149
+ * Available options depend on the service's supported protocols and will not be validated by
150
+ * the client.
151
+ * @alpha
152
+ *
153
+ */
154
+ protocol?: ClientProtocol<HttpRequest, HttpResponse>;
146
155
  /**
147
156
  * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
148
157
  */
@@ -29,6 +29,7 @@ export declare const getRuntimeConfig: (config: SageMakerMetricsClientConfig) =>
29
29
  profile?: string;
30
30
  logger: import("@smithy/types").Logger;
31
31
  extensions: import("./runtimeExtensions").RuntimeExtension[];
32
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
32
33
  customUserAgent?: string | import("@smithy/types").UserAgent;
33
34
  userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
34
35
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
@@ -31,6 +31,7 @@ export declare const getRuntimeConfig: (config: SageMakerMetricsClientConfig) =>
31
31
  profile?: string;
32
32
  logger: import("@smithy/types").Logger;
33
33
  extensions: import("./runtimeExtensions").RuntimeExtension[];
34
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
34
35
  customUserAgent?: string | import("@smithy/types").UserAgent;
35
36
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
36
37
  endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
@@ -27,6 +27,7 @@ export declare const getRuntimeConfig: (config: SageMakerMetricsClientConfig) =>
27
27
  retryMode: string | import("@smithy/types").Provider<string>;
28
28
  logger: import("@smithy/types").Logger;
29
29
  extensions: import("./runtimeExtensions").RuntimeExtension[];
30
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
30
31
  defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
31
32
  customUserAgent?: string | import("@smithy/types").UserAgent;
32
33
  userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
@@ -14,6 +14,7 @@ export declare const getRuntimeConfig: (config: SageMakerMetricsClientConfig) =>
14
14
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SageMakerMetricsHttpAuthSchemeProvider;
15
15
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
16
16
  logger: import("@smithy/types").Logger;
17
+ protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
17
18
  serviceId: string;
18
19
  urlParser: import("@smithy/types").UrlParser;
19
20
  utf8Decoder: import("@smithy/types").Decoder;
@@ -0,0 +1,19 @@
1
+ import { StaticErrorSchema, StaticListSchema, StaticOperationSchema, StaticStructureSchema } from "@smithy/types";
2
+ export declare var BatchGetMetricsRequest: StaticStructureSchema;
3
+ export declare var BatchGetMetricsResponse: StaticStructureSchema;
4
+ export declare var BatchPutMetricsError: StaticStructureSchema;
5
+ export declare var BatchPutMetricsRequest: StaticStructureSchema;
6
+ export declare var BatchPutMetricsResponse: StaticStructureSchema;
7
+ export declare var MetricQuery: StaticStructureSchema;
8
+ export declare var MetricQueryResult: StaticStructureSchema;
9
+ export declare var RawMetricData: StaticStructureSchema;
10
+ export declare var __Unit: "unit";
11
+ export declare var SageMakerMetricsServiceException: StaticErrorSchema;
12
+ export declare var BatchPutMetricsErrorList: StaticListSchema;
13
+ export declare var MetricQueryList: StaticListSchema;
14
+ export declare var MetricQueryResultList: StaticListSchema;
15
+ export declare var MetricValues: number;
16
+ export declare var RawMetricDataList: StaticListSchema;
17
+ export declare var XAxisValues: number;
18
+ export declare var BatchGetMetrics: StaticOperationSchema;
19
+ export declare var BatchPutMetrics: StaticOperationSchema;
@@ -30,10 +30,13 @@ import {
30
30
  BodyLengthCalculator as __BodyLengthCalculator,
31
31
  CheckOptionalClientConfig as __CheckOptionalClientConfig,
32
32
  ChecksumConstructor as __ChecksumConstructor,
33
+ ClientProtocol,
33
34
  Decoder as __Decoder,
34
35
  Encoder as __Encoder,
35
36
  HashConstructor as __HashConstructor,
36
37
  HttpHandlerOptions as __HttpHandlerOptions,
38
+ HttpRequest,
39
+ HttpResponse,
37
40
  Logger as __Logger,
38
41
  Provider as __Provider,
39
42
  Provider,
@@ -90,6 +93,7 @@ export interface ClientDefaults
90
93
  retryMode?: string | __Provider<string>;
91
94
  logger?: __Logger;
92
95
  extensions?: RuntimeExtension[];
96
+ protocol?: ClientProtocol<HttpRequest, HttpResponse>;
93
97
  defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
94
98
  }
95
99
  export type SageMakerMetricsClientConfigType = Partial<
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
40
40
  profile?: string;
41
41
  logger: import("@smithy/types").Logger;
42
42
  extensions: import("./runtimeExtensions").RuntimeExtension[];
43
+ protocol: import("@smithy/types").ClientProtocol<
44
+ import("@smithy/types").HttpRequest,
45
+ import("@smithy/types").HttpResponse
46
+ >;
43
47
  customUserAgent?: string | import("@smithy/types").UserAgent;
44
48
  userAgentAppId?:
45
49
  | string
@@ -40,6 +40,10 @@ export declare const getRuntimeConfig: (
40
40
  profile?: string;
41
41
  logger: import("@smithy/types").Logger;
42
42
  extensions: import("./runtimeExtensions").RuntimeExtension[];
43
+ protocol: import("@smithy/types").ClientProtocol<
44
+ import("@smithy/types").HttpRequest,
45
+ import("@smithy/types").HttpResponse
46
+ >;
43
47
  customUserAgent?: string | import("@smithy/types").UserAgent;
44
48
  retryStrategy?:
45
49
  | import("@smithy/types").RetryStrategy
@@ -39,6 +39,10 @@ export declare const getRuntimeConfig: (
39
39
  retryMode: string | import("@smithy/types").Provider<string>;
40
40
  logger: import("@smithy/types").Logger;
41
41
  extensions: import("./runtimeExtensions").RuntimeExtension[];
42
+ protocol: import("@smithy/types").ClientProtocol<
43
+ import("@smithy/types").HttpRequest,
44
+ import("@smithy/types").HttpResponse
45
+ >;
42
46
  defaultsMode:
43
47
  | import("@smithy/smithy-client").DefaultsMode
44
48
  | import("@smithy/types").Provider<
@@ -16,6 +16,10 @@ export declare const getRuntimeConfig: (
16
16
  httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SageMakerMetricsHttpAuthSchemeProvider;
17
17
  httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
18
18
  logger: import("@smithy/types").Logger;
19
+ protocol: import("@smithy/types").ClientProtocol<
20
+ import("@smithy/types").HttpRequest,
21
+ import("@smithy/types").HttpResponse
22
+ >;
19
23
  serviceId: string;
20
24
  urlParser: import("@smithy/types").UrlParser;
21
25
  utf8Decoder: import("@smithy/types").Decoder;
@@ -0,0 +1,24 @@
1
+ import {
2
+ StaticErrorSchema,
3
+ StaticListSchema,
4
+ StaticOperationSchema,
5
+ StaticStructureSchema,
6
+ } from "@smithy/types";
7
+ export declare var BatchGetMetricsRequest: StaticStructureSchema;
8
+ export declare var BatchGetMetricsResponse: StaticStructureSchema;
9
+ export declare var BatchPutMetricsError: StaticStructureSchema;
10
+ export declare var BatchPutMetricsRequest: StaticStructureSchema;
11
+ export declare var BatchPutMetricsResponse: StaticStructureSchema;
12
+ export declare var MetricQuery: StaticStructureSchema;
13
+ export declare var MetricQueryResult: StaticStructureSchema;
14
+ export declare var RawMetricData: StaticStructureSchema;
15
+ export declare var __Unit: "unit";
16
+ export declare var SageMakerMetricsServiceException: StaticErrorSchema;
17
+ export declare var BatchPutMetricsErrorList: StaticListSchema;
18
+ export declare var MetricQueryList: StaticListSchema;
19
+ export declare var MetricQueryResultList: StaticListSchema;
20
+ export declare var MetricValues: number;
21
+ export declare var RawMetricDataList: StaticListSchema;
22
+ export declare var XAxisValues: number;
23
+ export declare var BatchGetMetrics: StaticOperationSchema;
24
+ export declare var BatchPutMetrics: StaticOperationSchema;
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.928.0",
4
+ "version": "3.929.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-sagemaker-metrics",
@@ -21,7 +21,7 @@
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
23
  "@aws-sdk/core": "3.928.0",
24
- "@aws-sdk/credential-provider-node": "3.928.0",
24
+ "@aws-sdk/credential-provider-node": "3.929.0",
25
25
  "@aws-sdk/middleware-host-header": "3.922.0",
26
26
  "@aws-sdk/middleware-logger": "3.922.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.922.0",
@@ -1,119 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, map, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
- import { SageMakerMetricsServiceException as __BaseException } from "../models/SageMakerMetricsServiceException";
5
- export const se_BatchGetMetricsCommand = async (input, context) => {
6
- const b = rb(input, context);
7
- const headers = {
8
- "content-type": "application/json",
9
- };
10
- b.bp("/BatchGetMetrics");
11
- let body;
12
- body = JSON.stringify(take(input, {
13
- MetricQueries: (_) => _json(_),
14
- }));
15
- b.m("POST").h(headers).b(body);
16
- return b.build();
17
- };
18
- export const se_BatchPutMetricsCommand = async (input, context) => {
19
- const b = rb(input, context);
20
- const headers = {
21
- "content-type": "application/json",
22
- };
23
- b.bp("/BatchPutMetrics");
24
- let body;
25
- body = JSON.stringify(take(input, {
26
- MetricData: (_) => se_RawMetricDataList(_, context),
27
- TrialComponentName: [],
28
- }));
29
- b.m("PUT").h(headers).b(body);
30
- return b.build();
31
- };
32
- export const de_BatchGetMetricsCommand = async (output, context) => {
33
- if (output.statusCode !== 200 && output.statusCode >= 300) {
34
- return de_CommandError(output, context);
35
- }
36
- const contents = map({
37
- $metadata: deserializeMetadata(output),
38
- });
39
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
40
- const doc = take(data, {
41
- MetricQueryResults: (_) => de_MetricQueryResultList(_, context),
42
- });
43
- Object.assign(contents, doc);
44
- return contents;
45
- };
46
- export const de_BatchPutMetricsCommand = async (output, context) => {
47
- if (output.statusCode !== 200 && output.statusCode >= 300) {
48
- return de_CommandError(output, context);
49
- }
50
- const contents = map({
51
- $metadata: deserializeMetadata(output),
52
- });
53
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
54
- const doc = take(data, {
55
- Errors: _json,
56
- });
57
- Object.assign(contents, doc);
58
- return contents;
59
- };
60
- const de_CommandError = async (output, context) => {
61
- const parsedOutput = {
62
- ...output,
63
- body: await parseErrorBody(output.body, context),
64
- };
65
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
66
- const parsedBody = parsedOutput.body;
67
- return throwDefaultError({
68
- output,
69
- parsedBody,
70
- errorCode,
71
- });
72
- };
73
- const throwDefaultError = withBaseException(__BaseException);
74
- const se_RawMetricData = (input, context) => {
75
- return take(input, {
76
- MetricName: [],
77
- Step: [],
78
- Timestamp: (_) => _.getTime() / 1_000,
79
- Value: __serializeFloat,
80
- });
81
- };
82
- const se_RawMetricDataList = (input, context) => {
83
- return input
84
- .filter((e) => e != null)
85
- .map((entry) => {
86
- return se_RawMetricData(entry, context);
87
- });
88
- };
89
- const de_MetricQueryResult = (output, context) => {
90
- return take(output, {
91
- Message: __expectString,
92
- MetricValues: (_) => de_MetricValues(_, context),
93
- Status: __expectString,
94
- XAxisValues: _json,
95
- });
96
- };
97
- const de_MetricQueryResultList = (output, context) => {
98
- const retVal = (output || [])
99
- .filter((e) => e != null)
100
- .map((entry) => {
101
- return de_MetricQueryResult(entry, context);
102
- });
103
- return retVal;
104
- };
105
- const de_MetricValues = (output, context) => {
106
- const retVal = (output || [])
107
- .filter((e) => e != null)
108
- .map((entry) => {
109
- return __limitedParseDouble(entry);
110
- });
111
- return retVal;
112
- };
113
- const deserializeMetadata = (output) => ({
114
- httpStatusCode: output.statusCode,
115
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
116
- extendedRequestId: output.headers["x-amz-id-2"],
117
- cfId: output.headers["x-amz-cf-id"],
118
- });
119
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
@@ -1,20 +0,0 @@
1
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
2
- import { SerdeContext as __SerdeContext } from "@smithy/types";
3
- import { BatchGetMetricsCommandInput, BatchGetMetricsCommandOutput } from "../commands/BatchGetMetricsCommand";
4
- import { BatchPutMetricsCommandInput, BatchPutMetricsCommandOutput } from "../commands/BatchPutMetricsCommand";
5
- /**
6
- * serializeAws_restJson1BatchGetMetricsCommand
7
- */
8
- export declare const se_BatchGetMetricsCommand: (input: BatchGetMetricsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
9
- /**
10
- * serializeAws_restJson1BatchPutMetricsCommand
11
- */
12
- export declare const se_BatchPutMetricsCommand: (input: BatchPutMetricsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
13
- /**
14
- * deserializeAws_restJson1BatchGetMetricsCommand
15
- */
16
- export declare const de_BatchGetMetricsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchGetMetricsCommandOutput>;
17
- /**
18
- * deserializeAws_restJson1BatchPutMetricsCommand
19
- */
20
- export declare const de_BatchPutMetricsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<BatchPutMetricsCommandOutput>;
@@ -1,29 +0,0 @@
1
- import {
2
- HttpRequest as __HttpRequest,
3
- HttpResponse as __HttpResponse,
4
- } from "@smithy/protocol-http";
5
- import { SerdeContext as __SerdeContext } from "@smithy/types";
6
- import {
7
- BatchGetMetricsCommandInput,
8
- BatchGetMetricsCommandOutput,
9
- } from "../commands/BatchGetMetricsCommand";
10
- import {
11
- BatchPutMetricsCommandInput,
12
- BatchPutMetricsCommandOutput,
13
- } from "../commands/BatchPutMetricsCommand";
14
- export declare const se_BatchGetMetricsCommand: (
15
- input: BatchGetMetricsCommandInput,
16
- context: __SerdeContext
17
- ) => Promise<__HttpRequest>;
18
- export declare const se_BatchPutMetricsCommand: (
19
- input: BatchPutMetricsCommandInput,
20
- context: __SerdeContext
21
- ) => Promise<__HttpRequest>;
22
- export declare const de_BatchGetMetricsCommand: (
23
- output: __HttpResponse,
24
- context: __SerdeContext
25
- ) => Promise<BatchGetMetricsCommandOutput>;
26
- export declare const de_BatchPutMetricsCommand: (
27
- output: __HttpResponse,
28
- context: __SerdeContext
29
- ) => Promise<BatchPutMetricsCommandOutput>;