@aws-sdk/client-sagemaker-runtime 3.131.0 → 3.142.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 +33 -0
- package/README.md +1 -1
- package/dist-cjs/commands/InvokeEndpointAsyncCommand.js +2 -2
- package/dist-cjs/commands/InvokeEndpointCommand.js +2 -2
- package/dist-cjs/models/models_0.js +22 -30
- package/dist-cjs/protocols/Aws_restJson1.js +59 -102
- package/dist-es/commands/InvokeEndpointAsyncCommand.js +3 -3
- package/dist-es/commands/InvokeEndpointCommand.js +3 -3
- package/dist-es/models/models_0.js +4 -16
- package/dist-es/protocols/Aws_restJson1.js +65 -86
- package/dist-types/models/models_0.d.ts +16 -24
- package/dist-types/ts3.4/models/models_0.d.ts +8 -16
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.142.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.141.0...v3.142.0) (2022-08-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **codegen:** general data mapping function ([#3830](https://github.com/aws/aws-sdk-js-v3/issues/3830)) ([9417eae](https://github.com/aws/aws-sdk-js-v3/commit/9417eae722806799fb4c15c07921574268c1165c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.141.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.140.0...v3.141.0) (2022-08-01)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **clients:** update client endpoints as of 2022-08-01 ([aaf49f2](https://github.com/aws/aws-sdk-js-v3/commit/aaf49f21b371412e6ea7e00890b71a7b31991b66))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# [3.137.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.136.1...v3.137.0) (2022-07-26)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* **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))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
# [3.131.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.130.0...v3.131.0) (2022-07-15)
|
|
7
40
|
|
|
8
41
|
**Note:** Version bump only for package @aws-sdk/client-sagemaker-runtime
|
package/README.md
CHANGED
|
@@ -165,7 +165,7 @@ try {
|
|
|
165
165
|
const data = await client.send(command);
|
|
166
166
|
// process data.
|
|
167
167
|
} catch (error) {
|
|
168
|
-
const { requestId, cfId, extendedRequestId } = error
|
|
168
|
+
const { requestId, cfId, extendedRequestId } = error.$$metadata;
|
|
169
169
|
console.log({ requestId, cfId, extendedRequestId });
|
|
170
170
|
/**
|
|
171
171
|
* The keys within exceptions are also parsed.
|
|
@@ -20,8 +20,8 @@ class InvokeEndpointAsyncCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.InvokeEndpointAsyncInputFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.InvokeEndpointAsyncOutputFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -20,8 +20,8 @@ class InvokeEndpointCommand extends smithy_client_1.Command {
|
|
|
20
20
|
logger,
|
|
21
21
|
clientName,
|
|
22
22
|
commandName,
|
|
23
|
-
inputFilterSensitiveLog: models_0_1.
|
|
24
|
-
outputFilterSensitiveLog: models_0_1.
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.InvokeEndpointInputFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.InvokeEndpointOutputFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
const { requestHandler } = configuration;
|
|
27
27
|
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.InvokeEndpointAsyncOutputFilterSensitiveLog = exports.InvokeEndpointAsyncInputFilterSensitiveLog = exports.InvokeEndpointOutputFilterSensitiveLog = exports.InvokeEndpointInputFilterSensitiveLog = exports.ValidationError = exports.ServiceUnavailable = exports.ModelNotReadyException = exports.ModelError = exports.InternalFailure = exports.InternalDependencyException = void 0;
|
|
4
4
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
5
|
const SageMakerRuntimeServiceException_1 = require("./SageMakerRuntimeServiceException");
|
|
6
6
|
class InternalDependencyException extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
@@ -31,22 +31,6 @@ class InternalFailure extends SageMakerRuntimeServiceException_1.SageMakerRuntim
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
exports.InternalFailure = InternalFailure;
|
|
34
|
-
var InvokeEndpointInput;
|
|
35
|
-
(function (InvokeEndpointInput) {
|
|
36
|
-
InvokeEndpointInput.filterSensitiveLog = (obj) => ({
|
|
37
|
-
...obj,
|
|
38
|
-
...(obj.Body && { Body: smithy_client_1.SENSITIVE_STRING }),
|
|
39
|
-
...(obj.CustomAttributes && { CustomAttributes: smithy_client_1.SENSITIVE_STRING }),
|
|
40
|
-
});
|
|
41
|
-
})(InvokeEndpointInput = exports.InvokeEndpointInput || (exports.InvokeEndpointInput = {}));
|
|
42
|
-
var InvokeEndpointOutput;
|
|
43
|
-
(function (InvokeEndpointOutput) {
|
|
44
|
-
InvokeEndpointOutput.filterSensitiveLog = (obj) => ({
|
|
45
|
-
...obj,
|
|
46
|
-
...(obj.Body && { Body: smithy_client_1.SENSITIVE_STRING }),
|
|
47
|
-
...(obj.CustomAttributes && { CustomAttributes: smithy_client_1.SENSITIVE_STRING }),
|
|
48
|
-
});
|
|
49
|
-
})(InvokeEndpointOutput = exports.InvokeEndpointOutput || (exports.InvokeEndpointOutput = {}));
|
|
50
34
|
class ModelError extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
51
35
|
constructor(opts) {
|
|
52
36
|
super({
|
|
@@ -106,16 +90,24 @@ class ValidationError extends SageMakerRuntimeServiceException_1.SageMakerRuntim
|
|
|
106
90
|
}
|
|
107
91
|
}
|
|
108
92
|
exports.ValidationError = ValidationError;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
93
|
+
const InvokeEndpointInputFilterSensitiveLog = (obj) => ({
|
|
94
|
+
...obj,
|
|
95
|
+
...(obj.Body && { Body: smithy_client_1.SENSITIVE_STRING }),
|
|
96
|
+
...(obj.CustomAttributes && { CustomAttributes: smithy_client_1.SENSITIVE_STRING }),
|
|
97
|
+
});
|
|
98
|
+
exports.InvokeEndpointInputFilterSensitiveLog = InvokeEndpointInputFilterSensitiveLog;
|
|
99
|
+
const InvokeEndpointOutputFilterSensitiveLog = (obj) => ({
|
|
100
|
+
...obj,
|
|
101
|
+
...(obj.Body && { Body: smithy_client_1.SENSITIVE_STRING }),
|
|
102
|
+
...(obj.CustomAttributes && { CustomAttributes: smithy_client_1.SENSITIVE_STRING }),
|
|
103
|
+
});
|
|
104
|
+
exports.InvokeEndpointOutputFilterSensitiveLog = InvokeEndpointOutputFilterSensitiveLog;
|
|
105
|
+
const InvokeEndpointAsyncInputFilterSensitiveLog = (obj) => ({
|
|
106
|
+
...obj,
|
|
107
|
+
...(obj.CustomAttributes && { CustomAttributes: smithy_client_1.SENSITIVE_STRING }),
|
|
108
|
+
});
|
|
109
|
+
exports.InvokeEndpointAsyncInputFilterSensitiveLog = InvokeEndpointAsyncInputFilterSensitiveLog;
|
|
110
|
+
const InvokeEndpointAsyncOutputFilterSensitiveLog = (obj) => ({
|
|
111
|
+
...obj,
|
|
112
|
+
});
|
|
113
|
+
exports.InvokeEndpointAsyncOutputFilterSensitiveLog = InvokeEndpointAsyncOutputFilterSensitiveLog;
|
|
@@ -7,31 +7,17 @@ const models_0_1 = require("../models/models_0");
|
|
|
7
7
|
const SageMakerRuntimeServiceException_1 = require("../models/SageMakerRuntimeServiceException");
|
|
8
8
|
const serializeAws_restJson1InvokeEndpointCommand = async (input, context) => {
|
|
9
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/octet-stream",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
...(isSerializableHeaderValue(input.TargetContainerHostname) && {
|
|
20
|
-
"x-amzn-sagemaker-target-container-hostname": input.TargetContainerHostname,
|
|
21
|
-
}),
|
|
22
|
-
...(isSerializableHeaderValue(input.InferenceId) && { "x-amzn-sagemaker-inference-id": input.InferenceId }),
|
|
23
|
-
};
|
|
10
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
11
|
+
"content-type": input.ContentType || "application/octet-stream",
|
|
12
|
+
accept: input.Accept,
|
|
13
|
+
"x-amzn-sagemaker-custom-attributes": input.CustomAttributes,
|
|
14
|
+
"x-amzn-sagemaker-target-model": input.TargetModel,
|
|
15
|
+
"x-amzn-sagemaker-target-variant": input.TargetVariant,
|
|
16
|
+
"x-amzn-sagemaker-target-container-hostname": input.TargetContainerHostname,
|
|
17
|
+
"x-amzn-sagemaker-inference-id": input.InferenceId,
|
|
18
|
+
});
|
|
24
19
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/endpoints/{EndpointName}/invocations";
|
|
25
|
-
|
|
26
|
-
const labelValue = input.EndpointName;
|
|
27
|
-
if (labelValue.length <= 0) {
|
|
28
|
-
throw new Error("Empty value provided for input HTTP label: EndpointName.");
|
|
29
|
-
}
|
|
30
|
-
resolvedPath = resolvedPath.replace("{EndpointName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
throw new Error("No value provided for input HTTP label: EndpointName.");
|
|
34
|
-
}
|
|
20
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EndpointName", () => input.EndpointName, "{EndpointName}", false);
|
|
35
21
|
let body;
|
|
36
22
|
if (input.Body !== undefined) {
|
|
37
23
|
body = input.Body;
|
|
@@ -49,30 +35,20 @@ const serializeAws_restJson1InvokeEndpointCommand = async (input, context) => {
|
|
|
49
35
|
exports.serializeAws_restJson1InvokeEndpointCommand = serializeAws_restJson1InvokeEndpointCommand;
|
|
50
36
|
const serializeAws_restJson1InvokeEndpointAsyncCommand = async (input, context) => {
|
|
51
37
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
52
|
-
const headers = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
};
|
|
38
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
39
|
+
"x-amzn-sagemaker-content-type": input.ContentType,
|
|
40
|
+
"x-amzn-sagemaker-accept": input.Accept,
|
|
41
|
+
"x-amzn-sagemaker-custom-attributes": input.CustomAttributes,
|
|
42
|
+
"x-amzn-sagemaker-inference-id": input.InferenceId,
|
|
43
|
+
"x-amzn-sagemaker-inputlocation": input.InputLocation,
|
|
44
|
+
"x-amzn-sagemaker-requestttlseconds": [
|
|
45
|
+
() => isSerializableHeaderValue(input.RequestTTLSeconds),
|
|
46
|
+
() => input.RequestTTLSeconds.toString(),
|
|
47
|
+
],
|
|
48
|
+
});
|
|
64
49
|
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
|
|
65
50
|
"/endpoints/{EndpointName}/async-invocations";
|
|
66
|
-
|
|
67
|
-
const labelValue = input.EndpointName;
|
|
68
|
-
if (labelValue.length <= 0) {
|
|
69
|
-
throw new Error("Empty value provided for input HTTP label: EndpointName.");
|
|
70
|
-
}
|
|
71
|
-
resolvedPath = resolvedPath.replace("{EndpointName}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
throw new Error("No value provided for input HTTP label: EndpointName.");
|
|
75
|
-
}
|
|
51
|
+
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EndpointName", () => input.EndpointName, "{EndpointName}", false);
|
|
76
52
|
let body;
|
|
77
53
|
return new protocol_http_1.HttpRequest({
|
|
78
54
|
protocol,
|
|
@@ -89,25 +65,15 @@ const deserializeAws_restJson1InvokeEndpointCommand = async (output, context) =>
|
|
|
89
65
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
90
66
|
return deserializeAws_restJson1InvokeEndpointCommandError(output, context);
|
|
91
67
|
}
|
|
92
|
-
const contents = {
|
|
68
|
+
const contents = map({
|
|
93
69
|
$metadata: deserializeMetadata(output),
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
CustomAttributes:
|
|
97
|
-
|
|
98
|
-
};
|
|
99
|
-
if (output.headers["content-type"] !== undefined) {
|
|
100
|
-
contents.ContentType = output.headers["content-type"];
|
|
101
|
-
}
|
|
102
|
-
if (output.headers["x-amzn-invoked-production-variant"] !== undefined) {
|
|
103
|
-
contents.InvokedProductionVariant = output.headers["x-amzn-invoked-production-variant"];
|
|
104
|
-
}
|
|
105
|
-
if (output.headers["x-amzn-sagemaker-custom-attributes"] !== undefined) {
|
|
106
|
-
contents.CustomAttributes = output.headers["x-amzn-sagemaker-custom-attributes"];
|
|
107
|
-
}
|
|
70
|
+
ContentType: [, output.headers["content-type"]],
|
|
71
|
+
InvokedProductionVariant: [, output.headers["x-amzn-invoked-production-variant"]],
|
|
72
|
+
CustomAttributes: [, output.headers["x-amzn-sagemaker-custom-attributes"]],
|
|
73
|
+
});
|
|
108
74
|
const data = await collectBody(output.body, context);
|
|
109
75
|
contents.Body = data;
|
|
110
|
-
return
|
|
76
|
+
return contents;
|
|
111
77
|
};
|
|
112
78
|
exports.deserializeAws_restJson1InvokeEndpointCommand = deserializeAws_restJson1InvokeEndpointCommand;
|
|
113
79
|
const deserializeAws_restJson1InvokeEndpointCommandError = async (output, context) => {
|
|
@@ -115,7 +81,6 @@ const deserializeAws_restJson1InvokeEndpointCommandError = async (output, contex
|
|
|
115
81
|
...output,
|
|
116
82
|
body: await parseBody(output.body, context),
|
|
117
83
|
};
|
|
118
|
-
let response;
|
|
119
84
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
120
85
|
switch (errorCode) {
|
|
121
86
|
case "InternalDependencyException":
|
|
@@ -138,33 +103,27 @@ const deserializeAws_restJson1InvokeEndpointCommandError = async (output, contex
|
|
|
138
103
|
throw await deserializeAws_restJson1ValidationErrorResponse(parsedOutput, context);
|
|
139
104
|
default:
|
|
140
105
|
const parsedBody = parsedOutput.body;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
$metadata,
|
|
106
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
107
|
+
output,
|
|
108
|
+
parsedBody,
|
|
109
|
+
exceptionCtor: SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException,
|
|
110
|
+
errorCode,
|
|
147
111
|
});
|
|
148
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
149
112
|
}
|
|
150
113
|
};
|
|
151
114
|
const deserializeAws_restJson1InvokeEndpointAsyncCommand = async (output, context) => {
|
|
152
115
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
153
116
|
return deserializeAws_restJson1InvokeEndpointAsyncCommandError(output, context);
|
|
154
117
|
}
|
|
155
|
-
const contents = {
|
|
118
|
+
const contents = map({
|
|
156
119
|
$metadata: deserializeMetadata(output),
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
};
|
|
160
|
-
if (output.headers["x-amzn-sagemaker-outputlocation"] !== undefined) {
|
|
161
|
-
contents.OutputLocation = output.headers["x-amzn-sagemaker-outputlocation"];
|
|
162
|
-
}
|
|
120
|
+
OutputLocation: [, output.headers["x-amzn-sagemaker-outputlocation"]],
|
|
121
|
+
});
|
|
163
122
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
164
|
-
if (data.InferenceId
|
|
123
|
+
if (data.InferenceId != null) {
|
|
165
124
|
contents.InferenceId = (0, smithy_client_1.expectString)(data.InferenceId);
|
|
166
125
|
}
|
|
167
|
-
return
|
|
126
|
+
return contents;
|
|
168
127
|
};
|
|
169
128
|
exports.deserializeAws_restJson1InvokeEndpointAsyncCommand = deserializeAws_restJson1InvokeEndpointAsyncCommand;
|
|
170
129
|
const deserializeAws_restJson1InvokeEndpointAsyncCommandError = async (output, context) => {
|
|
@@ -172,7 +131,6 @@ const deserializeAws_restJson1InvokeEndpointAsyncCommandError = async (output, c
|
|
|
172
131
|
...output,
|
|
173
132
|
body: await parseBody(output.body, context),
|
|
174
133
|
};
|
|
175
|
-
let response;
|
|
176
134
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
177
135
|
switch (errorCode) {
|
|
178
136
|
case "InternalFailure":
|
|
@@ -186,20 +144,19 @@ const deserializeAws_restJson1InvokeEndpointAsyncCommandError = async (output, c
|
|
|
186
144
|
throw await deserializeAws_restJson1ValidationErrorResponse(parsedOutput, context);
|
|
187
145
|
default:
|
|
188
146
|
const parsedBody = parsedOutput.body;
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
$metadata,
|
|
147
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
148
|
+
output,
|
|
149
|
+
parsedBody,
|
|
150
|
+
exceptionCtor: SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException,
|
|
151
|
+
errorCode,
|
|
195
152
|
});
|
|
196
|
-
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
197
153
|
}
|
|
198
154
|
};
|
|
155
|
+
const map = smithy_client_1.map;
|
|
199
156
|
const deserializeAws_restJson1InternalDependencyExceptionResponse = async (parsedOutput, context) => {
|
|
200
|
-
const contents = {};
|
|
157
|
+
const contents = map({});
|
|
201
158
|
const data = parsedOutput.body;
|
|
202
|
-
if (data.Message
|
|
159
|
+
if (data.Message != null) {
|
|
203
160
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
204
161
|
}
|
|
205
162
|
const exception = new models_0_1.InternalDependencyException({
|
|
@@ -209,9 +166,9 @@ const deserializeAws_restJson1InternalDependencyExceptionResponse = async (parse
|
|
|
209
166
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
210
167
|
};
|
|
211
168
|
const deserializeAws_restJson1InternalFailureResponse = async (parsedOutput, context) => {
|
|
212
|
-
const contents = {};
|
|
169
|
+
const contents = map({});
|
|
213
170
|
const data = parsedOutput.body;
|
|
214
|
-
if (data.Message
|
|
171
|
+
if (data.Message != null) {
|
|
215
172
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
216
173
|
}
|
|
217
174
|
const exception = new models_0_1.InternalFailure({
|
|
@@ -221,18 +178,18 @@ const deserializeAws_restJson1InternalFailureResponse = async (parsedOutput, con
|
|
|
221
178
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
222
179
|
};
|
|
223
180
|
const deserializeAws_restJson1ModelErrorResponse = async (parsedOutput, context) => {
|
|
224
|
-
const contents = {};
|
|
181
|
+
const contents = map({});
|
|
225
182
|
const data = parsedOutput.body;
|
|
226
|
-
if (data.LogStreamArn
|
|
183
|
+
if (data.LogStreamArn != null) {
|
|
227
184
|
contents.LogStreamArn = (0, smithy_client_1.expectString)(data.LogStreamArn);
|
|
228
185
|
}
|
|
229
|
-
if (data.Message
|
|
186
|
+
if (data.Message != null) {
|
|
230
187
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
231
188
|
}
|
|
232
|
-
if (data.OriginalMessage
|
|
189
|
+
if (data.OriginalMessage != null) {
|
|
233
190
|
contents.OriginalMessage = (0, smithy_client_1.expectString)(data.OriginalMessage);
|
|
234
191
|
}
|
|
235
|
-
if (data.OriginalStatusCode
|
|
192
|
+
if (data.OriginalStatusCode != null) {
|
|
236
193
|
contents.OriginalStatusCode = (0, smithy_client_1.expectInt32)(data.OriginalStatusCode);
|
|
237
194
|
}
|
|
238
195
|
const exception = new models_0_1.ModelError({
|
|
@@ -242,9 +199,9 @@ const deserializeAws_restJson1ModelErrorResponse = async (parsedOutput, context)
|
|
|
242
199
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
243
200
|
};
|
|
244
201
|
const deserializeAws_restJson1ModelNotReadyExceptionResponse = async (parsedOutput, context) => {
|
|
245
|
-
const contents = {};
|
|
202
|
+
const contents = map({});
|
|
246
203
|
const data = parsedOutput.body;
|
|
247
|
-
if (data.Message
|
|
204
|
+
if (data.Message != null) {
|
|
248
205
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
249
206
|
}
|
|
250
207
|
const exception = new models_0_1.ModelNotReadyException({
|
|
@@ -254,9 +211,9 @@ const deserializeAws_restJson1ModelNotReadyExceptionResponse = async (parsedOutp
|
|
|
254
211
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
255
212
|
};
|
|
256
213
|
const deserializeAws_restJson1ServiceUnavailableResponse = async (parsedOutput, context) => {
|
|
257
|
-
const contents = {};
|
|
214
|
+
const contents = map({});
|
|
258
215
|
const data = parsedOutput.body;
|
|
259
|
-
if (data.Message
|
|
216
|
+
if (data.Message != null) {
|
|
260
217
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
261
218
|
}
|
|
262
219
|
const exception = new models_0_1.ServiceUnavailable({
|
|
@@ -266,9 +223,9 @@ const deserializeAws_restJson1ServiceUnavailableResponse = async (parsedOutput,
|
|
|
266
223
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
267
224
|
};
|
|
268
225
|
const deserializeAws_restJson1ValidationErrorResponse = async (parsedOutput, context) => {
|
|
269
|
-
const contents = {};
|
|
226
|
+
const contents = map({});
|
|
270
227
|
const data = parsedOutput.body;
|
|
271
|
-
if (data.Message
|
|
228
|
+
if (data.Message != null) {
|
|
272
229
|
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
273
230
|
}
|
|
274
231
|
const exception = new models_0_1.ValidationError({
|
|
@@ -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 {
|
|
4
|
+
import { InvokeEndpointAsyncInputFilterSensitiveLog, InvokeEndpointAsyncOutputFilterSensitiveLog, } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1InvokeEndpointAsyncCommand, serializeAws_restJson1InvokeEndpointAsyncCommand, } from "../protocols/Aws_restJson1";
|
|
6
6
|
var InvokeEndpointAsyncCommand = (function (_super) {
|
|
7
7
|
__extends(InvokeEndpointAsyncCommand, _super);
|
|
@@ -20,8 +20,8 @@ var InvokeEndpointAsyncCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
24
|
-
outputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: InvokeEndpointAsyncInputFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: InvokeEndpointAsyncOutputFilterSensitiveLog,
|
|
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 {
|
|
4
|
+
import { InvokeEndpointInputFilterSensitiveLog, InvokeEndpointOutputFilterSensitiveLog, } from "../models/models_0";
|
|
5
5
|
import { deserializeAws_restJson1InvokeEndpointCommand, serializeAws_restJson1InvokeEndpointCommand, } from "../protocols/Aws_restJson1";
|
|
6
6
|
var InvokeEndpointCommand = (function (_super) {
|
|
7
7
|
__extends(InvokeEndpointCommand, _super);
|
|
@@ -20,8 +20,8 @@ var InvokeEndpointCommand = (function (_super) {
|
|
|
20
20
|
logger: logger,
|
|
21
21
|
clientName: clientName,
|
|
22
22
|
commandName: commandName,
|
|
23
|
-
inputFilterSensitiveLog:
|
|
24
|
-
outputFilterSensitiveLog:
|
|
23
|
+
inputFilterSensitiveLog: InvokeEndpointInputFilterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: InvokeEndpointOutputFilterSensitiveLog,
|
|
25
25
|
};
|
|
26
26
|
var requestHandler = configuration.requestHandler;
|
|
27
27
|
return stack.resolve(function (request) {
|
|
@@ -27,14 +27,6 @@ var InternalFailure = (function (_super) {
|
|
|
27
27
|
return InternalFailure;
|
|
28
28
|
}(__BaseException));
|
|
29
29
|
export { InternalFailure };
|
|
30
|
-
export var InvokeEndpointInput;
|
|
31
|
-
(function (InvokeEndpointInput) {
|
|
32
|
-
InvokeEndpointInput.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Body && { Body: SENSITIVE_STRING })), (obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }))); };
|
|
33
|
-
})(InvokeEndpointInput || (InvokeEndpointInput = {}));
|
|
34
|
-
export var InvokeEndpointOutput;
|
|
35
|
-
(function (InvokeEndpointOutput) {
|
|
36
|
-
InvokeEndpointOutput.filterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Body && { Body: SENSITIVE_STRING })), (obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }))); };
|
|
37
|
-
})(InvokeEndpointOutput || (InvokeEndpointOutput = {}));
|
|
38
30
|
var ModelError = (function (_super) {
|
|
39
31
|
__extends(ModelError, _super);
|
|
40
32
|
function ModelError(opts) {
|
|
@@ -90,11 +82,7 @@ var ValidationError = (function (_super) {
|
|
|
90
82
|
return ValidationError;
|
|
91
83
|
}(__BaseException));
|
|
92
84
|
export { ValidationError };
|
|
93
|
-
export var
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export var InvokeEndpointAsyncOutput;
|
|
98
|
-
(function (InvokeEndpointAsyncOutput) {
|
|
99
|
-
InvokeEndpointAsyncOutput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
100
|
-
})(InvokeEndpointAsyncOutput || (InvokeEndpointAsyncOutput = {}));
|
|
85
|
+
export var InvokeEndpointInputFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Body && { Body: SENSITIVE_STRING })), (obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }))); };
|
|
86
|
+
export var InvokeEndpointOutputFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Body && { Body: SENSITIVE_STRING })), (obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }))); };
|
|
87
|
+
export var InvokeEndpointAsyncInputFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }))); };
|
|
88
|
+
export var InvokeEndpointAsyncOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString,
|
|
3
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
4
|
import { InternalDependencyException, InternalFailure, ModelError, ModelNotReadyException, ServiceUnavailable, ValidationError, } from "../models/models_0";
|
|
5
5
|
import { SageMakerRuntimeServiceException as __BaseException } from "../models/SageMakerRuntimeServiceException";
|
|
6
6
|
export var serializeAws_restJson1InvokeEndpointCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
7
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
7
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
8
8
|
return __generator(this, function (_c) {
|
|
9
9
|
switch (_c.label) {
|
|
10
10
|
case 0: return [4, context.endpoint()];
|
|
11
11
|
case 1:
|
|
12
12
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
13
|
-
headers =
|
|
13
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
14
|
+
"content-type": input.ContentType || "application/octet-stream",
|
|
15
|
+
accept: input.Accept,
|
|
14
16
|
"x-amzn-sagemaker-custom-attributes": input.CustomAttributes,
|
|
15
|
-
|
|
17
|
+
"x-amzn-sagemaker-target-model": input.TargetModel,
|
|
18
|
+
"x-amzn-sagemaker-target-variant": input.TargetVariant,
|
|
16
19
|
"x-amzn-sagemaker-target-container-hostname": input.TargetContainerHostname,
|
|
17
|
-
|
|
20
|
+
"x-amzn-sagemaker-inference-id": input.InferenceId,
|
|
21
|
+
});
|
|
18
22
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/endpoints/{EndpointName}/invocations";
|
|
19
|
-
|
|
20
|
-
labelValue = input.EndpointName;
|
|
21
|
-
if (labelValue.length <= 0) {
|
|
22
|
-
throw new Error("Empty value provided for input HTTP label: EndpointName.");
|
|
23
|
-
}
|
|
24
|
-
resolvedPath = resolvedPath.replace("{EndpointName}", __extendedEncodeURIComponent(labelValue));
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
throw new Error("No value provided for input HTTP label: EndpointName.");
|
|
28
|
-
}
|
|
23
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "EndpointName", function () { return input.EndpointName; }, "{EndpointName}", false);
|
|
29
24
|
if (input.Body !== undefined) {
|
|
30
25
|
body = input.Body;
|
|
31
26
|
}
|
|
@@ -42,29 +37,26 @@ export var serializeAws_restJson1InvokeEndpointCommand = function (input, contex
|
|
|
42
37
|
});
|
|
43
38
|
}); };
|
|
44
39
|
export var serializeAws_restJson1InvokeEndpointAsyncCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
45
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath,
|
|
40
|
+
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
46
41
|
return __generator(this, function (_c) {
|
|
47
42
|
switch (_c.label) {
|
|
48
43
|
case 0: return [4, context.endpoint()];
|
|
49
44
|
case 1:
|
|
50
45
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
51
|
-
headers =
|
|
46
|
+
headers = map({}, isSerializableHeaderValue, {
|
|
47
|
+
"x-amzn-sagemaker-content-type": input.ContentType,
|
|
48
|
+
"x-amzn-sagemaker-accept": input.Accept,
|
|
52
49
|
"x-amzn-sagemaker-custom-attributes": input.CustomAttributes,
|
|
53
|
-
|
|
54
|
-
"x-amzn-sagemaker-
|
|
55
|
-
|
|
50
|
+
"x-amzn-sagemaker-inference-id": input.InferenceId,
|
|
51
|
+
"x-amzn-sagemaker-inputlocation": input.InputLocation,
|
|
52
|
+
"x-amzn-sagemaker-requestttlseconds": [
|
|
53
|
+
function () { return isSerializableHeaderValue(input.RequestTTLSeconds); },
|
|
54
|
+
function () { return input.RequestTTLSeconds.toString(); },
|
|
55
|
+
],
|
|
56
|
+
});
|
|
56
57
|
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") +
|
|
57
58
|
"/endpoints/{EndpointName}/async-invocations";
|
|
58
|
-
|
|
59
|
-
labelValue = input.EndpointName;
|
|
60
|
-
if (labelValue.length <= 0) {
|
|
61
|
-
throw new Error("Empty value provided for input HTTP label: EndpointName.");
|
|
62
|
-
}
|
|
63
|
-
resolvedPath = resolvedPath.replace("{EndpointName}", __extendedEncodeURIComponent(labelValue));
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
throw new Error("No value provided for input HTTP label: EndpointName.");
|
|
67
|
-
}
|
|
59
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "EndpointName", function () { return input.EndpointName; }, "{EndpointName}", false);
|
|
68
60
|
return [2, new __HttpRequest({
|
|
69
61
|
protocol: protocol,
|
|
70
62
|
hostname: hostname,
|
|
@@ -85,32 +77,22 @@ export var deserializeAws_restJson1InvokeEndpointCommand = function (output, con
|
|
|
85
77
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
86
78
|
return [2, deserializeAws_restJson1InvokeEndpointCommandError(output, context)];
|
|
87
79
|
}
|
|
88
|
-
contents = {
|
|
80
|
+
contents = map({
|
|
89
81
|
$metadata: deserializeMetadata(output),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
CustomAttributes:
|
|
93
|
-
|
|
94
|
-
};
|
|
95
|
-
if (output.headers["content-type"] !== undefined) {
|
|
96
|
-
contents.ContentType = output.headers["content-type"];
|
|
97
|
-
}
|
|
98
|
-
if (output.headers["x-amzn-invoked-production-variant"] !== undefined) {
|
|
99
|
-
contents.InvokedProductionVariant = output.headers["x-amzn-invoked-production-variant"];
|
|
100
|
-
}
|
|
101
|
-
if (output.headers["x-amzn-sagemaker-custom-attributes"] !== undefined) {
|
|
102
|
-
contents.CustomAttributes = output.headers["x-amzn-sagemaker-custom-attributes"];
|
|
103
|
-
}
|
|
82
|
+
ContentType: [, output.headers["content-type"]],
|
|
83
|
+
InvokedProductionVariant: [, output.headers["x-amzn-invoked-production-variant"]],
|
|
84
|
+
CustomAttributes: [, output.headers["x-amzn-sagemaker-custom-attributes"]],
|
|
85
|
+
});
|
|
104
86
|
return [4, collectBody(output.body, context)];
|
|
105
87
|
case 1:
|
|
106
88
|
data = _a.sent();
|
|
107
89
|
contents.Body = data;
|
|
108
|
-
return [2,
|
|
90
|
+
return [2, contents];
|
|
109
91
|
}
|
|
110
92
|
});
|
|
111
93
|
}); };
|
|
112
94
|
var deserializeAws_restJson1InvokeEndpointCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
|
-
var parsedOutput, _a,
|
|
95
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
114
96
|
var _c;
|
|
115
97
|
return __generator(this, function (_d) {
|
|
116
98
|
switch (_d.label) {
|
|
@@ -151,14 +133,14 @@ var deserializeAws_restJson1InvokeEndpointCommandError = function (output, conte
|
|
|
151
133
|
case 13: throw _d.sent();
|
|
152
134
|
case 14:
|
|
153
135
|
parsedBody = parsedOutput.body;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
$metadata: $metadata,
|
|
136
|
+
throwDefaultError({
|
|
137
|
+
output: output,
|
|
138
|
+
parsedBody: parsedBody,
|
|
139
|
+
exceptionCtor: __BaseException,
|
|
140
|
+
errorCode: errorCode,
|
|
160
141
|
});
|
|
161
|
-
|
|
142
|
+
_d.label = 15;
|
|
143
|
+
case 15: return [2];
|
|
162
144
|
}
|
|
163
145
|
});
|
|
164
146
|
}); };
|
|
@@ -170,28 +152,24 @@ export var deserializeAws_restJson1InvokeEndpointAsyncCommand = function (output
|
|
|
170
152
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
171
153
|
return [2, deserializeAws_restJson1InvokeEndpointAsyncCommandError(output, context)];
|
|
172
154
|
}
|
|
173
|
-
contents = {
|
|
155
|
+
contents = map({
|
|
174
156
|
$metadata: deserializeMetadata(output),
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
};
|
|
178
|
-
if (output.headers["x-amzn-sagemaker-outputlocation"] !== undefined) {
|
|
179
|
-
contents.OutputLocation = output.headers["x-amzn-sagemaker-outputlocation"];
|
|
180
|
-
}
|
|
157
|
+
OutputLocation: [, output.headers["x-amzn-sagemaker-outputlocation"]],
|
|
158
|
+
});
|
|
181
159
|
_a = __expectNonNull;
|
|
182
160
|
_b = __expectObject;
|
|
183
161
|
return [4, parseBody(output.body, context)];
|
|
184
162
|
case 1:
|
|
185
163
|
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
186
|
-
if (data.InferenceId
|
|
164
|
+
if (data.InferenceId != null) {
|
|
187
165
|
contents.InferenceId = __expectString(data.InferenceId);
|
|
188
166
|
}
|
|
189
|
-
return [2,
|
|
167
|
+
return [2, contents];
|
|
190
168
|
}
|
|
191
169
|
});
|
|
192
170
|
}); };
|
|
193
171
|
var deserializeAws_restJson1InvokeEndpointAsyncCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
194
|
-
var parsedOutput, _a,
|
|
172
|
+
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
195
173
|
var _c;
|
|
196
174
|
return __generator(this, function (_d) {
|
|
197
175
|
switch (_d.label) {
|
|
@@ -220,23 +198,24 @@ var deserializeAws_restJson1InvokeEndpointAsyncCommandError = function (output,
|
|
|
220
198
|
case 7: throw _d.sent();
|
|
221
199
|
case 8:
|
|
222
200
|
parsedBody = parsedOutput.body;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
$metadata: $metadata,
|
|
201
|
+
throwDefaultError({
|
|
202
|
+
output: output,
|
|
203
|
+
parsedBody: parsedBody,
|
|
204
|
+
exceptionCtor: __BaseException,
|
|
205
|
+
errorCode: errorCode,
|
|
229
206
|
});
|
|
230
|
-
|
|
207
|
+
_d.label = 9;
|
|
208
|
+
case 9: return [2];
|
|
231
209
|
}
|
|
232
210
|
});
|
|
233
211
|
}); };
|
|
212
|
+
var map = __map;
|
|
234
213
|
var deserializeAws_restJson1InternalDependencyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
235
214
|
var contents, data, exception;
|
|
236
215
|
return __generator(this, function (_a) {
|
|
237
|
-
contents = {};
|
|
216
|
+
contents = map({});
|
|
238
217
|
data = parsedOutput.body;
|
|
239
|
-
if (data.Message
|
|
218
|
+
if (data.Message != null) {
|
|
240
219
|
contents.Message = __expectString(data.Message);
|
|
241
220
|
}
|
|
242
221
|
exception = new InternalDependencyException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -246,9 +225,9 @@ var deserializeAws_restJson1InternalDependencyExceptionResponse = function (pars
|
|
|
246
225
|
var deserializeAws_restJson1InternalFailureResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
247
226
|
var contents, data, exception;
|
|
248
227
|
return __generator(this, function (_a) {
|
|
249
|
-
contents = {};
|
|
228
|
+
contents = map({});
|
|
250
229
|
data = parsedOutput.body;
|
|
251
|
-
if (data.Message
|
|
230
|
+
if (data.Message != null) {
|
|
252
231
|
contents.Message = __expectString(data.Message);
|
|
253
232
|
}
|
|
254
233
|
exception = new InternalFailure(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -258,18 +237,18 @@ var deserializeAws_restJson1InternalFailureResponse = function (parsedOutput, co
|
|
|
258
237
|
var deserializeAws_restJson1ModelErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
259
238
|
var contents, data, exception;
|
|
260
239
|
return __generator(this, function (_a) {
|
|
261
|
-
contents = {};
|
|
240
|
+
contents = map({});
|
|
262
241
|
data = parsedOutput.body;
|
|
263
|
-
if (data.LogStreamArn
|
|
242
|
+
if (data.LogStreamArn != null) {
|
|
264
243
|
contents.LogStreamArn = __expectString(data.LogStreamArn);
|
|
265
244
|
}
|
|
266
|
-
if (data.Message
|
|
245
|
+
if (data.Message != null) {
|
|
267
246
|
contents.Message = __expectString(data.Message);
|
|
268
247
|
}
|
|
269
|
-
if (data.OriginalMessage
|
|
248
|
+
if (data.OriginalMessage != null) {
|
|
270
249
|
contents.OriginalMessage = __expectString(data.OriginalMessage);
|
|
271
250
|
}
|
|
272
|
-
if (data.OriginalStatusCode
|
|
251
|
+
if (data.OriginalStatusCode != null) {
|
|
273
252
|
contents.OriginalStatusCode = __expectInt32(data.OriginalStatusCode);
|
|
274
253
|
}
|
|
275
254
|
exception = new ModelError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -279,9 +258,9 @@ var deserializeAws_restJson1ModelErrorResponse = function (parsedOutput, context
|
|
|
279
258
|
var deserializeAws_restJson1ModelNotReadyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
280
259
|
var contents, data, exception;
|
|
281
260
|
return __generator(this, function (_a) {
|
|
282
|
-
contents = {};
|
|
261
|
+
contents = map({});
|
|
283
262
|
data = parsedOutput.body;
|
|
284
|
-
if (data.Message
|
|
263
|
+
if (data.Message != null) {
|
|
285
264
|
contents.Message = __expectString(data.Message);
|
|
286
265
|
}
|
|
287
266
|
exception = new ModelNotReadyException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -291,9 +270,9 @@ var deserializeAws_restJson1ModelNotReadyExceptionResponse = function (parsedOut
|
|
|
291
270
|
var deserializeAws_restJson1ServiceUnavailableResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
292
271
|
var contents, data, exception;
|
|
293
272
|
return __generator(this, function (_a) {
|
|
294
|
-
contents = {};
|
|
273
|
+
contents = map({});
|
|
295
274
|
data = parsedOutput.body;
|
|
296
|
-
if (data.Message
|
|
275
|
+
if (data.Message != null) {
|
|
297
276
|
contents.Message = __expectString(data.Message);
|
|
298
277
|
}
|
|
299
278
|
exception = new ServiceUnavailable(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -303,9 +282,9 @@ var deserializeAws_restJson1ServiceUnavailableResponse = function (parsedOutput,
|
|
|
303
282
|
var deserializeAws_restJson1ValidationErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
304
283
|
var contents, data, exception;
|
|
305
284
|
return __generator(this, function (_a) {
|
|
306
|
-
contents = {};
|
|
285
|
+
contents = map({});
|
|
307
286
|
data = parsedOutput.body;
|
|
308
|
-
if (data.Message
|
|
287
|
+
if (data.Message != null) {
|
|
309
288
|
contents.Message = __expectString(data.Message);
|
|
310
289
|
}
|
|
311
290
|
exception = new ValidationError(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
@@ -89,12 +89,6 @@ export interface InvokeEndpointInput {
|
|
|
89
89
|
*/
|
|
90
90
|
InferenceId?: string;
|
|
91
91
|
}
|
|
92
|
-
export declare namespace InvokeEndpointInput {
|
|
93
|
-
/**
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
96
|
-
const filterSensitiveLog: (obj: InvokeEndpointInput) => any;
|
|
97
|
-
}
|
|
98
92
|
export interface InvokeEndpointOutput {
|
|
99
93
|
/**
|
|
100
94
|
* <p>Includes the inference provided by the model.</p>
|
|
@@ -130,12 +124,6 @@ export interface InvokeEndpointOutput {
|
|
|
130
124
|
*/
|
|
131
125
|
CustomAttributes?: string;
|
|
132
126
|
}
|
|
133
|
-
export declare namespace InvokeEndpointOutput {
|
|
134
|
-
/**
|
|
135
|
-
* @internal
|
|
136
|
-
*/
|
|
137
|
-
const filterSensitiveLog: (obj: InvokeEndpointOutput) => any;
|
|
138
|
-
}
|
|
139
127
|
/**
|
|
140
128
|
* <p> Model (owned by the customer in the container) returned 4xx or 5xx error code.
|
|
141
129
|
* </p>
|
|
@@ -245,12 +233,6 @@ export interface InvokeEndpointAsyncInput {
|
|
|
245
233
|
*/
|
|
246
234
|
RequestTTLSeconds?: number;
|
|
247
235
|
}
|
|
248
|
-
export declare namespace InvokeEndpointAsyncInput {
|
|
249
|
-
/**
|
|
250
|
-
* @internal
|
|
251
|
-
*/
|
|
252
|
-
const filterSensitiveLog: (obj: InvokeEndpointAsyncInput) => any;
|
|
253
|
-
}
|
|
254
236
|
export interface InvokeEndpointAsyncOutput {
|
|
255
237
|
/**
|
|
256
238
|
* <p>Identifier for an inference request. This will be the same as the <code>InferenceId</code> specified
|
|
@@ -262,9 +244,19 @@ export interface InvokeEndpointAsyncOutput {
|
|
|
262
244
|
*/
|
|
263
245
|
OutputLocation?: string;
|
|
264
246
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
247
|
+
/**
|
|
248
|
+
* @internal
|
|
249
|
+
*/
|
|
250
|
+
export declare const InvokeEndpointInputFilterSensitiveLog: (obj: InvokeEndpointInput) => any;
|
|
251
|
+
/**
|
|
252
|
+
* @internal
|
|
253
|
+
*/
|
|
254
|
+
export declare const InvokeEndpointOutputFilterSensitiveLog: (obj: InvokeEndpointOutput) => any;
|
|
255
|
+
/**
|
|
256
|
+
* @internal
|
|
257
|
+
*/
|
|
258
|
+
export declare const InvokeEndpointAsyncInputFilterSensitiveLog: (obj: InvokeEndpointAsyncInput) => any;
|
|
259
|
+
/**
|
|
260
|
+
* @internal
|
|
261
|
+
*/
|
|
262
|
+
export declare const InvokeEndpointAsyncOutputFilterSensitiveLog: (obj: InvokeEndpointAsyncOutput) => any;
|
|
@@ -36,10 +36,6 @@ export interface InvokeEndpointInput {
|
|
|
36
36
|
|
|
37
37
|
InferenceId?: string;
|
|
38
38
|
}
|
|
39
|
-
export declare namespace InvokeEndpointInput {
|
|
40
|
-
|
|
41
|
-
const filterSensitiveLog: (obj: InvokeEndpointInput) => any;
|
|
42
|
-
}
|
|
43
39
|
export interface InvokeEndpointOutput {
|
|
44
40
|
|
|
45
41
|
Body: Uint8Array | undefined;
|
|
@@ -50,10 +46,6 @@ export interface InvokeEndpointOutput {
|
|
|
50
46
|
|
|
51
47
|
CustomAttributes?: string;
|
|
52
48
|
}
|
|
53
|
-
export declare namespace InvokeEndpointOutput {
|
|
54
|
-
|
|
55
|
-
const filterSensitiveLog: (obj: InvokeEndpointOutput) => any;
|
|
56
|
-
}
|
|
57
49
|
|
|
58
50
|
export declare class ModelError extends __BaseException {
|
|
59
51
|
readonly name: "ModelError";
|
|
@@ -108,17 +100,17 @@ export interface InvokeEndpointAsyncInput {
|
|
|
108
100
|
|
|
109
101
|
RequestTTLSeconds?: number;
|
|
110
102
|
}
|
|
111
|
-
export declare namespace InvokeEndpointAsyncInput {
|
|
112
|
-
|
|
113
|
-
const filterSensitiveLog: (obj: InvokeEndpointAsyncInput) => any;
|
|
114
|
-
}
|
|
115
103
|
export interface InvokeEndpointAsyncOutput {
|
|
116
104
|
|
|
117
105
|
InferenceId?: string;
|
|
118
106
|
|
|
119
107
|
OutputLocation?: string;
|
|
120
108
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
109
|
+
|
|
110
|
+
export declare const InvokeEndpointInputFilterSensitiveLog: (obj: InvokeEndpointInput) => any;
|
|
111
|
+
|
|
112
|
+
export declare const InvokeEndpointOutputFilterSensitiveLog: (obj: InvokeEndpointOutput) => any;
|
|
113
|
+
|
|
114
|
+
export declare const InvokeEndpointAsyncInputFilterSensitiveLog: (obj: InvokeEndpointAsyncInput) => any;
|
|
115
|
+
|
|
116
|
+
export declare const InvokeEndpointAsyncOutputFilterSensitiveLog: (obj: InvokeEndpointAsyncOutput) => any;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-sagemaker-runtime",
|
|
3
3
|
"description": "AWS SDK for JavaScript Sagemaker Runtime Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.142.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
20
20
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
21
|
-
"@aws-sdk/client-sts": "3.
|
|
21
|
+
"@aws-sdk/client-sts": "3.142.0",
|
|
22
22
|
"@aws-sdk/config-resolver": "3.130.0",
|
|
23
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/credential-provider-node": "3.142.0",
|
|
24
24
|
"@aws-sdk/fetch-http-handler": "3.131.0",
|
|
25
25
|
"@aws-sdk/hash-node": "3.127.0",
|
|
26
26
|
"@aws-sdk/invalid-dependency": "3.127.0",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"@aws-sdk/node-config-provider": "3.127.0",
|
|
37
37
|
"@aws-sdk/node-http-handler": "3.127.0",
|
|
38
38
|
"@aws-sdk/protocol-http": "3.127.0",
|
|
39
|
-
"@aws-sdk/smithy-client": "3.
|
|
39
|
+
"@aws-sdk/smithy-client": "3.142.0",
|
|
40
40
|
"@aws-sdk/types": "3.127.0",
|
|
41
41
|
"@aws-sdk/url-parser": "3.127.0",
|
|
42
42
|
"@aws-sdk/util-base64-browser": "3.109.0",
|
|
43
43
|
"@aws-sdk/util-base64-node": "3.55.0",
|
|
44
44
|
"@aws-sdk/util-body-length-browser": "3.55.0",
|
|
45
45
|
"@aws-sdk/util-body-length-node": "3.55.0",
|
|
46
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
47
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
46
|
+
"@aws-sdk/util-defaults-mode-browser": "3.142.0",
|
|
47
|
+
"@aws-sdk/util-defaults-mode-node": "3.142.0",
|
|
48
48
|
"@aws-sdk/util-user-agent-browser": "3.127.0",
|
|
49
49
|
"@aws-sdk/util-user-agent-node": "3.127.0",
|
|
50
50
|
"@aws-sdk/util-utf8-browser": "3.109.0",
|