@aws-sdk/client-sagemaker-edge 3.130.0 → 3.137.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,36 @@
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.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
7
+
8
+
9
+ ### Features
10
+
11
+ * **namespaces:** remove namespaces with only a log filter ([#3823](https://github.com/aws/aws-sdk-js-v3/issues/3823)) ([33e6822](https://github.com/aws/aws-sdk-js-v3/commit/33e68228fb64c53dd8f89e6be76dd5f46edc3cfd))
12
+
13
+
14
+
15
+
16
+
17
+ # [3.133.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.132.0...v3.133.0) (2022-07-19)
18
+
19
+
20
+ ### Features
21
+
22
+ * **client-sagemaker-edge:** Amazon SageMaker Edge Manager provides lightweight model deployment feature to deploy machine learning models on requested devices. ([316a691](https://github.com/aws/aws-sdk-js-v3/commit/316a691491232facc572b8482f9084355702bfbf))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
29
+
30
+ **Note:** Version bump only for package @aws-sdk/client-sagemaker-edge
31
+
32
+
33
+
34
+
35
+
6
36
  # [3.130.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.129.0...v3.130.0) (2022-07-14)
7
37
 
8
38
 
package/README.md CHANGED
@@ -26,16 +26,16 @@ using your favorite package manager:
26
26
 
27
27
  The AWS SDK is modulized by clients and commands.
28
28
  To send a request, you only need to import the `SagemakerEdgeClient` and
29
- the commands you need, for example `GetDeviceRegistrationCommand`:
29
+ the commands you need, for example `GetDeploymentsCommand`:
30
30
 
31
31
  ```js
32
32
  // ES5 example
33
- const { SagemakerEdgeClient, GetDeviceRegistrationCommand } = require("@aws-sdk/client-sagemaker-edge");
33
+ const { SagemakerEdgeClient, GetDeploymentsCommand } = require("@aws-sdk/client-sagemaker-edge");
34
34
  ```
35
35
 
36
36
  ```ts
37
37
  // ES6+ example
38
- import { SagemakerEdgeClient, GetDeviceRegistrationCommand } from "@aws-sdk/client-sagemaker-edge";
38
+ import { SagemakerEdgeClient, GetDeploymentsCommand } from "@aws-sdk/client-sagemaker-edge";
39
39
  ```
40
40
 
41
41
  ### Usage
@@ -54,7 +54,7 @@ const client = new SagemakerEdgeClient({ region: "REGION" });
54
54
  const params = {
55
55
  /** input parameters */
56
56
  };
57
- const command = new GetDeviceRegistrationCommand(params);
57
+ const command = new GetDeploymentsCommand(params);
58
58
  ```
59
59
 
60
60
  #### Async/await
@@ -133,7 +133,7 @@ const client = new AWS.SagemakerEdge({ region: "REGION" });
133
133
 
134
134
  // async/await.
135
135
  try {
136
- const data = await client.getDeviceRegistration(params);
136
+ const data = await client.getDeployments(params);
137
137
  // process data.
138
138
  } catch (error) {
139
139
  // error handling.
@@ -141,7 +141,7 @@ try {
141
141
 
142
142
  // Promises.
143
143
  client
144
- .getDeviceRegistration(params)
144
+ .getDeployments(params)
145
145
  .then((data) => {
146
146
  // process data.
147
147
  })
@@ -150,7 +150,7 @@ client
150
150
  });
151
151
 
152
152
  // callbacks.
153
- client.getDeviceRegistration(params, (err, data) => {
153
+ client.getDeployments(params, (err, data) => {
154
154
  // process err and data.
155
155
  });
156
156
  ```
@@ -1,10 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SagemakerEdge = void 0;
4
+ const GetDeploymentsCommand_1 = require("./commands/GetDeploymentsCommand");
4
5
  const GetDeviceRegistrationCommand_1 = require("./commands/GetDeviceRegistrationCommand");
5
6
  const SendHeartbeatCommand_1 = require("./commands/SendHeartbeatCommand");
6
7
  const SagemakerEdgeClient_1 = require("./SagemakerEdgeClient");
7
8
  class SagemakerEdge extends SagemakerEdgeClient_1.SagemakerEdgeClient {
9
+ getDeployments(args, optionsOrCb, cb) {
10
+ const command = new GetDeploymentsCommand_1.GetDeploymentsCommand(args);
11
+ if (typeof optionsOrCb === "function") {
12
+ this.send(command, optionsOrCb);
13
+ }
14
+ else if (typeof cb === "function") {
15
+ if (typeof optionsOrCb !== "object")
16
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
17
+ this.send(command, optionsOrCb || {}, cb);
18
+ }
19
+ else {
20
+ return this.send(command, optionsOrCb);
21
+ }
22
+ }
8
23
  getDeviceRegistration(args, optionsOrCb, cb) {
9
24
  const command = new GetDeviceRegistrationCommand_1.GetDeviceRegistrationCommand(args);
10
25
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetDeploymentsCommand = void 0;
4
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class GetDeploymentsCommand extends smithy_client_1.Command {
9
+ constructor(input) {
10
+ super();
11
+ this.input = input;
12
+ }
13
+ resolveMiddleware(clientStack, configuration, options) {
14
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
15
+ const stack = clientStack.concat(this.middlewareStack);
16
+ const { logger } = configuration;
17
+ const clientName = "SagemakerEdgeClient";
18
+ const commandName = "GetDeploymentsCommand";
19
+ const handlerExecutionContext = {
20
+ logger,
21
+ clientName,
22
+ commandName,
23
+ inputFilterSensitiveLog: models_0_1.GetDeploymentsRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.GetDeploymentsResultFilterSensitiveLog,
25
+ };
26
+ const { requestHandler } = configuration;
27
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
28
+ }
29
+ serialize(input, context) {
30
+ return (0, Aws_restJson1_1.serializeAws_restJson1GetDeploymentsCommand)(input, context);
31
+ }
32
+ deserialize(output, context) {
33
+ return (0, Aws_restJson1_1.deserializeAws_restJson1GetDeploymentsCommand)(output, context);
34
+ }
35
+ }
36
+ exports.GetDeploymentsCommand = GetDeploymentsCommand;
@@ -20,8 +20,8 @@ class GetDeviceRegistrationCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.GetDeviceRegistrationRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: models_0_1.GetDeviceRegistrationResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.GetDeviceRegistrationRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: models_0_1.GetDeviceRegistrationResultFilterSensitiveLog,
25
25
  };
26
26
  const { requestHandler } = configuration;
27
27
  return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
@@ -20,7 +20,7 @@ class SendHeartbeatCommand extends smithy_client_1.Command {
20
20
  logger,
21
21
  clientName,
22
22
  commandName,
23
- inputFilterSensitiveLog: models_0_1.SendHeartbeatRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: models_0_1.SendHeartbeatRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: (output) => output,
25
25
  };
26
26
  const { requestHandler } = configuration;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./GetDeploymentsCommand"), exports);
4
5
  tslib_1.__exportStar(require("./GetDeviceRegistrationCommand"), exports);
5
6
  tslib_1.__exportStar(require("./SendHeartbeatCommand"), exports);
@@ -1,19 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SendHeartbeatRequest = exports.Model = exports.EdgeMetric = exports.InternalServiceException = exports.GetDeviceRegistrationResult = exports.GetDeviceRegistrationRequest = void 0;
3
+ exports.SendHeartbeatRequestFilterSensitiveLog = exports.ModelFilterSensitiveLog = exports.DeploymentResultFilterSensitiveLog = exports.DeploymentModelFilterSensitiveLog = exports.EdgeMetricFilterSensitiveLog = exports.GetDeviceRegistrationResultFilterSensitiveLog = exports.GetDeviceRegistrationRequestFilterSensitiveLog = exports.GetDeploymentsResultFilterSensitiveLog = exports.EdgeDeploymentFilterSensitiveLog = exports.DefinitionFilterSensitiveLog = exports.ChecksumFilterSensitiveLog = exports.GetDeploymentsRequestFilterSensitiveLog = exports.DeploymentStatus = exports.InternalServiceException = exports.DeploymentType = exports.FailureHandlingPolicy = exports.ModelState = exports.ChecksumType = void 0;
4
4
  const SagemakerEdgeServiceException_1 = require("./SagemakerEdgeServiceException");
5
- var GetDeviceRegistrationRequest;
6
- (function (GetDeviceRegistrationRequest) {
7
- GetDeviceRegistrationRequest.filterSensitiveLog = (obj) => ({
8
- ...obj,
9
- });
10
- })(GetDeviceRegistrationRequest = exports.GetDeviceRegistrationRequest || (exports.GetDeviceRegistrationRequest = {}));
11
- var GetDeviceRegistrationResult;
12
- (function (GetDeviceRegistrationResult) {
13
- GetDeviceRegistrationResult.filterSensitiveLog = (obj) => ({
14
- ...obj,
15
- });
16
- })(GetDeviceRegistrationResult = exports.GetDeviceRegistrationResult || (exports.GetDeviceRegistrationResult = {}));
5
+ var ChecksumType;
6
+ (function (ChecksumType) {
7
+ ChecksumType["Sha1"] = "SHA1";
8
+ })(ChecksumType = exports.ChecksumType || (exports.ChecksumType = {}));
9
+ var ModelState;
10
+ (function (ModelState) {
11
+ ModelState["Deploy"] = "DEPLOY";
12
+ ModelState["Undeploy"] = "UNDEPLOY";
13
+ })(ModelState = exports.ModelState || (exports.ModelState = {}));
14
+ var FailureHandlingPolicy;
15
+ (function (FailureHandlingPolicy) {
16
+ FailureHandlingPolicy["DoNothing"] = "DO_NOTHING";
17
+ FailureHandlingPolicy["RollbackOnFailure"] = "ROLLBACK_ON_FAILURE";
18
+ })(FailureHandlingPolicy = exports.FailureHandlingPolicy || (exports.FailureHandlingPolicy = {}));
19
+ var DeploymentType;
20
+ (function (DeploymentType) {
21
+ DeploymentType["Model"] = "Model";
22
+ })(DeploymentType = exports.DeploymentType || (exports.DeploymentType = {}));
17
23
  class InternalServiceException extends SagemakerEdgeServiceException_1.SagemakerEdgeServiceException {
18
24
  constructor(opts) {
19
25
  super({
@@ -28,21 +34,56 @@ class InternalServiceException extends SagemakerEdgeServiceException_1.Sagemaker
28
34
  }
29
35
  }
30
36
  exports.InternalServiceException = InternalServiceException;
31
- var EdgeMetric;
32
- (function (EdgeMetric) {
33
- EdgeMetric.filterSensitiveLog = (obj) => ({
34
- ...obj,
35
- });
36
- })(EdgeMetric = exports.EdgeMetric || (exports.EdgeMetric = {}));
37
- var Model;
38
- (function (Model) {
39
- Model.filterSensitiveLog = (obj) => ({
40
- ...obj,
41
- });
42
- })(Model = exports.Model || (exports.Model = {}));
43
- var SendHeartbeatRequest;
44
- (function (SendHeartbeatRequest) {
45
- SendHeartbeatRequest.filterSensitiveLog = (obj) => ({
46
- ...obj,
47
- });
48
- })(SendHeartbeatRequest = exports.SendHeartbeatRequest || (exports.SendHeartbeatRequest = {}));
37
+ var DeploymentStatus;
38
+ (function (DeploymentStatus) {
39
+ DeploymentStatus["Fail"] = "FAIL";
40
+ DeploymentStatus["Success"] = "SUCCESS";
41
+ })(DeploymentStatus = exports.DeploymentStatus || (exports.DeploymentStatus = {}));
42
+ const GetDeploymentsRequestFilterSensitiveLog = (obj) => ({
43
+ ...obj,
44
+ });
45
+ exports.GetDeploymentsRequestFilterSensitiveLog = GetDeploymentsRequestFilterSensitiveLog;
46
+ const ChecksumFilterSensitiveLog = (obj) => ({
47
+ ...obj,
48
+ });
49
+ exports.ChecksumFilterSensitiveLog = ChecksumFilterSensitiveLog;
50
+ const DefinitionFilterSensitiveLog = (obj) => ({
51
+ ...obj,
52
+ });
53
+ exports.DefinitionFilterSensitiveLog = DefinitionFilterSensitiveLog;
54
+ const EdgeDeploymentFilterSensitiveLog = (obj) => ({
55
+ ...obj,
56
+ });
57
+ exports.EdgeDeploymentFilterSensitiveLog = EdgeDeploymentFilterSensitiveLog;
58
+ const GetDeploymentsResultFilterSensitiveLog = (obj) => ({
59
+ ...obj,
60
+ });
61
+ exports.GetDeploymentsResultFilterSensitiveLog = GetDeploymentsResultFilterSensitiveLog;
62
+ const GetDeviceRegistrationRequestFilterSensitiveLog = (obj) => ({
63
+ ...obj,
64
+ });
65
+ exports.GetDeviceRegistrationRequestFilterSensitiveLog = GetDeviceRegistrationRequestFilterSensitiveLog;
66
+ const GetDeviceRegistrationResultFilterSensitiveLog = (obj) => ({
67
+ ...obj,
68
+ });
69
+ exports.GetDeviceRegistrationResultFilterSensitiveLog = GetDeviceRegistrationResultFilterSensitiveLog;
70
+ const EdgeMetricFilterSensitiveLog = (obj) => ({
71
+ ...obj,
72
+ });
73
+ exports.EdgeMetricFilterSensitiveLog = EdgeMetricFilterSensitiveLog;
74
+ const DeploymentModelFilterSensitiveLog = (obj) => ({
75
+ ...obj,
76
+ });
77
+ exports.DeploymentModelFilterSensitiveLog = DeploymentModelFilterSensitiveLog;
78
+ const DeploymentResultFilterSensitiveLog = (obj) => ({
79
+ ...obj,
80
+ });
81
+ exports.DeploymentResultFilterSensitiveLog = DeploymentResultFilterSensitiveLog;
82
+ const ModelFilterSensitiveLog = (obj) => ({
83
+ ...obj,
84
+ });
85
+ exports.ModelFilterSensitiveLog = ModelFilterSensitiveLog;
86
+ const SendHeartbeatRequestFilterSensitiveLog = (obj) => ({
87
+ ...obj,
88
+ });
89
+ exports.SendHeartbeatRequestFilterSensitiveLog = SendHeartbeatRequestFilterSensitiveLog;
@@ -1,10 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1SendHeartbeatCommand = exports.deserializeAws_restJson1GetDeviceRegistrationCommand = exports.serializeAws_restJson1SendHeartbeatCommand = exports.serializeAws_restJson1GetDeviceRegistrationCommand = void 0;
3
+ exports.deserializeAws_restJson1SendHeartbeatCommand = exports.deserializeAws_restJson1GetDeviceRegistrationCommand = exports.deserializeAws_restJson1GetDeploymentsCommand = exports.serializeAws_restJson1SendHeartbeatCommand = exports.serializeAws_restJson1GetDeviceRegistrationCommand = exports.serializeAws_restJson1GetDeploymentsCommand = 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 models_0_1 = require("../models/models_0");
7
7
  const SagemakerEdgeServiceException_1 = require("../models/SagemakerEdgeServiceException");
8
+ const serializeAws_restJson1GetDeploymentsCommand = async (input, context) => {
9
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const headers = {
11
+ "content-type": "application/json",
12
+ };
13
+ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeployments";
14
+ let body;
15
+ body = JSON.stringify({
16
+ ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }),
17
+ ...(input.DeviceName != null && { DeviceName: input.DeviceName }),
18
+ });
19
+ return new protocol_http_1.HttpRequest({
20
+ protocol,
21
+ hostname,
22
+ port,
23
+ method: "POST",
24
+ headers,
25
+ path: resolvedPath,
26
+ body,
27
+ });
28
+ };
29
+ exports.serializeAws_restJson1GetDeploymentsCommand = serializeAws_restJson1GetDeploymentsCommand;
8
30
  const serializeAws_restJson1GetDeviceRegistrationCommand = async (input, context) => {
9
31
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
32
  const headers = {
@@ -37,6 +59,9 @@ const serializeAws_restJson1SendHeartbeatCommand = async (input, context) => {
37
59
  body = JSON.stringify({
38
60
  ...(input.AgentMetrics != null && { AgentMetrics: serializeAws_restJson1EdgeMetrics(input.AgentMetrics, context) }),
39
61
  ...(input.AgentVersion != null && { AgentVersion: input.AgentVersion }),
62
+ ...(input.DeploymentResult != null && {
63
+ DeploymentResult: serializeAws_restJson1DeploymentResult(input.DeploymentResult, context),
64
+ }),
40
65
  ...(input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName }),
41
66
  ...(input.DeviceName != null && { DeviceName: input.DeviceName }),
42
67
  ...(input.Models != null && { Models: serializeAws_restJson1Models(input.Models, context) }),
@@ -52,6 +77,44 @@ const serializeAws_restJson1SendHeartbeatCommand = async (input, context) => {
52
77
  });
53
78
  };
54
79
  exports.serializeAws_restJson1SendHeartbeatCommand = serializeAws_restJson1SendHeartbeatCommand;
80
+ const deserializeAws_restJson1GetDeploymentsCommand = async (output, context) => {
81
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
82
+ return deserializeAws_restJson1GetDeploymentsCommandError(output, context);
83
+ }
84
+ const contents = {
85
+ $metadata: deserializeMetadata(output),
86
+ Deployments: undefined,
87
+ };
88
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
89
+ if (data.Deployments !== undefined && data.Deployments !== null) {
90
+ contents.Deployments = deserializeAws_restJson1EdgeDeployments(data.Deployments, context);
91
+ }
92
+ return Promise.resolve(contents);
93
+ };
94
+ exports.deserializeAws_restJson1GetDeploymentsCommand = deserializeAws_restJson1GetDeploymentsCommand;
95
+ const deserializeAws_restJson1GetDeploymentsCommandError = async (output, context) => {
96
+ const parsedOutput = {
97
+ ...output,
98
+ body: await parseBody(output.body, context),
99
+ };
100
+ let response;
101
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
102
+ switch (errorCode) {
103
+ case "InternalServiceException":
104
+ case "com.amazonaws.sagemakeredge#InternalServiceException":
105
+ throw await deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context);
106
+ default:
107
+ const parsedBody = parsedOutput.body;
108
+ const $metadata = deserializeMetadata(output);
109
+ const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
110
+ response = new SagemakerEdgeServiceException_1.SagemakerEdgeServiceException({
111
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
112
+ $fault: "client",
113
+ $metadata,
114
+ });
115
+ throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
116
+ }
117
+ };
55
118
  const deserializeAws_restJson1GetDeviceRegistrationCommand = async (output, context) => {
56
119
  if (output.statusCode !== 200 && output.statusCode >= 300) {
57
120
  return deserializeAws_restJson1GetDeviceRegistrationCommandError(output, context);
@@ -140,6 +203,42 @@ const deserializeAws_restJson1InternalServiceExceptionResponse = async (parsedOu
140
203
  });
141
204
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
142
205
  };
206
+ const serializeAws_restJson1DeploymentModel = (input, context) => {
207
+ return {
208
+ ...(input.DesiredState != null && { DesiredState: input.DesiredState }),
209
+ ...(input.ModelHandle != null && { ModelHandle: input.ModelHandle }),
210
+ ...(input.ModelName != null && { ModelName: input.ModelName }),
211
+ ...(input.ModelVersion != null && { ModelVersion: input.ModelVersion }),
212
+ ...(input.RollbackFailureReason != null && { RollbackFailureReason: input.RollbackFailureReason }),
213
+ ...(input.State != null && { State: input.State }),
214
+ ...(input.Status != null && { Status: input.Status }),
215
+ ...(input.StatusReason != null && { StatusReason: input.StatusReason }),
216
+ };
217
+ };
218
+ const serializeAws_restJson1DeploymentModels = (input, context) => {
219
+ return input
220
+ .filter((e) => e != null)
221
+ .map((entry) => {
222
+ if (entry === null) {
223
+ return null;
224
+ }
225
+ return serializeAws_restJson1DeploymentModel(entry, context);
226
+ });
227
+ };
228
+ const serializeAws_restJson1DeploymentResult = (input, context) => {
229
+ return {
230
+ ...(input.DeploymentEndTime != null && { DeploymentEndTime: Math.round(input.DeploymentEndTime.getTime() / 1000) }),
231
+ ...(input.DeploymentModels != null && {
232
+ DeploymentModels: serializeAws_restJson1DeploymentModels(input.DeploymentModels, context),
233
+ }),
234
+ ...(input.DeploymentName != null && { DeploymentName: input.DeploymentName }),
235
+ ...(input.DeploymentStartTime != null && {
236
+ DeploymentStartTime: Math.round(input.DeploymentStartTime.getTime() / 1000),
237
+ }),
238
+ ...(input.DeploymentStatus != null && { DeploymentStatus: input.DeploymentStatus }),
239
+ ...(input.DeploymentStatusMessage != null && { DeploymentStatusMessage: input.DeploymentStatusMessage }),
240
+ };
241
+ };
143
242
  const serializeAws_restJson1EdgeMetric = (input, context) => {
144
243
  return {
145
244
  ...(input.Dimension != null && { Dimension: input.Dimension }),
@@ -177,6 +276,50 @@ const serializeAws_restJson1Models = (input, context) => {
177
276
  return serializeAws_restJson1Model(entry, context);
178
277
  });
179
278
  };
279
+ const deserializeAws_restJson1Checksum = (output, context) => {
280
+ return {
281
+ Sum: (0, smithy_client_1.expectString)(output.Sum),
282
+ Type: (0, smithy_client_1.expectString)(output.Type),
283
+ };
284
+ };
285
+ const deserializeAws_restJson1Definition = (output, context) => {
286
+ return {
287
+ Checksum: output.Checksum != null ? deserializeAws_restJson1Checksum(output.Checksum, context) : undefined,
288
+ ModelHandle: (0, smithy_client_1.expectString)(output.ModelHandle),
289
+ S3Url: (0, smithy_client_1.expectString)(output.S3Url),
290
+ State: (0, smithy_client_1.expectString)(output.State),
291
+ };
292
+ };
293
+ const deserializeAws_restJson1Definitions = (output, context) => {
294
+ const retVal = (output || [])
295
+ .filter((e) => e != null)
296
+ .map((entry) => {
297
+ if (entry === null) {
298
+ return null;
299
+ }
300
+ return deserializeAws_restJson1Definition(entry, context);
301
+ });
302
+ return retVal;
303
+ };
304
+ const deserializeAws_restJson1EdgeDeployment = (output, context) => {
305
+ return {
306
+ Definitions: output.Definitions != null ? deserializeAws_restJson1Definitions(output.Definitions, context) : undefined,
307
+ DeploymentName: (0, smithy_client_1.expectString)(output.DeploymentName),
308
+ FailureHandlingPolicy: (0, smithy_client_1.expectString)(output.FailureHandlingPolicy),
309
+ Type: (0, smithy_client_1.expectString)(output.Type),
310
+ };
311
+ };
312
+ const deserializeAws_restJson1EdgeDeployments = (output, context) => {
313
+ const retVal = (output || [])
314
+ .filter((e) => e != null)
315
+ .map((entry) => {
316
+ if (entry === null) {
317
+ return null;
318
+ }
319
+ return deserializeAws_restJson1EdgeDeployment(entry, context);
320
+ });
321
+ return retVal;
322
+ };
180
323
  const deserializeMetadata = (output) => {
181
324
  var _a;
182
325
  return ({
@@ -1,4 +1,5 @@
1
1
  import { __extends } from "tslib";
2
+ import { GetDeploymentsCommand, } from "./commands/GetDeploymentsCommand";
2
3
  import { GetDeviceRegistrationCommand, } from "./commands/GetDeviceRegistrationCommand";
3
4
  import { SendHeartbeatCommand, } from "./commands/SendHeartbeatCommand";
4
5
  import { SagemakerEdgeClient } from "./SagemakerEdgeClient";
@@ -7,6 +8,20 @@ var SagemakerEdge = (function (_super) {
7
8
  function SagemakerEdge() {
8
9
  return _super !== null && _super.apply(this, arguments) || this;
9
10
  }
11
+ SagemakerEdge.prototype.getDeployments = function (args, optionsOrCb, cb) {
12
+ var command = new GetDeploymentsCommand(args);
13
+ if (typeof optionsOrCb === "function") {
14
+ this.send(command, optionsOrCb);
15
+ }
16
+ else if (typeof cb === "function") {
17
+ if (typeof optionsOrCb !== "object")
18
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
19
+ this.send(command, optionsOrCb || {}, cb);
20
+ }
21
+ else {
22
+ return this.send(command, optionsOrCb);
23
+ }
24
+ };
10
25
  SagemakerEdge.prototype.getDeviceRegistration = function (args, optionsOrCb, cb) {
11
26
  var command = new GetDeviceRegistrationCommand(args);
12
27
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { GetDeploymentsRequestFilterSensitiveLog, GetDeploymentsResultFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_restJson1GetDeploymentsCommand, serializeAws_restJson1GetDeploymentsCommand, } from "../protocols/Aws_restJson1";
6
+ var GetDeploymentsCommand = (function (_super) {
7
+ __extends(GetDeploymentsCommand, _super);
8
+ function GetDeploymentsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ GetDeploymentsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "SagemakerEdgeClient";
18
+ var commandName = "GetDeploymentsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: GetDeploymentsRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: GetDeploymentsResultFilterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ GetDeploymentsCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1GetDeploymentsCommand(input, context);
33
+ };
34
+ GetDeploymentsCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1GetDeploymentsCommand(output, context);
36
+ };
37
+ return GetDeploymentsCommand;
38
+ }($Command));
39
+ export { GetDeploymentsCommand };
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { GetDeviceRegistrationRequest, GetDeviceRegistrationResult } from "../models/models_0";
4
+ import { GetDeviceRegistrationRequestFilterSensitiveLog, GetDeviceRegistrationResultFilterSensitiveLog, } from "../models/models_0";
5
5
  import { deserializeAws_restJson1GetDeviceRegistrationCommand, serializeAws_restJson1GetDeviceRegistrationCommand, } from "../protocols/Aws_restJson1";
6
6
  var GetDeviceRegistrationCommand = (function (_super) {
7
7
  __extends(GetDeviceRegistrationCommand, _super);
@@ -20,8 +20,8 @@ var GetDeviceRegistrationCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: GetDeviceRegistrationRequest.filterSensitiveLog,
24
- outputFilterSensitiveLog: GetDeviceRegistrationResult.filterSensitiveLog,
23
+ inputFilterSensitiveLog: GetDeviceRegistrationRequestFilterSensitiveLog,
24
+ outputFilterSensitiveLog: GetDeviceRegistrationResultFilterSensitiveLog,
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
27
27
  return stack.resolve(function (request) {
@@ -1,7 +1,7 @@
1
1
  import { __extends } from "tslib";
2
2
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
3
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import { SendHeartbeatRequest } from "../models/models_0";
4
+ import { SendHeartbeatRequestFilterSensitiveLog } from "../models/models_0";
5
5
  import { deserializeAws_restJson1SendHeartbeatCommand, serializeAws_restJson1SendHeartbeatCommand, } from "../protocols/Aws_restJson1";
6
6
  var SendHeartbeatCommand = (function (_super) {
7
7
  __extends(SendHeartbeatCommand, _super);
@@ -20,7 +20,7 @@ var SendHeartbeatCommand = (function (_super) {
20
20
  logger: logger,
21
21
  clientName: clientName,
22
22
  commandName: commandName,
23
- inputFilterSensitiveLog: SendHeartbeatRequest.filterSensitiveLog,
23
+ inputFilterSensitiveLog: SendHeartbeatRequestFilterSensitiveLog,
24
24
  outputFilterSensitiveLog: function (output) { return output; },
25
25
  };
26
26
  var requestHandler = configuration.requestHandler;
@@ -1,2 +1,3 @@
1
+ export * from "./GetDeploymentsCommand";
1
2
  export * from "./GetDeviceRegistrationCommand";
2
3
  export * from "./SendHeartbeatCommand";