@aws-sdk/client-sagemaker-edge 3.118.1 → 3.128.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/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-sagemaker-edge
9
+
10
+
11
+
12
+
13
+
14
+ # [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-sagemaker-edge
17
+
18
+
19
+
20
+
21
+
22
+ # [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
23
+
24
+
25
+ ### Features
26
+
27
+ * **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/client-sagemaker-edge
@@ -13,9 +13,8 @@ const serializeAws_restJson1GetDeviceRegistrationCommand = async (input, context
13
13
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeviceRegistration";
14
14
  let body;
15
15
  body = JSON.stringify({
16
- ...(input.DeviceFleetName !== undefined &&
17
- input.DeviceFleetName !== null && { DeviceFleetName: input.DeviceFleetName }),
18
- ...(input.DeviceName !== undefined && input.DeviceName !== null && { DeviceName: input.DeviceName }),
16
+ ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }),
17
+ ...(input.DeviceName != null && { DeviceName: input.DeviceName }),
19
18
  });
20
19
  return new protocol_http_1.HttpRequest({
21
20
  protocol,
@@ -36,14 +35,11 @@ const serializeAws_restJson1SendHeartbeatCommand = async (input, context) => {
36
35
  const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/SendHeartbeat";
37
36
  let body;
38
37
  body = JSON.stringify({
39
- ...(input.AgentMetrics !== undefined &&
40
- input.AgentMetrics !== null && { AgentMetrics: serializeAws_restJson1EdgeMetrics(input.AgentMetrics, context) }),
41
- ...(input.AgentVersion !== undefined && input.AgentVersion !== null && { AgentVersion: input.AgentVersion }),
42
- ...(input.DeviceFleetName !== undefined &&
43
- input.DeviceFleetName !== null && { DeviceFleetName: input.DeviceFleetName }),
44
- ...(input.DeviceName !== undefined && input.DeviceName !== null && { DeviceName: input.DeviceName }),
45
- ...(input.Models !== undefined &&
46
- input.Models !== null && { Models: serializeAws_restJson1Models(input.Models, context) }),
38
+ ...(input.AgentMetrics != null && { AgentMetrics: serializeAws_restJson1EdgeMetrics(input.AgentMetrics, context) }),
39
+ ...(input.AgentVersion != null && { AgentVersion: input.AgentVersion }),
40
+ ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }),
41
+ ...(input.DeviceName != null && { DeviceName: input.DeviceName }),
42
+ ...(input.Models != null && { Models: serializeAws_restJson1Models(input.Models, context) }),
47
43
  });
48
44
  return new protocol_http_1.HttpRequest({
49
45
  protocol,
@@ -81,18 +77,19 @@ const deserializeAws_restJson1GetDeviceRegistrationCommandError = async (output,
81
77
  body: await parseBody(output.body, context),
82
78
  };
83
79
  let response;
84
- let errorCode = "UnknownError";
85
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
80
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
86
81
  switch (errorCode) {
87
82
  case "InternalServiceException":
88
83
  case "com.amazonaws.sagemakeredge#InternalServiceException":
89
84
  throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
90
85
  default:
91
86
  const parsedBody = parsedOutput.body;
87
+ const $metadata = deserializeMetadata(output);
88
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
92
89
  response = new SagemakerEdgeServiceException_1.SagemakerEdgeServiceException({
93
- name: parsedBody.code || parsedBody.Code || errorCode,
90
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
94
91
  $fault: "client",
95
- $metadata: deserializeMetadata(output),
92
+ $metadata,
96
93
  });
97
94
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
98
95
  }
@@ -114,18 +111,19 @@ const deserializeAws_restJson1SendHeartbeatCommandError = async (output, context
114
111
  body: await parseBody(output.body, context),
115
112
  };
116
113
  let response;
117
- let errorCode = "UnknownError";
118
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
114
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
119
115
  switch (errorCode) {
120
116
  case "InternalServiceException":
121
117
  case "com.amazonaws.sagemakeredge#InternalServiceException":
122
118
  throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
123
119
  default:
124
120
  const parsedBody = parsedOutput.body;
121
+ const $metadata = deserializeMetadata(output);
122
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
125
123
  response = new SagemakerEdgeServiceException_1.SagemakerEdgeServiceException({
126
- name: parsedBody.code || parsedBody.Code || errorCode,
124
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
127
125
  $fault: "client",
128
- $metadata: deserializeMetadata(output),
126
+ $metadata,
129
127
  });
130
128
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
131
129
  }
@@ -144,11 +142,10 @@ const deserializeAws_restJson1InternalServiceExceptionResponse = async (parsedOu
144
142
  };
145
143
  const serializeAws_restJson1EdgeMetric = (input, context) => {
146
144
  return {
147
- ...(input.Dimension !== undefined && input.Dimension !== null && { Dimension: input.Dimension }),
148
- ...(input.MetricName !== undefined && input.MetricName !== null && { MetricName: input.MetricName }),
149
- ...(input.Timestamp !== undefined &&
150
- input.Timestamp !== null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
151
- ...(input.Value !== undefined && input.Value !== null && { Value: (0, smithy_client_1.serializeFloat)(input.Value) }),
145
+ ...(input.Dimension != null && { Dimension: input.Dimension }),
146
+ ...(input.MetricName != null && { MetricName: input.MetricName }),
147
+ ...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
148
+ ...(input.Value != null && { Value: (0, smithy_client_1.serializeFloat)(input.Value) }),
152
149
  };
153
150
  };
154
151
  const serializeAws_restJson1EdgeMetrics = (input, context) => {
@@ -163,14 +160,11 @@ const serializeAws_restJson1EdgeMetrics = (input, context) => {
163
160
  };
164
161
  const serializeAws_restJson1Model = (input, context) => {
165
162
  return {
166
- ...(input.LatestInference !== undefined &&
167
- input.LatestInference !== null && { LatestInference: Math.round(input.LatestInference.getTime() / 1000) }),
168
- ...(input.LatestSampleTime !== undefined &&
169
- input.LatestSampleTime !== null && { LatestSampleTime: Math.round(input.LatestSampleTime.getTime() / 1000) }),
170
- ...(input.ModelMetrics !== undefined &&
171
- input.ModelMetrics !== null && { ModelMetrics: serializeAws_restJson1EdgeMetrics(input.ModelMetrics, context) }),
172
- ...(input.ModelName !== undefined && input.ModelName !== null && { ModelName: input.ModelName }),
173
- ...(input.ModelVersion !== undefined && input.ModelVersion !== null && { ModelVersion: input.ModelVersion }),
163
+ ...(input.LatestInference != null && { LatestInference: Math.round(input.LatestInference.getTime() / 1000) }),
164
+ ...(input.LatestSampleTime != null && { LatestSampleTime: Math.round(input.LatestSampleTime.getTime() / 1000) }),
165
+ ...(input.ModelMetrics != null && { ModelMetrics: serializeAws_restJson1EdgeMetrics(input.ModelMetrics, context) }),
166
+ ...(input.ModelName != null && { ModelName: input.ModelName }),
167
+ ...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }),
174
168
  };
175
169
  };
176
170
  const serializeAws_restJson1Models = (input, context) => {
@@ -232,5 +226,4 @@ const loadRestJsonErrorCode = (output, data) => {
232
226
  if (data["__type"] !== undefined) {
233
227
  return sanitizeErrorCode(data["__type"]);
234
228
  }
235
- return "";
236
229
  };
@@ -14,8 +14,7 @@ export var serializeAws_restJson1GetDeviceRegistrationCommand = function (input,
14
14
  "content-type": "application/json",
15
15
  };
16
16
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/GetDeviceRegistration";
17
- body = JSON.stringify(__assign(__assign({}, (input.DeviceFleetName !== undefined &&
18
- input.DeviceFleetName !== null && { DeviceFleetName: input.DeviceFleetName })), (input.DeviceName !== undefined && input.DeviceName !== null && { DeviceName: input.DeviceName })));
17
+ body = JSON.stringify(__assign(__assign({}, (input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName })), (input.DeviceName != null && { DeviceName: input.DeviceName })));
19
18
  return [2, new __HttpRequest({
20
19
  protocol: protocol,
21
20
  hostname: hostname,
@@ -39,10 +38,7 @@ export var serializeAws_restJson1SendHeartbeatCommand = function (input, context
39
38
  "content-type": "application/json",
40
39
  };
41
40
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/SendHeartbeat";
42
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.AgentMetrics !== undefined &&
43
- input.AgentMetrics !== null && { AgentMetrics: serializeAws_restJson1EdgeMetrics(input.AgentMetrics, context) })), (input.AgentVersion !== undefined && input.AgentVersion !== null && { AgentVersion: input.AgentVersion })), (input.DeviceFleetName !== undefined &&
44
- input.DeviceFleetName !== null && { DeviceFleetName: input.DeviceFleetName })), (input.DeviceName !== undefined && input.DeviceName !== null && { DeviceName: input.DeviceName })), (input.Models !== undefined &&
45
- input.Models !== null && { Models: serializeAws_restJson1Models(input.Models, context) })));
41
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign({}, (input.AgentMetrics != null && { AgentMetrics: serializeAws_restJson1EdgeMetrics(input.AgentMetrics, context) })), (input.AgentVersion != null && { AgentVersion: input.AgentVersion })), (input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName })), (input.DeviceName != null && { DeviceName: input.DeviceName })), (input.Models != null && { Models: serializeAws_restJson1Models(input.Models, context) })));
46
42
  return [2, new __HttpRequest({
47
43
  protocol: protocol,
48
44
  hostname: hostname,
@@ -84,7 +80,7 @@ export var deserializeAws_restJson1GetDeviceRegistrationCommand = function (outp
84
80
  });
85
81
  }); };
86
82
  var deserializeAws_restJson1GetDeviceRegistrationCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
87
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
83
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
88
84
  var _c;
89
85
  return __generator(this, function (_d) {
90
86
  switch (_d.label) {
@@ -94,7 +90,6 @@ var deserializeAws_restJson1GetDeviceRegistrationCommandError = function (output
94
90
  return [4, parseBody(output.body, context)];
95
91
  case 1:
96
92
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
97
- errorCode = "UnknownError";
98
93
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
99
94
  _b = errorCode;
100
95
  switch (_b) {
@@ -106,10 +101,12 @@ var deserializeAws_restJson1GetDeviceRegistrationCommandError = function (output
106
101
  case 3: throw _d.sent();
107
102
  case 4:
108
103
  parsedBody = parsedOutput.body;
104
+ $metadata = deserializeMetadata(output);
105
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
109
106
  response = new __BaseException({
110
- name: parsedBody.code || parsedBody.Code || errorCode,
107
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
111
108
  $fault: "client",
112
- $metadata: deserializeMetadata(output),
109
+ $metadata: $metadata,
113
110
  });
114
111
  throw __decorateServiceException(response, parsedBody);
115
112
  }
@@ -134,7 +131,7 @@ export var deserializeAws_restJson1SendHeartbeatCommand = function (output, cont
134
131
  });
135
132
  }); };
136
133
  var deserializeAws_restJson1SendHeartbeatCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
137
- var parsedOutput, _a, response, errorCode, _b, parsedBody;
134
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
138
135
  var _c;
139
136
  return __generator(this, function (_d) {
140
137
  switch (_d.label) {
@@ -144,7 +141,6 @@ var deserializeAws_restJson1SendHeartbeatCommandError = function (output, contex
144
141
  return [4, parseBody(output.body, context)];
145
142
  case 1:
146
143
  parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
147
- errorCode = "UnknownError";
148
144
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
149
145
  _b = errorCode;
150
146
  switch (_b) {
@@ -156,10 +152,12 @@ var deserializeAws_restJson1SendHeartbeatCommandError = function (output, contex
156
152
  case 3: throw _d.sent();
157
153
  case 4:
158
154
  parsedBody = parsedOutput.body;
155
+ $metadata = deserializeMetadata(output);
156
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
159
157
  response = new __BaseException({
160
- name: parsedBody.code || parsedBody.Code || errorCode,
158
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
161
159
  $fault: "client",
162
- $metadata: deserializeMetadata(output),
160
+ $metadata: $metadata,
163
161
  });
164
162
  throw __decorateServiceException(response, parsedBody);
165
163
  }
@@ -178,8 +176,7 @@ var deserializeAws_restJson1InternalServiceExceptionResponse = function (parsedO
178
176
  });
179
177
  }); };
180
178
  var serializeAws_restJson1EdgeMetric = function (input, context) {
181
- return __assign(__assign(__assign(__assign({}, (input.Dimension !== undefined && input.Dimension !== null && { Dimension: input.Dimension })), (input.MetricName !== undefined && input.MetricName !== null && { MetricName: input.MetricName })), (input.Timestamp !== undefined &&
182
- input.Timestamp !== null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) })), (input.Value !== undefined && input.Value !== null && { Value: __serializeFloat(input.Value) }));
179
+ return __assign(__assign(__assign(__assign({}, (input.Dimension != null && { Dimension: input.Dimension })), (input.MetricName != null && { MetricName: input.MetricName })), (input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) })), (input.Value != null && { Value: __serializeFloat(input.Value) }));
183
180
  };
184
181
  var serializeAws_restJson1EdgeMetrics = function (input, context) {
185
182
  return input
@@ -192,10 +189,7 @@ var serializeAws_restJson1EdgeMetrics = function (input, context) {
192
189
  });
193
190
  };
194
191
  var serializeAws_restJson1Model = function (input, context) {
195
- return __assign(__assign(__assign(__assign(__assign({}, (input.LatestInference !== undefined &&
196
- input.LatestInference !== null && { LatestInference: Math.round(input.LatestInference.getTime() / 1000) })), (input.LatestSampleTime !== undefined &&
197
- input.LatestSampleTime !== null && { LatestSampleTime: Math.round(input.LatestSampleTime.getTime() / 1000) })), (input.ModelMetrics !== undefined &&
198
- input.ModelMetrics !== null && { ModelMetrics: serializeAws_restJson1EdgeMetrics(input.ModelMetrics, context) })), (input.ModelName !== undefined && input.ModelName !== null && { ModelName: input.ModelName })), (input.ModelVersion !== undefined && input.ModelVersion !== null && { ModelVersion: input.ModelVersion }));
192
+ return __assign(__assign(__assign(__assign(__assign({}, (input.LatestInference != null && { LatestInference: Math.round(input.LatestInference.getTime() / 1000) })), (input.LatestSampleTime != null && { LatestSampleTime: Math.round(input.LatestSampleTime.getTime() / 1000) })), (input.ModelMetrics != null && { ModelMetrics: serializeAws_restJson1EdgeMetrics(input.ModelMetrics, context) })), (input.ModelName != null && { ModelName: input.ModelName })), (input.ModelVersion != null && { ModelVersion: input.ModelVersion }));
199
193
  };
200
194
  var serializeAws_restJson1Models = function (input, context) {
201
195
  return input
@@ -263,5 +257,4 @@ var loadRestJsonErrorCode = function (output, data) {
263
257
  if (data["__type"] !== undefined) {
264
258
  return sanitizeErrorCode(data["__type"]);
265
259
  }
266
- return "";
267
260
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sagemaker-edge",
3
3
  "description": "AWS SDK for JavaScript Sagemaker Edge Client for Node.js, Browser and React Native",
4
- "version": "3.118.1",
4
+ "version": "3.128.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",
@@ -18,35 +18,35 @@
18
18
  "dependencies": {
19
19
  "@aws-crypto/sha256-browser": "2.0.0",
20
20
  "@aws-crypto/sha256-js": "2.0.0",
21
- "@aws-sdk/client-sts": "3.118.1",
22
- "@aws-sdk/config-resolver": "3.110.0",
23
- "@aws-sdk/credential-provider-node": "3.118.1",
24
- "@aws-sdk/fetch-http-handler": "3.110.0",
25
- "@aws-sdk/hash-node": "3.110.0",
26
- "@aws-sdk/invalid-dependency": "3.110.0",
27
- "@aws-sdk/middleware-content-length": "3.110.0",
28
- "@aws-sdk/middleware-host-header": "3.110.0",
29
- "@aws-sdk/middleware-logger": "3.110.0",
30
- "@aws-sdk/middleware-recursion-detection": "3.110.0",
31
- "@aws-sdk/middleware-retry": "3.118.1",
32
- "@aws-sdk/middleware-serde": "3.110.0",
33
- "@aws-sdk/middleware-signing": "3.110.0",
34
- "@aws-sdk/middleware-stack": "3.110.0",
35
- "@aws-sdk/middleware-user-agent": "3.110.0",
36
- "@aws-sdk/node-config-provider": "3.110.0",
37
- "@aws-sdk/node-http-handler": "3.118.1",
38
- "@aws-sdk/protocol-http": "3.110.0",
39
- "@aws-sdk/smithy-client": "3.110.0",
40
- "@aws-sdk/types": "3.110.0",
41
- "@aws-sdk/url-parser": "3.110.0",
21
+ "@aws-sdk/client-sts": "3.128.0",
22
+ "@aws-sdk/config-resolver": "3.128.0",
23
+ "@aws-sdk/credential-provider-node": "3.128.0",
24
+ "@aws-sdk/fetch-http-handler": "3.127.0",
25
+ "@aws-sdk/hash-node": "3.127.0",
26
+ "@aws-sdk/invalid-dependency": "3.127.0",
27
+ "@aws-sdk/middleware-content-length": "3.127.0",
28
+ "@aws-sdk/middleware-host-header": "3.127.0",
29
+ "@aws-sdk/middleware-logger": "3.127.0",
30
+ "@aws-sdk/middleware-recursion-detection": "3.127.0",
31
+ "@aws-sdk/middleware-retry": "3.127.0",
32
+ "@aws-sdk/middleware-serde": "3.127.0",
33
+ "@aws-sdk/middleware-signing": "3.128.0",
34
+ "@aws-sdk/middleware-stack": "3.127.0",
35
+ "@aws-sdk/middleware-user-agent": "3.127.0",
36
+ "@aws-sdk/node-config-provider": "3.127.0",
37
+ "@aws-sdk/node-http-handler": "3.127.0",
38
+ "@aws-sdk/protocol-http": "3.127.0",
39
+ "@aws-sdk/smithy-client": "3.127.0",
40
+ "@aws-sdk/types": "3.127.0",
41
+ "@aws-sdk/url-parser": "3.127.0",
42
42
  "@aws-sdk/util-base64-browser": "3.109.0",
43
43
  "@aws-sdk/util-base64-node": "3.55.0",
44
44
  "@aws-sdk/util-body-length-browser": "3.55.0",
45
45
  "@aws-sdk/util-body-length-node": "3.55.0",
46
- "@aws-sdk/util-defaults-mode-browser": "3.110.0",
47
- "@aws-sdk/util-defaults-mode-node": "3.110.0",
48
- "@aws-sdk/util-user-agent-browser": "3.110.0",
49
- "@aws-sdk/util-user-agent-node": "3.118.0",
46
+ "@aws-sdk/util-defaults-mode-browser": "3.127.0",
47
+ "@aws-sdk/util-defaults-mode-node": "3.128.0",
48
+ "@aws-sdk/util-user-agent-browser": "3.127.0",
49
+ "@aws-sdk/util-user-agent-node": "3.127.0",
50
50
  "@aws-sdk/util-utf8-browser": "3.109.0",
51
51
  "@aws-sdk/util-utf8-node": "3.109.0",
52
52
  "tslib": "^2.3.1"