@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.
@@ -1,13 +1,23 @@
1
1
  import { __assign, __extends } from "tslib";
2
2
  import { SagemakerEdgeServiceException as __BaseException } from "./SagemakerEdgeServiceException";
3
- export var GetDeviceRegistrationRequest;
4
- (function (GetDeviceRegistrationRequest) {
5
- GetDeviceRegistrationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
6
- })(GetDeviceRegistrationRequest || (GetDeviceRegistrationRequest = {}));
7
- export var GetDeviceRegistrationResult;
8
- (function (GetDeviceRegistrationResult) {
9
- GetDeviceRegistrationResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
10
- })(GetDeviceRegistrationResult || (GetDeviceRegistrationResult = {}));
3
+ export var ChecksumType;
4
+ (function (ChecksumType) {
5
+ ChecksumType["Sha1"] = "SHA1";
6
+ })(ChecksumType || (ChecksumType = {}));
7
+ export var ModelState;
8
+ (function (ModelState) {
9
+ ModelState["Deploy"] = "DEPLOY";
10
+ ModelState["Undeploy"] = "UNDEPLOY";
11
+ })(ModelState || (ModelState = {}));
12
+ export var FailureHandlingPolicy;
13
+ (function (FailureHandlingPolicy) {
14
+ FailureHandlingPolicy["DoNothing"] = "DO_NOTHING";
15
+ FailureHandlingPolicy["RollbackOnFailure"] = "ROLLBACK_ON_FAILURE";
16
+ })(FailureHandlingPolicy || (FailureHandlingPolicy = {}));
17
+ export var DeploymentType;
18
+ (function (DeploymentType) {
19
+ DeploymentType["Model"] = "Model";
20
+ })(DeploymentType || (DeploymentType = {}));
11
21
  var InternalServiceException = (function (_super) {
12
22
  __extends(InternalServiceException, _super);
13
23
  function InternalServiceException(opts) {
@@ -21,15 +31,20 @@ var InternalServiceException = (function (_super) {
21
31
  return InternalServiceException;
22
32
  }(__BaseException));
23
33
  export { InternalServiceException };
24
- export var EdgeMetric;
25
- (function (EdgeMetric) {
26
- EdgeMetric.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
27
- })(EdgeMetric || (EdgeMetric = {}));
28
- export var Model;
29
- (function (Model) {
30
- Model.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
31
- })(Model || (Model = {}));
32
- export var SendHeartbeatRequest;
33
- (function (SendHeartbeatRequest) {
34
- SendHeartbeatRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
35
- })(SendHeartbeatRequest || (SendHeartbeatRequest = {}));
34
+ export var DeploymentStatus;
35
+ (function (DeploymentStatus) {
36
+ DeploymentStatus["Fail"] = "FAIL";
37
+ DeploymentStatus["Success"] = "SUCCESS";
38
+ })(DeploymentStatus || (DeploymentStatus = {}));
39
+ export var GetDeploymentsRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
40
+ export var ChecksumFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
41
+ export var DefinitionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
42
+ export var EdgeDeploymentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
43
+ export var GetDeploymentsResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
44
+ export var GetDeviceRegistrationRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
45
+ export var GetDeviceRegistrationResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
46
+ export var EdgeMetricFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
47
+ export var DeploymentModelFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
48
+ export var DeploymentResultFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
49
+ export var ModelFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
50
+ export var SendHeartbeatRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -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 ({
@@ -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,84 @@ export interface GetDeviceRegistrationRequest {
10
10
  */
11
11
  DeviceFleetName: string | undefined;
12
12
  }
13
- export declare namespace GetDeviceRegistrationRequest {
13
+ export declare enum ChecksumType {
14
+ Sha1 = "SHA1"
15
+ }
16
+ /**
17
+ * <p>Information about the checksum of a model deployed on a device.</p>
18
+ */
19
+ export interface Checksum {
14
20
  /**
15
- * @internal
21
+ * <p>The type of the checksum.</p>
22
+ */
23
+ Type?: ChecksumType | string;
24
+ /**
25
+ * <p>The checksum of the model.</p>
16
26
  */
17
- const filterSensitiveLog: (obj: GetDeviceRegistrationRequest) => any;
27
+ Sum?: string;
18
28
  }
19
- export interface GetDeviceRegistrationResult {
29
+ export declare enum ModelState {
30
+ Deploy = "DEPLOY",
31
+ Undeploy = "UNDEPLOY"
32
+ }
33
+ /**
34
+ * <p></p>
35
+ */
36
+ export interface Definition {
20
37
  /**
21
- * <p>Describes if the device is currently registered with SageMaker Edge Manager.</p>
38
+ * <p>The unique model handle.</p>
22
39
  */
23
- DeviceRegistration?: string;
40
+ ModelHandle?: string;
24
41
  /**
25
- * <p>The amount of time, in seconds, that the registration status is stored on the device’s cache before it is refreshed.</p>
42
+ * <p>The absolute S3 location of the model.</p>
26
43
  */
27
- CacheTTL?: string;
44
+ S3Url?: string;
45
+ /**
46
+ * <p>The checksum information of the model.</p>
47
+ */
48
+ Checksum?: Checksum;
49
+ /**
50
+ * <p>The desired state of the model.</p>
51
+ */
52
+ State?: ModelState | string;
28
53
  }
29
- export declare namespace GetDeviceRegistrationResult {
54
+ export declare enum FailureHandlingPolicy {
55
+ DoNothing = "DO_NOTHING",
56
+ RollbackOnFailure = "ROLLBACK_ON_FAILURE"
57
+ }
58
+ export declare enum DeploymentType {
59
+ Model = "Model"
60
+ }
61
+ /**
62
+ * <p>Information about a deployment on an edge device that is registered with SageMaker Edge Manager.</p>
63
+ */
64
+ export interface EdgeDeployment {
30
65
  /**
31
- * @internal
66
+ * <p>The name and unique ID of the deployment.</p>
67
+ */
68
+ DeploymentName?: string;
69
+ /**
70
+ * <p>The type of the deployment.</p>
71
+ */
72
+ Type?: DeploymentType | string;
73
+ /**
74
+ * <p>Determines whether to rollback to previous configuration if deployment fails.</p>
75
+ */
76
+ FailureHandlingPolicy?: FailureHandlingPolicy | string;
77
+ /**
78
+ * <p>Returns a list of Definition objects.</p>
32
79
  */
33
- const filterSensitiveLog: (obj: GetDeviceRegistrationResult) => any;
80
+ Definitions?: Definition[];
81
+ }
82
+ export interface GetDeploymentsResult {
83
+ /**
84
+ * <p>Returns a list of the configurations of the active deployments on the device.</p>
85
+ */
86
+ Deployments?: EdgeDeployment[];
34
87
  }
35
88
  /**
36
89
  * <p>An internal failure occurred. Try your request again. If the problem
37
- * persists, contact AWS customer support.</p>
90
+ * persists, contact Amazon Web Services customer support.</p>
38
91
  */
39
92
  export declare class InternalServiceException extends __BaseException {
40
93
  readonly name: "InternalServiceException";
@@ -45,6 +98,26 @@ export declare class InternalServiceException extends __BaseException {
45
98
  */
46
99
  constructor(opts: __ExceptionOptionType<InternalServiceException, __BaseException>);
47
100
  }
101
+ export interface GetDeviceRegistrationRequest {
102
+ /**
103
+ * <p>The unique name of the device you want to get the registration status from.</p>
104
+ */
105
+ DeviceName: string | undefined;
106
+ /**
107
+ * <p>The name of the fleet that the device belongs to.</p>
108
+ */
109
+ DeviceFleetName: string | undefined;
110
+ }
111
+ export interface GetDeviceRegistrationResult {
112
+ /**
113
+ * <p>Describes if the device is currently registered with SageMaker Edge Manager.</p>
114
+ */
115
+ DeviceRegistration?: string;
116
+ /**
117
+ * <p>The amount of time, in seconds, that the registration status is stored on the device’s cache before it is refreshed.</p>
118
+ */
119
+ CacheTTL?: string;
120
+ }
48
121
  /**
49
122
  * <p>Information required for edge device metrics.</p>
50
123
  */
@@ -66,11 +139,75 @@ export interface EdgeMetric {
66
139
  */
67
140
  Timestamp?: Date;
68
141
  }
69
- export declare namespace EdgeMetric {
142
+ export declare enum DeploymentStatus {
143
+ Fail = "FAIL",
144
+ Success = "SUCCESS"
145
+ }
146
+ /**
147
+ * <p></p>
148
+ */
149
+ export interface DeploymentModel {
70
150
  /**
71
- * @internal
151
+ * <p>The unique handle of the model.</p>
152
+ */
153
+ ModelHandle?: string;
154
+ /**
155
+ * <p>The name of the model.</p>
72
156
  */
73
- const filterSensitiveLog: (obj: EdgeMetric) => any;
157
+ ModelName?: string;
158
+ /**
159
+ * <p>The version of the model.</p>
160
+ */
161
+ ModelVersion?: string;
162
+ /**
163
+ * <p>The desired state of the model.</p>
164
+ */
165
+ DesiredState?: ModelState | string;
166
+ /**
167
+ * <p>Returns the current state of the model.</p>
168
+ */
169
+ State?: ModelState | string;
170
+ /**
171
+ * <p>Returns the deployment status of the model.</p>
172
+ */
173
+ Status?: DeploymentStatus | string;
174
+ /**
175
+ * <p>Returns the error message for the deployment status result.</p>
176
+ */
177
+ StatusReason?: string;
178
+ /**
179
+ * <p>Returns the error message if there is a rollback.</p>
180
+ */
181
+ RollbackFailureReason?: string;
182
+ }
183
+ /**
184
+ * <p>Information about the result of a deployment on an edge device that is registered with SageMaker Edge Manager.</p>
185
+ */
186
+ export interface DeploymentResult {
187
+ /**
188
+ * <p>The name and unique ID of the deployment.</p>
189
+ */
190
+ DeploymentName?: string;
191
+ /**
192
+ * <p>Returns the bucket error code.</p>
193
+ */
194
+ DeploymentStatus?: string;
195
+ /**
196
+ * <p>Returns the detailed error message.</p>
197
+ */
198
+ DeploymentStatusMessage?: string;
199
+ /**
200
+ * <p>The timestamp of when the deployment was started on the agent.</p>
201
+ */
202
+ DeploymentStartTime?: Date;
203
+ /**
204
+ * <p>The timestamp of when the deployment was ended, and the agent got the deployment results.</p>
205
+ */
206
+ DeploymentEndTime?: Date;
207
+ /**
208
+ * <p>Returns a list of models deployed on the agent.</p>
209
+ */
210
+ DeploymentModels?: DeploymentModel[];
74
211
  }
75
212
  /**
76
213
  * <p>Information about a model deployed on an edge device that is registered with SageMaker Edge Manager.</p>
@@ -97,12 +234,6 @@ export interface Model {
97
234
  */
98
235
  ModelMetrics?: EdgeMetric[];
99
236
  }
100
- export declare namespace Model {
101
- /**
102
- * @internal
103
- */
104
- const filterSensitiveLog: (obj: Model) => any;
105
- }
106
237
  export interface SendHeartbeatRequest {
107
238
  /**
108
239
  * <p>For internal use. Returns a list of SageMaker Edge Manager agent operating metrics.</p>
@@ -124,10 +255,56 @@ export interface SendHeartbeatRequest {
124
255
  * <p>The name of the fleet that the device belongs to.</p>
125
256
  */
126
257
  DeviceFleetName: string | undefined;
127
- }
128
- export declare namespace SendHeartbeatRequest {
129
258
  /**
130
- * @internal
259
+ * <p>Returns the result of a deployment on the device.</p>
131
260
  */
132
- const filterSensitiveLog: (obj: SendHeartbeatRequest) => any;
261
+ DeploymentResult?: DeploymentResult;
133
262
  }
263
+ /**
264
+ * @internal
265
+ */
266
+ export declare const GetDeploymentsRequestFilterSensitiveLog: (obj: GetDeploymentsRequest) => any;
267
+ /**
268
+ * @internal
269
+ */
270
+ export declare const ChecksumFilterSensitiveLog: (obj: Checksum) => any;
271
+ /**
272
+ * @internal
273
+ */
274
+ export declare const DefinitionFilterSensitiveLog: (obj: Definition) => any;
275
+ /**
276
+ * @internal
277
+ */
278
+ export declare const EdgeDeploymentFilterSensitiveLog: (obj: EdgeDeployment) => any;
279
+ /**
280
+ * @internal
281
+ */
282
+ export declare const GetDeploymentsResultFilterSensitiveLog: (obj: GetDeploymentsResult) => any;
283
+ /**
284
+ * @internal
285
+ */
286
+ export declare const GetDeviceRegistrationRequestFilterSensitiveLog: (obj: GetDeviceRegistrationRequest) => any;
287
+ /**
288
+ * @internal
289
+ */
290
+ export declare const GetDeviceRegistrationResultFilterSensitiveLog: (obj: GetDeviceRegistrationResult) => any;
291
+ /**
292
+ * @internal
293
+ */
294
+ export declare const EdgeMetricFilterSensitiveLog: (obj: EdgeMetric) => any;
295
+ /**
296
+ * @internal
297
+ */
298
+ export declare const DeploymentModelFilterSensitiveLog: (obj: DeploymentModel) => any;
299
+ /**
300
+ * @internal
301
+ */
302
+ export declare const DeploymentResultFilterSensitiveLog: (obj: DeploymentResult) => any;
303
+ /**
304
+ * @internal
305
+ */
306
+ export declare const ModelFilterSensitiveLog: (obj: Model) => any;
307
+ /**
308
+ * @internal
309
+ */
310
+ export declare const SendHeartbeatRequestFilterSensitiveLog: (obj: SendHeartbeatRequest) => any;
@@ -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;