@aws-sdk/client-sagemaker-edge 3.312.0 → 3.315.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.
|
@@ -12,10 +12,10 @@ const se_GetDeploymentsCommand = async (input, context) => {
|
|
|
12
12
|
};
|
|
13
13
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeployments";
|
|
14
14
|
let body;
|
|
15
|
-
body = JSON.stringify({
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
15
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
+
DeviceFleetName: [],
|
|
17
|
+
DeviceName: [],
|
|
18
|
+
}));
|
|
19
19
|
return new protocol_http_1.HttpRequest({
|
|
20
20
|
protocol,
|
|
21
21
|
hostname,
|
|
@@ -34,10 +34,10 @@ const se_GetDeviceRegistrationCommand = async (input, context) => {
|
|
|
34
34
|
};
|
|
35
35
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeviceRegistration";
|
|
36
36
|
let body;
|
|
37
|
-
body = JSON.stringify({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
37
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
38
|
+
DeviceFleetName: [],
|
|
39
|
+
DeviceName: [],
|
|
40
|
+
}));
|
|
41
41
|
return new protocol_http_1.HttpRequest({
|
|
42
42
|
protocol,
|
|
43
43
|
hostname,
|
|
@@ -56,14 +56,14 @@ const se_SendHeartbeatCommand = async (input, context) => {
|
|
|
56
56
|
};
|
|
57
57
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SendHeartbeat";
|
|
58
58
|
let body;
|
|
59
|
-
body = JSON.stringify({
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
59
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
60
|
+
AgentMetrics: (_) => se_EdgeMetrics(_, context),
|
|
61
|
+
AgentVersion: [],
|
|
62
|
+
DeploymentResult: (_) => se_DeploymentResult(_, context),
|
|
63
|
+
DeviceFleetName: [],
|
|
64
|
+
DeviceName: [],
|
|
65
|
+
Models: (_) => se_Models(_, context),
|
|
66
|
+
}));
|
|
67
67
|
return new protocol_http_1.HttpRequest({
|
|
68
68
|
protocol,
|
|
69
69
|
hostname,
|
|
@@ -79,13 +79,14 @@ const de_GetDeploymentsCommand = async (output, context) => {
|
|
|
79
79
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
80
80
|
return de_GetDeploymentsCommandError(output, context);
|
|
81
81
|
}
|
|
82
|
-
const contents = map({
|
|
82
|
+
const contents = (0, smithy_client_1.map)({
|
|
83
83
|
$metadata: deserializeMetadata(output),
|
|
84
84
|
});
|
|
85
85
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
86
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
87
|
+
Deployments: smithy_client_1._json,
|
|
88
|
+
});
|
|
89
|
+
Object.assign(contents, doc);
|
|
89
90
|
return contents;
|
|
90
91
|
};
|
|
91
92
|
exports.de_GetDeploymentsCommand = de_GetDeploymentsCommand;
|
|
@@ -101,10 +102,9 @@ const de_GetDeploymentsCommandError = async (output, context) => {
|
|
|
101
102
|
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
102
103
|
default:
|
|
103
104
|
const parsedBody = parsedOutput.body;
|
|
104
|
-
|
|
105
|
+
return throwDefaultError({
|
|
105
106
|
output,
|
|
106
107
|
parsedBody,
|
|
107
|
-
exceptionCtor: SagemakerEdgeServiceException_1.SagemakerEdgeServiceException,
|
|
108
108
|
errorCode,
|
|
109
109
|
});
|
|
110
110
|
}
|
|
@@ -113,16 +113,15 @@ const de_GetDeviceRegistrationCommand = async (output, context) => {
|
|
|
113
113
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
114
114
|
return de_GetDeviceRegistrationCommandError(output, context);
|
|
115
115
|
}
|
|
116
|
-
const contents = map({
|
|
116
|
+
const contents = (0, smithy_client_1.map)({
|
|
117
117
|
$metadata: deserializeMetadata(output),
|
|
118
118
|
});
|
|
119
119
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
120
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
121
|
+
CacheTTL: smithy_client_1.expectString,
|
|
122
|
+
DeviceRegistration: smithy_client_1.expectString,
|
|
123
|
+
});
|
|
124
|
+
Object.assign(contents, doc);
|
|
126
125
|
return contents;
|
|
127
126
|
};
|
|
128
127
|
exports.de_GetDeviceRegistrationCommand = de_GetDeviceRegistrationCommand;
|
|
@@ -138,10 +137,9 @@ const de_GetDeviceRegistrationCommandError = async (output, context) => {
|
|
|
138
137
|
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
139
138
|
default:
|
|
140
139
|
const parsedBody = parsedOutput.body;
|
|
141
|
-
|
|
140
|
+
return throwDefaultError({
|
|
142
141
|
output,
|
|
143
142
|
parsedBody,
|
|
144
|
-
exceptionCtor: SagemakerEdgeServiceException_1.SagemakerEdgeServiceException,
|
|
145
143
|
errorCode,
|
|
146
144
|
});
|
|
147
145
|
}
|
|
@@ -150,7 +148,7 @@ const de_SendHeartbeatCommand = async (output, context) => {
|
|
|
150
148
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
151
149
|
return de_SendHeartbeatCommandError(output, context);
|
|
152
150
|
}
|
|
153
|
-
const contents = map({
|
|
151
|
+
const contents = (0, smithy_client_1.map)({
|
|
154
152
|
$metadata: deserializeMetadata(output),
|
|
155
153
|
});
|
|
156
154
|
await collectBody(output.body, context);
|
|
@@ -169,65 +167,44 @@ const de_SendHeartbeatCommandError = async (output, context) => {
|
|
|
169
167
|
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
170
168
|
default:
|
|
171
169
|
const parsedBody = parsedOutput.body;
|
|
172
|
-
|
|
170
|
+
return throwDefaultError({
|
|
173
171
|
output,
|
|
174
172
|
parsedBody,
|
|
175
|
-
exceptionCtor: SagemakerEdgeServiceException_1.SagemakerEdgeServiceException,
|
|
176
173
|
errorCode,
|
|
177
174
|
});
|
|
178
175
|
}
|
|
179
176
|
};
|
|
180
|
-
const
|
|
177
|
+
const throwDefaultError = (0, smithy_client_1.withBaseException)(SagemakerEdgeServiceException_1.SagemakerEdgeServiceException);
|
|
181
178
|
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
182
|
-
const contents = map({});
|
|
179
|
+
const contents = (0, smithy_client_1.map)({});
|
|
183
180
|
const data = parsedOutput.body;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
181
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
182
|
+
Message: smithy_client_1.expectString,
|
|
183
|
+
});
|
|
184
|
+
Object.assign(contents, doc);
|
|
187
185
|
const exception = new models_0_1.InternalServiceException({
|
|
188
186
|
$metadata: deserializeMetadata(parsedOutput),
|
|
189
187
|
...contents,
|
|
190
188
|
});
|
|
191
189
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
192
190
|
};
|
|
193
|
-
const se_DeploymentModel = (input, context) => {
|
|
194
|
-
return {
|
|
195
|
-
...(input.DesiredState != null && { DesiredState: input.DesiredState }),
|
|
196
|
-
...(input.ModelHandle != null && { ModelHandle: input.ModelHandle }),
|
|
197
|
-
...(input.ModelName != null && { ModelName: input.ModelName }),
|
|
198
|
-
...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }),
|
|
199
|
-
...(input.RollbackFailureReason != null && { RollbackFailureReason: input.RollbackFailureReason }),
|
|
200
|
-
...(input.State != null && { State: input.State }),
|
|
201
|
-
...(input.Status != null && { Status: input.Status }),
|
|
202
|
-
...(input.StatusReason != null && { StatusReason: input.StatusReason }),
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
const se_DeploymentModels = (input, context) => {
|
|
206
|
-
return input
|
|
207
|
-
.filter((e) => e != null)
|
|
208
|
-
.map((entry) => {
|
|
209
|
-
return se_DeploymentModel(entry, context);
|
|
210
|
-
});
|
|
211
|
-
};
|
|
212
191
|
const se_DeploymentResult = (input, context) => {
|
|
213
|
-
return {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
...(input.DeploymentStatusMessage != null && { DeploymentStatusMessage: input.DeploymentStatusMessage }),
|
|
222
|
-
};
|
|
192
|
+
return (0, smithy_client_1.take)(input, {
|
|
193
|
+
DeploymentEndTime: (_) => Math.round(_.getTime() / 1000),
|
|
194
|
+
DeploymentModels: smithy_client_1._json,
|
|
195
|
+
DeploymentName: [],
|
|
196
|
+
DeploymentStartTime: (_) => Math.round(_.getTime() / 1000),
|
|
197
|
+
DeploymentStatus: [],
|
|
198
|
+
DeploymentStatusMessage: [],
|
|
199
|
+
});
|
|
223
200
|
};
|
|
224
201
|
const se_EdgeMetric = (input, context) => {
|
|
225
|
-
return {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
};
|
|
202
|
+
return (0, smithy_client_1.take)(input, {
|
|
203
|
+
Dimension: [],
|
|
204
|
+
MetricName: [],
|
|
205
|
+
Timestamp: (_) => Math.round(_.getTime() / 1000),
|
|
206
|
+
Value: smithy_client_1.serializeFloat,
|
|
207
|
+
});
|
|
231
208
|
};
|
|
232
209
|
const se_EdgeMetrics = (input, context) => {
|
|
233
210
|
return input
|
|
@@ -237,13 +214,13 @@ const se_EdgeMetrics = (input, context) => {
|
|
|
237
214
|
});
|
|
238
215
|
};
|
|
239
216
|
const se_Model = (input, context) => {
|
|
240
|
-
return {
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
};
|
|
217
|
+
return (0, smithy_client_1.take)(input, {
|
|
218
|
+
LatestInference: (_) => Math.round(_.getTime() / 1000),
|
|
219
|
+
LatestSampleTime: (_) => Math.round(_.getTime() / 1000),
|
|
220
|
+
ModelMetrics: (_) => se_EdgeMetrics(_, context),
|
|
221
|
+
ModelName: [],
|
|
222
|
+
ModelVersion: [],
|
|
223
|
+
});
|
|
247
224
|
};
|
|
248
225
|
const se_Models = (input, context) => {
|
|
249
226
|
return input
|
|
@@ -252,50 +229,6 @@ const se_Models = (input, context) => {
|
|
|
252
229
|
return se_Model(entry, context);
|
|
253
230
|
});
|
|
254
231
|
};
|
|
255
|
-
const de_Checksum = (output, context) => {
|
|
256
|
-
return {
|
|
257
|
-
Sum: (0, smithy_client_1.expectString)(output.Sum),
|
|
258
|
-
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
const de_Definition = (output, context) => {
|
|
262
|
-
return {
|
|
263
|
-
Checksum: output.Checksum != null ? de_Checksum(output.Checksum, context) : undefined,
|
|
264
|
-
ModelHandle: (0, smithy_client_1.expectString)(output.ModelHandle),
|
|
265
|
-
S3Url: (0, smithy_client_1.expectString)(output.S3Url),
|
|
266
|
-
State: (0, smithy_client_1.expectString)(output.State),
|
|
267
|
-
};
|
|
268
|
-
};
|
|
269
|
-
const de_Definitions = (output, context) => {
|
|
270
|
-
const retVal = (output || [])
|
|
271
|
-
.filter((e) => e != null)
|
|
272
|
-
.map((entry) => {
|
|
273
|
-
if (entry === null) {
|
|
274
|
-
return null;
|
|
275
|
-
}
|
|
276
|
-
return de_Definition(entry, context);
|
|
277
|
-
});
|
|
278
|
-
return retVal;
|
|
279
|
-
};
|
|
280
|
-
const de_EdgeDeployment = (output, context) => {
|
|
281
|
-
return {
|
|
282
|
-
Definitions: output.Definitions != null ? de_Definitions(output.Definitions, context) : undefined,
|
|
283
|
-
DeploymentName: (0, smithy_client_1.expectString)(output.DeploymentName),
|
|
284
|
-
FailureHandlingPolicy: (0, smithy_client_1.expectString)(output.FailureHandlingPolicy),
|
|
285
|
-
Type: (0, smithy_client_1.expectString)(output.Type),
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
const de_EdgeDeployments = (output, context) => {
|
|
289
|
-
const retVal = (output || [])
|
|
290
|
-
.filter((e) => e != null)
|
|
291
|
-
.map((entry) => {
|
|
292
|
-
if (entry === null) {
|
|
293
|
-
return null;
|
|
294
|
-
}
|
|
295
|
-
return de_EdgeDeployment(entry, context);
|
|
296
|
-
});
|
|
297
|
-
return retVal;
|
|
298
|
-
};
|
|
299
232
|
const deserializeMetadata = (output) => ({
|
|
300
233
|
httpStatusCode: output.statusCode,
|
|
301
234
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
|
-
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map
|
|
3
|
-
import { InternalServiceException
|
|
2
|
+
import { _json, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { InternalServiceException } from "../models/models_0";
|
|
4
4
|
import { SagemakerEdgeServiceException as __BaseException } from "../models/SagemakerEdgeServiceException";
|
|
5
5
|
export const se_GetDeploymentsCommand = async (input, context) => {
|
|
6
6
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -9,10 +9,10 @@ export const se_GetDeploymentsCommand = async (input, context) => {
|
|
|
9
9
|
};
|
|
10
10
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeployments";
|
|
11
11
|
let body;
|
|
12
|
-
body = JSON.stringify({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
12
|
+
body = JSON.stringify(take(input, {
|
|
13
|
+
DeviceFleetName: [],
|
|
14
|
+
DeviceName: [],
|
|
15
|
+
}));
|
|
16
16
|
return new __HttpRequest({
|
|
17
17
|
protocol,
|
|
18
18
|
hostname,
|
|
@@ -30,10 +30,10 @@ export const se_GetDeviceRegistrationCommand = async (input, context) => {
|
|
|
30
30
|
};
|
|
31
31
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeviceRegistration";
|
|
32
32
|
let body;
|
|
33
|
-
body = JSON.stringify({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
33
|
+
body = JSON.stringify(take(input, {
|
|
34
|
+
DeviceFleetName: [],
|
|
35
|
+
DeviceName: [],
|
|
36
|
+
}));
|
|
37
37
|
return new __HttpRequest({
|
|
38
38
|
protocol,
|
|
39
39
|
hostname,
|
|
@@ -51,14 +51,14 @@ export const se_SendHeartbeatCommand = async (input, context) => {
|
|
|
51
51
|
};
|
|
52
52
|
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SendHeartbeat";
|
|
53
53
|
let body;
|
|
54
|
-
body = JSON.stringify({
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
});
|
|
54
|
+
body = JSON.stringify(take(input, {
|
|
55
|
+
AgentMetrics: (_) => se_EdgeMetrics(_, context),
|
|
56
|
+
AgentVersion: [],
|
|
57
|
+
DeploymentResult: (_) => se_DeploymentResult(_, context),
|
|
58
|
+
DeviceFleetName: [],
|
|
59
|
+
DeviceName: [],
|
|
60
|
+
Models: (_) => se_Models(_, context),
|
|
61
|
+
}));
|
|
62
62
|
return new __HttpRequest({
|
|
63
63
|
protocol,
|
|
64
64
|
hostname,
|
|
@@ -77,9 +77,10 @@ export const de_GetDeploymentsCommand = async (output, context) => {
|
|
|
77
77
|
$metadata: deserializeMetadata(output),
|
|
78
78
|
});
|
|
79
79
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
80
|
+
const doc = take(data, {
|
|
81
|
+
Deployments: _json,
|
|
82
|
+
});
|
|
83
|
+
Object.assign(contents, doc);
|
|
83
84
|
return contents;
|
|
84
85
|
};
|
|
85
86
|
const de_GetDeploymentsCommandError = async (output, context) => {
|
|
@@ -94,10 +95,9 @@ const de_GetDeploymentsCommandError = async (output, context) => {
|
|
|
94
95
|
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
95
96
|
default:
|
|
96
97
|
const parsedBody = parsedOutput.body;
|
|
97
|
-
throwDefaultError({
|
|
98
|
+
return throwDefaultError({
|
|
98
99
|
output,
|
|
99
100
|
parsedBody,
|
|
100
|
-
exceptionCtor: __BaseException,
|
|
101
101
|
errorCode,
|
|
102
102
|
});
|
|
103
103
|
}
|
|
@@ -110,12 +110,11 @@ export const de_GetDeviceRegistrationCommand = async (output, context) => {
|
|
|
110
110
|
$metadata: deserializeMetadata(output),
|
|
111
111
|
});
|
|
112
112
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
113
|
+
const doc = take(data, {
|
|
114
|
+
CacheTTL: __expectString,
|
|
115
|
+
DeviceRegistration: __expectString,
|
|
116
|
+
});
|
|
117
|
+
Object.assign(contents, doc);
|
|
119
118
|
return contents;
|
|
120
119
|
};
|
|
121
120
|
const de_GetDeviceRegistrationCommandError = async (output, context) => {
|
|
@@ -130,10 +129,9 @@ const de_GetDeviceRegistrationCommandError = async (output, context) => {
|
|
|
130
129
|
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
131
130
|
default:
|
|
132
131
|
const parsedBody = parsedOutput.body;
|
|
133
|
-
throwDefaultError({
|
|
132
|
+
return throwDefaultError({
|
|
134
133
|
output,
|
|
135
134
|
parsedBody,
|
|
136
|
-
exceptionCtor: __BaseException,
|
|
137
135
|
errorCode,
|
|
138
136
|
});
|
|
139
137
|
}
|
|
@@ -160,65 +158,44 @@ const de_SendHeartbeatCommandError = async (output, context) => {
|
|
|
160
158
|
throw await de_InternalServiceExceptionRes(parsedOutput, context);
|
|
161
159
|
default:
|
|
162
160
|
const parsedBody = parsedOutput.body;
|
|
163
|
-
throwDefaultError({
|
|
161
|
+
return throwDefaultError({
|
|
164
162
|
output,
|
|
165
163
|
parsedBody,
|
|
166
|
-
exceptionCtor: __BaseException,
|
|
167
164
|
errorCode,
|
|
168
165
|
});
|
|
169
166
|
}
|
|
170
167
|
};
|
|
171
|
-
const
|
|
168
|
+
const throwDefaultError = withBaseException(__BaseException);
|
|
172
169
|
const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
|
|
173
170
|
const contents = map({});
|
|
174
171
|
const data = parsedOutput.body;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
172
|
+
const doc = take(data, {
|
|
173
|
+
Message: __expectString,
|
|
174
|
+
});
|
|
175
|
+
Object.assign(contents, doc);
|
|
178
176
|
const exception = new InternalServiceException({
|
|
179
177
|
$metadata: deserializeMetadata(parsedOutput),
|
|
180
178
|
...contents,
|
|
181
179
|
});
|
|
182
180
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
183
181
|
};
|
|
184
|
-
const se_DeploymentModel = (input, context) => {
|
|
185
|
-
return {
|
|
186
|
-
...(input.DesiredState != null && { DesiredState: input.DesiredState }),
|
|
187
|
-
...(input.ModelHandle != null && { ModelHandle: input.ModelHandle }),
|
|
188
|
-
...(input.ModelName != null && { ModelName: input.ModelName }),
|
|
189
|
-
...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }),
|
|
190
|
-
...(input.RollbackFailureReason != null && { RollbackFailureReason: input.RollbackFailureReason }),
|
|
191
|
-
...(input.State != null && { State: input.State }),
|
|
192
|
-
...(input.Status != null && { Status: input.Status }),
|
|
193
|
-
...(input.StatusReason != null && { StatusReason: input.StatusReason }),
|
|
194
|
-
};
|
|
195
|
-
};
|
|
196
|
-
const se_DeploymentModels = (input, context) => {
|
|
197
|
-
return input
|
|
198
|
-
.filter((e) => e != null)
|
|
199
|
-
.map((entry) => {
|
|
200
|
-
return se_DeploymentModel(entry, context);
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
182
|
const se_DeploymentResult = (input, context) => {
|
|
204
|
-
return {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
...(input.DeploymentStatusMessage != null && { DeploymentStatusMessage: input.DeploymentStatusMessage }),
|
|
213
|
-
};
|
|
183
|
+
return take(input, {
|
|
184
|
+
DeploymentEndTime: (_) => Math.round(_.getTime() / 1000),
|
|
185
|
+
DeploymentModels: _json,
|
|
186
|
+
DeploymentName: [],
|
|
187
|
+
DeploymentStartTime: (_) => Math.round(_.getTime() / 1000),
|
|
188
|
+
DeploymentStatus: [],
|
|
189
|
+
DeploymentStatusMessage: [],
|
|
190
|
+
});
|
|
214
191
|
};
|
|
215
192
|
const se_EdgeMetric = (input, context) => {
|
|
216
|
-
return {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
};
|
|
193
|
+
return take(input, {
|
|
194
|
+
Dimension: [],
|
|
195
|
+
MetricName: [],
|
|
196
|
+
Timestamp: (_) => Math.round(_.getTime() / 1000),
|
|
197
|
+
Value: __serializeFloat,
|
|
198
|
+
});
|
|
222
199
|
};
|
|
223
200
|
const se_EdgeMetrics = (input, context) => {
|
|
224
201
|
return input
|
|
@@ -228,13 +205,13 @@ const se_EdgeMetrics = (input, context) => {
|
|
|
228
205
|
});
|
|
229
206
|
};
|
|
230
207
|
const se_Model = (input, context) => {
|
|
231
|
-
return {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
};
|
|
208
|
+
return take(input, {
|
|
209
|
+
LatestInference: (_) => Math.round(_.getTime() / 1000),
|
|
210
|
+
LatestSampleTime: (_) => Math.round(_.getTime() / 1000),
|
|
211
|
+
ModelMetrics: (_) => se_EdgeMetrics(_, context),
|
|
212
|
+
ModelName: [],
|
|
213
|
+
ModelVersion: [],
|
|
214
|
+
});
|
|
238
215
|
};
|
|
239
216
|
const se_Models = (input, context) => {
|
|
240
217
|
return input
|
|
@@ -243,50 +220,6 @@ const se_Models = (input, context) => {
|
|
|
243
220
|
return se_Model(entry, context);
|
|
244
221
|
});
|
|
245
222
|
};
|
|
246
|
-
const de_Checksum = (output, context) => {
|
|
247
|
-
return {
|
|
248
|
-
Sum: __expectString(output.Sum),
|
|
249
|
-
Type: __expectString(output.Type),
|
|
250
|
-
};
|
|
251
|
-
};
|
|
252
|
-
const de_Definition = (output, context) => {
|
|
253
|
-
return {
|
|
254
|
-
Checksum: output.Checksum != null ? de_Checksum(output.Checksum, context) : undefined,
|
|
255
|
-
ModelHandle: __expectString(output.ModelHandle),
|
|
256
|
-
S3Url: __expectString(output.S3Url),
|
|
257
|
-
State: __expectString(output.State),
|
|
258
|
-
};
|
|
259
|
-
};
|
|
260
|
-
const de_Definitions = (output, context) => {
|
|
261
|
-
const retVal = (output || [])
|
|
262
|
-
.filter((e) => e != null)
|
|
263
|
-
.map((entry) => {
|
|
264
|
-
if (entry === null) {
|
|
265
|
-
return null;
|
|
266
|
-
}
|
|
267
|
-
return de_Definition(entry, context);
|
|
268
|
-
});
|
|
269
|
-
return retVal;
|
|
270
|
-
};
|
|
271
|
-
const de_EdgeDeployment = (output, context) => {
|
|
272
|
-
return {
|
|
273
|
-
Definitions: output.Definitions != null ? de_Definitions(output.Definitions, context) : undefined,
|
|
274
|
-
DeploymentName: __expectString(output.DeploymentName),
|
|
275
|
-
FailureHandlingPolicy: __expectString(output.FailureHandlingPolicy),
|
|
276
|
-
Type: __expectString(output.Type),
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
const de_EdgeDeployments = (output, context) => {
|
|
280
|
-
const retVal = (output || [])
|
|
281
|
-
.filter((e) => e != null)
|
|
282
|
-
.map((entry) => {
|
|
283
|
-
if (entry === null) {
|
|
284
|
-
return null;
|
|
285
|
-
}
|
|
286
|
-
return de_EdgeDeployment(entry, context);
|
|
287
|
-
});
|
|
288
|
-
return retVal;
|
|
289
|
-
};
|
|
290
223
|
const deserializeMetadata = (output) => ({
|
|
291
224
|
httpStatusCode: output.statusCode,
|
|
292
225
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
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.
|
|
4
|
+
"version": "3.315.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,9 +21,9 @@
|
|
|
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.
|
|
24
|
+
"@aws-sdk/client-sts": "3.315.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.315.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.315.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.315.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.315.0",
|
|
51
51
|
"@aws-sdk/util-endpoints": "3.310.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|