@aws-sdk/client-sagemaker-edge 3.128.0 → 3.133.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.
@@ -1,8 +1,32 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
3
  import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
4
- import { InternalServiceException } from "../models/models_0";
4
+ import { InternalServiceException, } from "../models/models_0";
5
5
  import { SagemakerEdgeServiceException as __BaseException } from "../models/SagemakerEdgeServiceException";
6
+ export var serializeAws_restJson1GetDeploymentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
8
+ return __generator(this, function (_c) {
9
+ switch (_c.label) {
10
+ case 0: return [4, context.endpoint()];
11
+ case 1:
12
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
13
+ headers = {
14
+ "content-type": "application/json",
15
+ };
16
+ resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/GetDeployments";
17
+ body = JSON.stringify(__assign(__assign({}, (input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName })), (input.DeviceName != null && { DeviceName: input.DeviceName })));
18
+ return [2, new __HttpRequest({
19
+ protocol: protocol,
20
+ hostname: hostname,
21
+ port: port,
22
+ method: "POST",
23
+ headers: headers,
24
+ path: resolvedPath,
25
+ body: body,
26
+ })];
27
+ }
28
+ });
29
+ }); };
6
30
  export var serializeAws_restJson1GetDeviceRegistrationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
31
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
8
32
  return __generator(this, function (_c) {
@@ -38,7 +62,9 @@ export var serializeAws_restJson1SendHeartbeatCommand = function (input, context
38
62
  "content-type": "application/json",
39
63
  };
40
64
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/SendHeartbeat";
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) })));
65
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AgentMetrics != null && { AgentMetrics: serializeAws_restJson1EdgeMetrics(input.AgentMetrics, context) })), (input.AgentVersion != null && { AgentVersion: input.AgentVersion })), (input.DeploymentResult != null && {
66
+ DeploymentResult: serializeAws_restJson1DeploymentResult(input.DeploymentResult, context),
67
+ })), (input.DeviceFleetName != null && { DeviceFleetName: input.DeviceFleetName })), (input.DeviceName != null && { DeviceName: input.DeviceName })), (input.Models != null && { Models: serializeAws_restJson1Models(input.Models, context) })));
42
68
  return [2, new __HttpRequest({
43
69
  protocol: protocol,
44
70
  hostname: hostname,
@@ -51,6 +77,63 @@ export var serializeAws_restJson1SendHeartbeatCommand = function (input, context
51
77
  }
52
78
  });
53
79
  }); };
80
+ export var deserializeAws_restJson1GetDeploymentsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
81
+ var contents, data, _a, _b;
82
+ return __generator(this, function (_c) {
83
+ switch (_c.label) {
84
+ case 0:
85
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
86
+ return [2, deserializeAws_restJson1GetDeploymentsCommandError(output, context)];
87
+ }
88
+ contents = {
89
+ $metadata: deserializeMetadata(output),
90
+ Deployments: undefined,
91
+ };
92
+ _a = __expectNonNull;
93
+ _b = __expectObject;
94
+ return [4, parseBody(output.body, context)];
95
+ case 1:
96
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
97
+ if (data.Deployments !== undefined && data.Deployments !== null) {
98
+ contents.Deployments = deserializeAws_restJson1EdgeDeployments(data.Deployments, context);
99
+ }
100
+ return [2, Promise.resolve(contents)];
101
+ }
102
+ });
103
+ }); };
104
+ var deserializeAws_restJson1GetDeploymentsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
105
+ var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
106
+ var _c;
107
+ return __generator(this, function (_d) {
108
+ switch (_d.label) {
109
+ case 0:
110
+ _a = [__assign({}, output)];
111
+ _c = {};
112
+ return [4, parseBody(output.body, context)];
113
+ case 1:
114
+ parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
115
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
116
+ _b = errorCode;
117
+ switch (_b) {
118
+ case "InternalServiceException": return [3, 2];
119
+ case "com.amazonaws.sagemakeredge#InternalServiceException": return [3, 2];
120
+ }
121
+ return [3, 4];
122
+ case 2: return [4, deserializeAws_restJson1InternalServiceExceptionResponse(parsedOutput, context)];
123
+ case 3: throw _d.sent();
124
+ case 4:
125
+ parsedBody = parsedOutput.body;
126
+ $metadata = deserializeMetadata(output);
127
+ statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
128
+ response = new __BaseException({
129
+ name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
130
+ $fault: "client",
131
+ $metadata: $metadata,
132
+ });
133
+ throw __decorateServiceException(response, parsedBody);
134
+ }
135
+ });
136
+ }); };
54
137
  export var deserializeAws_restJson1GetDeviceRegistrationCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
55
138
  var contents, data, _a, _b;
56
139
  return __generator(this, function (_c) {
@@ -175,6 +258,26 @@ var deserializeAws_restJson1InternalServiceExceptionResponse = function (parsedO
175
258
  return [2, __decorateServiceException(exception, parsedOutput.body)];
176
259
  });
177
260
  }); };
261
+ var serializeAws_restJson1DeploymentModel = function (input, context) {
262
+ return __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.DesiredState != null && { DesiredState: input.DesiredState })), (input.ModelHandle != null && { ModelHandle: input.ModelHandle })), (input.ModelName != null && { ModelName: input.ModelName })), (input.ModelVersion != null && { ModelVersion: input.ModelVersion })), (input.RollbackFailureReason != null && { RollbackFailureReason: input.RollbackFailureReason })), (input.State != null && { State: input.State })), (input.Status != null && { Status: input.Status })), (input.StatusReason != null && { StatusReason: input.StatusReason }));
263
+ };
264
+ var serializeAws_restJson1DeploymentModels = function (input, context) {
265
+ return input
266
+ .filter(function (e) { return e != null; })
267
+ .map(function (entry) {
268
+ if (entry === null) {
269
+ return null;
270
+ }
271
+ return serializeAws_restJson1DeploymentModel(entry, context);
272
+ });
273
+ };
274
+ var serializeAws_restJson1DeploymentResult = function (input, context) {
275
+ return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.DeploymentEndTime != null && { DeploymentEndTime: Math.round(input.DeploymentEndTime.getTime() / 1000) })), (input.DeploymentModels != null && {
276
+ DeploymentModels: serializeAws_restJson1DeploymentModels(input.DeploymentModels, context),
277
+ })), (input.DeploymentName != null && { DeploymentName: input.DeploymentName })), (input.DeploymentStartTime != null && {
278
+ DeploymentStartTime: Math.round(input.DeploymentStartTime.getTime() / 1000),
279
+ })), (input.DeploymentStatus != null && { DeploymentStatus: input.DeploymentStatus })), (input.DeploymentStatusMessage != null && { DeploymentStatusMessage: input.DeploymentStatusMessage }));
280
+ };
178
281
  var serializeAws_restJson1EdgeMetric = function (input, context) {
179
282
  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) }));
180
283
  };
@@ -201,6 +304,50 @@ var serializeAws_restJson1Models = function (input, context) {
201
304
  return serializeAws_restJson1Model(entry, context);
202
305
  });
203
306
  };
307
+ var deserializeAws_restJson1Checksum = function (output, context) {
308
+ return {
309
+ Sum: __expectString(output.Sum),
310
+ Type: __expectString(output.Type),
311
+ };
312
+ };
313
+ var deserializeAws_restJson1Definition = function (output, context) {
314
+ return {
315
+ Checksum: output.Checksum != null ? deserializeAws_restJson1Checksum(output.Checksum, context) : undefined,
316
+ ModelHandle: __expectString(output.ModelHandle),
317
+ S3Url: __expectString(output.S3Url),
318
+ State: __expectString(output.State),
319
+ };
320
+ };
321
+ var deserializeAws_restJson1Definitions = function (output, context) {
322
+ var retVal = (output || [])
323
+ .filter(function (e) { return e != null; })
324
+ .map(function (entry) {
325
+ if (entry === null) {
326
+ return null;
327
+ }
328
+ return deserializeAws_restJson1Definition(entry, context);
329
+ });
330
+ return retVal;
331
+ };
332
+ var deserializeAws_restJson1EdgeDeployment = function (output, context) {
333
+ return {
334
+ Definitions: output.Definitions != null ? deserializeAws_restJson1Definitions(output.Definitions, context) : undefined,
335
+ DeploymentName: __expectString(output.DeploymentName),
336
+ FailureHandlingPolicy: __expectString(output.FailureHandlingPolicy),
337
+ Type: __expectString(output.Type),
338
+ };
339
+ };
340
+ var deserializeAws_restJson1EdgeDeployments = function (output, context) {
341
+ var retVal = (output || [])
342
+ .filter(function (e) { return e != null; })
343
+ .map(function (entry) {
344
+ if (entry === null) {
345
+ return null;
346
+ }
347
+ return deserializeAws_restJson1EdgeDeployment(entry, context);
348
+ });
349
+ return retVal;
350
+ };
204
351
  var deserializeMetadata = function (output) {
205
352
  var _a;
206
353
  return ({
@@ -239,6 +386,9 @@ var loadRestJsonErrorCode = function (output, data) {
239
386
  var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
240
387
  var sanitizeErrorCode = function (rawValue) {
241
388
  var cleanValue = rawValue;
389
+ if (typeof cleanValue === "number") {
390
+ cleanValue = cleanValue.toString();
391
+ }
242
392
  if (cleanValue.indexOf(":") >= 0) {
243
393
  cleanValue = cleanValue.split(":")[0];
244
394
  }
@@ -1,4 +1,5 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
+ import { GetDeploymentsCommandInput, GetDeploymentsCommandOutput } from "./commands/GetDeploymentsCommand";
2
3
  import { GetDeviceRegistrationCommandInput, GetDeviceRegistrationCommandOutput } from "./commands/GetDeviceRegistrationCommand";
3
4
  import { SendHeartbeatCommandInput, SendHeartbeatCommandOutput } from "./commands/SendHeartbeatCommand";
4
5
  import { SagemakerEdgeClient } from "./SagemakerEdgeClient";
@@ -6,6 +7,12 @@ import { SagemakerEdgeClient } from "./SagemakerEdgeClient";
6
7
  * <p>SageMaker Edge Manager dataplane service for communicating with active agents.</p>
7
8
  */
8
9
  export declare class SagemakerEdge extends SagemakerEdgeClient {
10
+ /**
11
+ * <p>Use to get the active deployments from a device.</p>
12
+ */
13
+ getDeployments(args: GetDeploymentsCommandInput, options?: __HttpHandlerOptions): Promise<GetDeploymentsCommandOutput>;
14
+ getDeployments(args: GetDeploymentsCommandInput, cb: (err: any, data?: GetDeploymentsCommandOutput) => void): void;
15
+ getDeployments(args: GetDeploymentsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDeploymentsCommandOutput) => void): void;
9
16
  /**
10
17
  * <p>Use to check if a device is registered with SageMaker Edge Manager.</p>
11
18
  */
@@ -6,10 +6,11 @@ import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middlewa
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
7
  import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
+ import { GetDeploymentsCommandInput, GetDeploymentsCommandOutput } from "./commands/GetDeploymentsCommand";
9
10
  import { GetDeviceRegistrationCommandInput, GetDeviceRegistrationCommandOutput } from "./commands/GetDeviceRegistrationCommand";
10
11
  import { SendHeartbeatCommandInput, SendHeartbeatCommandOutput } from "./commands/SendHeartbeatCommand";
11
- export declare type ServiceInputTypes = GetDeviceRegistrationCommandInput | SendHeartbeatCommandInput;
12
- export declare type ServiceOutputTypes = GetDeviceRegistrationCommandOutput | SendHeartbeatCommandOutput;
12
+ export declare type ServiceInputTypes = GetDeploymentsCommandInput | GetDeviceRegistrationCommandInput | SendHeartbeatCommandInput;
13
+ export declare type ServiceOutputTypes = GetDeploymentsCommandOutput | GetDeviceRegistrationCommandOutput | SendHeartbeatCommandOutput;
13
14
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
14
15
  /**
15
16
  * The HTTP handler to use. Fetch in browser and Https in Nodejs.
@@ -0,0 +1,35 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { GetDeploymentsRequest, GetDeploymentsResult } from "../models/models_0";
4
+ import { SagemakerEdgeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SagemakerEdgeClient";
5
+ export interface GetDeploymentsCommandInput extends GetDeploymentsRequest {
6
+ }
7
+ export interface GetDeploymentsCommandOutput extends GetDeploymentsResult, __MetadataBearer {
8
+ }
9
+ /**
10
+ * <p>Use to get the active deployments from a device.</p>
11
+ * @example
12
+ * Use a bare-bones client and the command you need to make an API call.
13
+ * ```javascript
14
+ * import { SagemakerEdgeClient, GetDeploymentsCommand } from "@aws-sdk/client-sagemaker-edge"; // ES Modules import
15
+ * // const { SagemakerEdgeClient, GetDeploymentsCommand } = require("@aws-sdk/client-sagemaker-edge"); // CommonJS import
16
+ * const client = new SagemakerEdgeClient(config);
17
+ * const command = new GetDeploymentsCommand(input);
18
+ * const response = await client.send(command);
19
+ * ```
20
+ *
21
+ * @see {@link GetDeploymentsCommandInput} for command's `input` shape.
22
+ * @see {@link GetDeploymentsCommandOutput} for command's `response` shape.
23
+ * @see {@link SagemakerEdgeClientResolvedConfig | config} for SagemakerEdgeClient's `config` shape.
24
+ *
25
+ */
26
+ export declare class GetDeploymentsCommand extends $Command<GetDeploymentsCommandInput, GetDeploymentsCommandOutput, SagemakerEdgeClientResolvedConfig> {
27
+ readonly input: GetDeploymentsCommandInput;
28
+ constructor(input: GetDeploymentsCommandInput);
29
+ /**
30
+ * @internal
31
+ */
32
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SagemakerEdgeClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetDeploymentsCommandInput, GetDeploymentsCommandOutput>;
33
+ private serialize;
34
+ private deserialize;
35
+ }
@@ -1,2 +1,3 @@
1
+ export * from "./GetDeploymentsCommand";
1
2
  export * from "./GetDeviceRegistrationCommand";
2
3
  export * from "./SendHeartbeatCommand";
@@ -1,8 +1,8 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { SagemakerEdgeServiceException as __BaseException } from "./SagemakerEdgeServiceException";
3
- export interface GetDeviceRegistrationRequest {
3
+ export interface GetDeploymentsRequest {
4
4
  /**
5
- * <p>The unique name of the device you want to get the registration status from.</p>
5
+ * <p>The unique name of the device you want to get the configuration of active deployments from.</p>
6
6
  */
7
7
  DeviceName: string | undefined;
8
8
  /**
@@ -10,31 +10,114 @@ export interface GetDeviceRegistrationRequest {
10
10
  */
11
11
  DeviceFleetName: string | undefined;
12
12
  }
13
- export declare namespace GetDeviceRegistrationRequest {
13
+ export declare namespace GetDeploymentsRequest {
14
14
  /**
15
15
  * @internal
16
16
  */
17
- const filterSensitiveLog: (obj: GetDeviceRegistrationRequest) => any;
17
+ const filterSensitiveLog: (obj: GetDeploymentsRequest) => any;
18
18
  }
19
- export interface GetDeviceRegistrationResult {
19
+ export declare enum ChecksumType {
20
+ Sha1 = "SHA1"
21
+ }
22
+ /**
23
+ * <p>Information about the checksum of a model deployed on a device.</p>
24
+ */
25
+ export interface Checksum {
20
26
  /**
21
- * <p>Describes if the device is currently registered with SageMaker Edge Manager.</p>
27
+ * <p>The type of the checksum.</p>
22
28
  */
23
- DeviceRegistration?: string;
29
+ Type?: ChecksumType | string;
24
30
  /**
25
- * <p>The amount of time, in seconds, that the registration status is stored on the device’s cache before it is refreshed.</p>
31
+ * <p>The checksum of the model.</p>
26
32
  */
27
- CacheTTL?: string;
33
+ Sum?: string;
28
34
  }
29
- export declare namespace GetDeviceRegistrationResult {
35
+ export declare namespace Checksum {
30
36
  /**
31
37
  * @internal
32
38
  */
33
- const filterSensitiveLog: (obj: GetDeviceRegistrationResult) => any;
39
+ const filterSensitiveLog: (obj: Checksum) => any;
40
+ }
41
+ export declare enum ModelState {
42
+ Deploy = "DEPLOY",
43
+ Undeploy = "UNDEPLOY"
44
+ }
45
+ /**
46
+ * <p></p>
47
+ */
48
+ export interface Definition {
49
+ /**
50
+ * <p>The unique model handle.</p>
51
+ */
52
+ ModelHandle?: string;
53
+ /**
54
+ * <p>The absolute S3 location of the model.</p>
55
+ */
56
+ S3Url?: string;
57
+ /**
58
+ * <p>The checksum information of the model.</p>
59
+ */
60
+ Checksum?: Checksum;
61
+ /**
62
+ * <p>The desired state of the model.</p>
63
+ */
64
+ State?: ModelState | string;
65
+ }
66
+ export declare namespace Definition {
67
+ /**
68
+ * @internal
69
+ */
70
+ const filterSensitiveLog: (obj: Definition) => any;
71
+ }
72
+ export declare enum FailureHandlingPolicy {
73
+ DoNothing = "DO_NOTHING",
74
+ RollbackOnFailure = "ROLLBACK_ON_FAILURE"
75
+ }
76
+ export declare enum DeploymentType {
77
+ Model = "Model"
78
+ }
79
+ /**
80
+ * <p>Information about a deployment on an edge device that is registered with SageMaker Edge Manager.</p>
81
+ */
82
+ export interface EdgeDeployment {
83
+ /**
84
+ * <p>The name and unique ID of the deployment.</p>
85
+ */
86
+ DeploymentName?: string;
87
+ /**
88
+ * <p>The type of the deployment.</p>
89
+ */
90
+ Type?: DeploymentType | string;
91
+ /**
92
+ * <p>Determines whether to rollback to previous configuration if deployment fails.</p>
93
+ */
94
+ FailureHandlingPolicy?: FailureHandlingPolicy | string;
95
+ /**
96
+ * <p>Returns a list of Definition objects.</p>
97
+ */
98
+ Definitions?: Definition[];
99
+ }
100
+ export declare namespace EdgeDeployment {
101
+ /**
102
+ * @internal
103
+ */
104
+ const filterSensitiveLog: (obj: EdgeDeployment) => any;
105
+ }
106
+ export interface GetDeploymentsResult {
107
+ /**
108
+ * <p>Returns a list of the configurations of the active deployments on the device.</p>
109
+ */
110
+ Deployments?: EdgeDeployment[];
111
+ }
112
+ export declare namespace GetDeploymentsResult {
113
+ /**
114
+ * @internal
115
+ */
116
+ const filterSensitiveLog: (obj: GetDeploymentsResult) => any;
34
117
  }
35
118
  /**
36
119
  * <p>An internal failure occurred. Try your request again. If the problem
37
- * persists, contact AWS customer support.</p>
120
+ * persists, contact Amazon Web Services customer support.</p>
38
121
  */
39
122
  export declare class InternalServiceException extends __BaseException {
40
123
  readonly name: "InternalServiceException";
@@ -45,6 +128,38 @@ export declare class InternalServiceException extends __BaseException {
45
128
  */
46
129
  constructor(opts: __ExceptionOptionType<InternalServiceException, __BaseException>);
47
130
  }
131
+ export interface GetDeviceRegistrationRequest {
132
+ /**
133
+ * <p>The unique name of the device you want to get the registration status from.</p>
134
+ */
135
+ DeviceName: string | undefined;
136
+ /**
137
+ * <p>The name of the fleet that the device belongs to.</p>
138
+ */
139
+ DeviceFleetName: string | undefined;
140
+ }
141
+ export declare namespace GetDeviceRegistrationRequest {
142
+ /**
143
+ * @internal
144
+ */
145
+ const filterSensitiveLog: (obj: GetDeviceRegistrationRequest) => any;
146
+ }
147
+ export interface GetDeviceRegistrationResult {
148
+ /**
149
+ * <p>Describes if the device is currently registered with SageMaker Edge Manager.</p>
150
+ */
151
+ DeviceRegistration?: string;
152
+ /**
153
+ * <p>The amount of time, in seconds, that the registration status is stored on the device’s cache before it is refreshed.</p>
154
+ */
155
+ CacheTTL?: string;
156
+ }
157
+ export declare namespace GetDeviceRegistrationResult {
158
+ /**
159
+ * @internal
160
+ */
161
+ const filterSensitiveLog: (obj: GetDeviceRegistrationResult) => any;
162
+ }
48
163
  /**
49
164
  * <p>Information required for edge device metrics.</p>
50
165
  */
@@ -72,6 +187,88 @@ export declare namespace EdgeMetric {
72
187
  */
73
188
  const filterSensitiveLog: (obj: EdgeMetric) => any;
74
189
  }
190
+ export declare enum DeploymentStatus {
191
+ Fail = "FAIL",
192
+ Success = "SUCCESS"
193
+ }
194
+ /**
195
+ * <p></p>
196
+ */
197
+ export interface DeploymentModel {
198
+ /**
199
+ * <p>The unique handle of the model.</p>
200
+ */
201
+ ModelHandle?: string;
202
+ /**
203
+ * <p>The name of the model.</p>
204
+ */
205
+ ModelName?: string;
206
+ /**
207
+ * <p>The version of the model.</p>
208
+ */
209
+ ModelVersion?: string;
210
+ /**
211
+ * <p>The desired state of the model.</p>
212
+ */
213
+ DesiredState?: ModelState | string;
214
+ /**
215
+ * <p>Returns the current state of the model.</p>
216
+ */
217
+ State?: ModelState | string;
218
+ /**
219
+ * <p>Returns the deployment status of the model.</p>
220
+ */
221
+ Status?: DeploymentStatus | string;
222
+ /**
223
+ * <p>Returns the error message for the deployment status result.</p>
224
+ */
225
+ StatusReason?: string;
226
+ /**
227
+ * <p>Returns the error message if there is a rollback.</p>
228
+ */
229
+ RollbackFailureReason?: string;
230
+ }
231
+ export declare namespace DeploymentModel {
232
+ /**
233
+ * @internal
234
+ */
235
+ const filterSensitiveLog: (obj: DeploymentModel) => any;
236
+ }
237
+ /**
238
+ * <p>Information about the result of a deployment on an edge device that is registered with SageMaker Edge Manager.</p>
239
+ */
240
+ export interface DeploymentResult {
241
+ /**
242
+ * <p>The name and unique ID of the deployment.</p>
243
+ */
244
+ DeploymentName?: string;
245
+ /**
246
+ * <p>Returns the bucket error code.</p>
247
+ */
248
+ DeploymentStatus?: string;
249
+ /**
250
+ * <p>Returns the detailed error message.</p>
251
+ */
252
+ DeploymentStatusMessage?: string;
253
+ /**
254
+ * <p>The timestamp of when the deployment was started on the agent.</p>
255
+ */
256
+ DeploymentStartTime?: Date;
257
+ /**
258
+ * <p>The timestamp of when the deployment was ended, and the agent got the deployment results.</p>
259
+ */
260
+ DeploymentEndTime?: Date;
261
+ /**
262
+ * <p>Returns a list of models deployed on the agent.</p>
263
+ */
264
+ DeploymentModels?: DeploymentModel[];
265
+ }
266
+ export declare namespace DeploymentResult {
267
+ /**
268
+ * @internal
269
+ */
270
+ const filterSensitiveLog: (obj: DeploymentResult) => any;
271
+ }
75
272
  /**
76
273
  * <p>Information about a model deployed on an edge device that is registered with SageMaker Edge Manager.</p>
77
274
  */
@@ -124,6 +321,10 @@ export interface SendHeartbeatRequest {
124
321
  * <p>The name of the fleet that the device belongs to.</p>
125
322
  */
126
323
  DeviceFleetName: string | undefined;
324
+ /**
325
+ * <p>Returns the result of a deployment on the device.</p>
326
+ */
327
+ DeploymentResult?: DeploymentResult;
127
328
  }
128
329
  export declare namespace SendHeartbeatRequest {
129
330
  /**
@@ -1,8 +1,11 @@
1
1
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
2
2
  import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
3
+ import { GetDeploymentsCommandInput, GetDeploymentsCommandOutput } from "../commands/GetDeploymentsCommand";
3
4
  import { GetDeviceRegistrationCommandInput, GetDeviceRegistrationCommandOutput } from "../commands/GetDeviceRegistrationCommand";
4
5
  import { SendHeartbeatCommandInput, SendHeartbeatCommandOutput } from "../commands/SendHeartbeatCommand";
6
+ export declare const serializeAws_restJson1GetDeploymentsCommand: (input: GetDeploymentsCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
5
7
  export declare const serializeAws_restJson1GetDeviceRegistrationCommand: (input: GetDeviceRegistrationCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
6
8
  export declare const serializeAws_restJson1SendHeartbeatCommand: (input: SendHeartbeatCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
9
+ export declare const deserializeAws_restJson1GetDeploymentsCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDeploymentsCommandOutput>;
7
10
  export declare const deserializeAws_restJson1GetDeviceRegistrationCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDeviceRegistrationCommandOutput>;
8
11
  export declare const deserializeAws_restJson1SendHeartbeatCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<SendHeartbeatCommandOutput>;
@@ -1,10 +1,15 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
+ import { GetDeploymentsCommandInput, GetDeploymentsCommandOutput } from "./commands/GetDeploymentsCommand";
2
3
  import { GetDeviceRegistrationCommandInput, GetDeviceRegistrationCommandOutput } from "./commands/GetDeviceRegistrationCommand";
3
4
  import { SendHeartbeatCommandInput, SendHeartbeatCommandOutput } from "./commands/SendHeartbeatCommand";
4
5
  import { SagemakerEdgeClient } from "./SagemakerEdgeClient";
5
6
 
6
7
  export declare class SagemakerEdge extends SagemakerEdgeClient {
7
8
 
9
+ getDeployments(args: GetDeploymentsCommandInput, options?: __HttpHandlerOptions): Promise<GetDeploymentsCommandOutput>;
10
+ getDeployments(args: GetDeploymentsCommandInput, cb: (err: any, data?: GetDeploymentsCommandOutput) => void): void;
11
+ getDeployments(args: GetDeploymentsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDeploymentsCommandOutput) => void): void;
12
+
8
13
  getDeviceRegistration(args: GetDeviceRegistrationCommandInput, options?: __HttpHandlerOptions): Promise<GetDeviceRegistrationCommandOutput>;
9
14
  getDeviceRegistration(args: GetDeviceRegistrationCommandInput, cb: (err: any, data?: GetDeviceRegistrationCommandOutput) => void): void;
10
15
  getDeviceRegistration(args: GetDeviceRegistrationCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetDeviceRegistrationCommandOutput) => void): void;
@@ -6,10 +6,11 @@ import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middlewa
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
7
  import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { BodyLengthCalculator as __BodyLengthCalculator, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
+ import { GetDeploymentsCommandInput, GetDeploymentsCommandOutput } from "./commands/GetDeploymentsCommand";
9
10
  import { GetDeviceRegistrationCommandInput, GetDeviceRegistrationCommandOutput } from "./commands/GetDeviceRegistrationCommand";
10
11
  import { SendHeartbeatCommandInput, SendHeartbeatCommandOutput } from "./commands/SendHeartbeatCommand";
11
- export declare type ServiceInputTypes = GetDeviceRegistrationCommandInput | SendHeartbeatCommandInput;
12
- export declare type ServiceOutputTypes = GetDeviceRegistrationCommandOutput | SendHeartbeatCommandOutput;
12
+ export declare type ServiceInputTypes = GetDeploymentsCommandInput | GetDeviceRegistrationCommandInput | SendHeartbeatCommandInput;
13
+ export declare type ServiceOutputTypes = GetDeploymentsCommandOutput | GetDeviceRegistrationCommandOutput | SendHeartbeatCommandOutput;
13
14
  export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
14
15
 
15
16
  requestHandler?: __HttpHandler;
@@ -0,0 +1,17 @@
1
+ import { Command as $Command } from "@aws-sdk/smithy-client";
2
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
3
+ import { GetDeploymentsRequest, GetDeploymentsResult } from "../models/models_0";
4
+ import { SagemakerEdgeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SagemakerEdgeClient";
5
+ export interface GetDeploymentsCommandInput extends GetDeploymentsRequest {
6
+ }
7
+ export interface GetDeploymentsCommandOutput extends GetDeploymentsResult, __MetadataBearer {
8
+ }
9
+
10
+ export declare class GetDeploymentsCommand extends $Command<GetDeploymentsCommandInput, GetDeploymentsCommandOutput, SagemakerEdgeClientResolvedConfig> {
11
+ readonly input: GetDeploymentsCommandInput;
12
+ constructor(input: GetDeploymentsCommandInput);
13
+
14
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: SagemakerEdgeClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetDeploymentsCommandInput, GetDeploymentsCommandOutput>;
15
+ private serialize;
16
+ private deserialize;
17
+ }
@@ -1,2 +1,3 @@
1
+ export * from "./GetDeploymentsCommand";
1
2
  export * from "./GetDeviceRegistrationCommand";
2
3
  export * from "./SendHeartbeatCommand";