@aws-sdk/client-sagemaker-runtime 3.1067.0 → 3.1069.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/dist-cjs/auth/httpAuthSchemeProvider.js +9 -15
- package/dist-cjs/endpoint/bdd.js +2 -5
- package/dist-cjs/endpoint/endpointResolver.js +7 -11
- package/dist-cjs/index.js +51 -71
- package/dist-cjs/models/SageMakerRuntimeServiceException.js +4 -8
- package/dist-cjs/models/errors.js +17 -28
- package/dist-cjs/runtimeConfig.browser.js +24 -28
- package/dist-cjs/runtimeConfig.js +32 -36
- package/dist-cjs/runtimeConfig.native.js +4 -7
- package/dist-cjs/runtimeConfig.shared.js +20 -24
- package/dist-cjs/schemas/schemas_0.js +57 -41
- package/dist-es/schemas/schemas_0.js +4 -2
- package/dist-types/commands/InvokeEndpointAsyncCommand.d.ts +10 -3
- package/dist-types/models/models_0.d.ts +15 -1
- package/dist-types/ts3.4/commands/InvokeEndpointAsyncCommand.d.ts +11 -2
- package/dist-types/ts3.4/models/models_0.d.ts +2 -1
- package/package.json +8 -8
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.
|
|
4
|
-
const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
|
|
5
|
-
const client_1 = require("@smithy/core/client");
|
|
6
|
-
const defaultSageMakerRuntimeHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
1
|
+
const { resolveAwsSdkSigV4Config } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
+
const { getSmithyContext, normalizeProvider } = require("@smithy/core/client");
|
|
3
|
+
exports.defaultSageMakerRuntimeHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
7
4
|
return {
|
|
8
|
-
operation:
|
|
9
|
-
region: await
|
|
5
|
+
operation: getSmithyContext(context).operation,
|
|
6
|
+
region: await normalizeProvider(config.region)() || (() => {
|
|
10
7
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
11
8
|
})(),
|
|
12
9
|
};
|
|
13
10
|
};
|
|
14
|
-
exports.defaultSageMakerRuntimeHttpAuthSchemeParametersProvider = defaultSageMakerRuntimeHttpAuthSchemeParametersProvider;
|
|
15
11
|
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
16
12
|
return {
|
|
17
13
|
schemeId: "aws.auth#sigv4",
|
|
@@ -27,7 +23,7 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
|
27
23
|
}),
|
|
28
24
|
};
|
|
29
25
|
}
|
|
30
|
-
|
|
26
|
+
exports.defaultSageMakerRuntimeHttpAuthSchemeProvider = (authParameters) => {
|
|
31
27
|
const options = [];
|
|
32
28
|
switch (authParameters.operation) {
|
|
33
29
|
default: {
|
|
@@ -36,11 +32,9 @@ const defaultSageMakerRuntimeHttpAuthSchemeProvider = (authParameters) => {
|
|
|
36
32
|
}
|
|
37
33
|
return options;
|
|
38
34
|
};
|
|
39
|
-
exports.
|
|
40
|
-
const
|
|
41
|
-
const config_0 = (0, httpAuthSchemes_1.resolveAwsSdkSigV4Config)(config);
|
|
35
|
+
exports.resolveHttpAuthSchemeConfig = (config) => {
|
|
36
|
+
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
42
37
|
return Object.assign(config_0, {
|
|
43
|
-
authSchemePreference:
|
|
38
|
+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
|
|
44
39
|
});
|
|
45
40
|
};
|
|
46
|
-
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/endpoint/bdd.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.bdd = void 0;
|
|
4
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
1
|
+
const { BinaryDecisionDiagram } = require("@smithy/core/endpoints");
|
|
5
2
|
const m = "ref";
|
|
6
3
|
const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = "stringEquals", h = { [m]: "Endpoint" }, i = { [m]: d }, j = { "fn": f, "argv": [i, "name"] }, k = {}, l = [{ [m]: "Region" }];
|
|
7
4
|
const _data = {
|
|
@@ -52,4 +49,4 @@ const nodes = new Int32Array([
|
|
|
52
49
|
3, r + 1, 15,
|
|
53
50
|
4, r + 2, r + 3,
|
|
54
51
|
]);
|
|
55
|
-
exports.bdd =
|
|
52
|
+
exports.bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const endpoints_1 = require("@smithy/core/endpoints");
|
|
6
|
-
const bdd_1 = require("./bdd");
|
|
7
|
-
const cache = new endpoints_1.EndpointCache({
|
|
1
|
+
const { awsEndpointFunctions } = require("@aws-sdk/core/client");
|
|
2
|
+
const { customEndpointFunctions, decideEndpoint, EndpointCache } = require("@smithy/core/endpoints");
|
|
3
|
+
const { bdd } = require("./bdd");
|
|
4
|
+
const cache = new EndpointCache({
|
|
8
5
|
size: 50,
|
|
9
6
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
|
10
7
|
});
|
|
11
|
-
|
|
12
|
-
return cache.get(endpointParams, () =>
|
|
8
|
+
exports.defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
13
10
|
endpointParams: endpointParams,
|
|
14
11
|
logger: context.logger,
|
|
15
12
|
}));
|
|
16
13
|
};
|
|
17
|
-
|
|
18
|
-
endpoints_1.customEndpointFunctions.aws = client_1.awsEndpointFunctions;
|
|
14
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
var __exportStar = (m, e) => { Object.assign(e, m); };
|
|
2
|
+
const { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
|
|
3
|
+
const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin } = require("@smithy/core");
|
|
4
|
+
const { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
|
|
5
|
+
exports.$Command = Command;
|
|
6
|
+
exports.__Client = Client;
|
|
7
|
+
const { resolveRegionConfig } = require("@smithy/core/config");
|
|
8
|
+
const { resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
|
|
9
|
+
const { resolveEventStreamSerdeConfig } = require("@smithy/core/event-streams");
|
|
10
|
+
const { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig, getContentLengthPlugin } = require("@smithy/core/protocols");
|
|
11
|
+
const { resolveRetryConfig, getRetryPlugin } = require("@smithy/core/retry");
|
|
12
|
+
const { getSchemaSerdePlugin } = require("@smithy/core/schema");
|
|
13
|
+
const { resolveHttpAuthSchemeConfig, defaultSageMakerRuntimeHttpAuthSchemeParametersProvider } = require("./auth/httpAuthSchemeProvider");
|
|
14
|
+
const { getRuntimeConfig } = require("./runtimeConfig");
|
|
15
|
+
const { InvokeEndpointAsync$, InvokeEndpoint$, InvokeEndpointWithResponseStream$ } = require("./schemas/schemas_0");
|
|
16
|
+
__exportStar(require("./schemas/schemas_0"), exports);
|
|
17
|
+
__exportStar(require("./models/errors"), exports);
|
|
18
|
+
const { SageMakerRuntimeServiceException } = require("./models/SageMakerRuntimeServiceException");
|
|
19
|
+
exports.SageMakerRuntimeServiceException = SageMakerRuntimeServiceException;
|
|
17
20
|
|
|
18
21
|
const resolveClientEndpointParameters = (options) => {
|
|
19
22
|
return Object.assign(options, {
|
|
@@ -69,76 +72,76 @@ const resolveHttpAuthRuntimeConfig = (config) => {
|
|
|
69
72
|
};
|
|
70
73
|
|
|
71
74
|
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
72
|
-
const extensionConfiguration = Object.assign(
|
|
75
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
73
76
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
74
|
-
return Object.assign(runtimeConfig,
|
|
77
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
75
78
|
};
|
|
76
79
|
|
|
77
|
-
class SageMakerRuntimeClient extends
|
|
80
|
+
class SageMakerRuntimeClient extends Client {
|
|
78
81
|
config;
|
|
79
82
|
constructor(...[configuration]) {
|
|
80
|
-
const _config_0 =
|
|
83
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
81
84
|
super(_config_0);
|
|
82
85
|
this.initConfig = _config_0;
|
|
83
86
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
84
|
-
const _config_2 =
|
|
85
|
-
const _config_3 =
|
|
86
|
-
const _config_4 =
|
|
87
|
-
const _config_5 =
|
|
88
|
-
const _config_6 =
|
|
89
|
-
const _config_7 =
|
|
90
|
-
const _config_8 =
|
|
87
|
+
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
88
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
89
|
+
const _config_4 = resolveRegionConfig(_config_3);
|
|
90
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
91
|
+
const _config_6 = resolveEndpointConfig(_config_5);
|
|
92
|
+
const _config_7 = resolveEventStreamSerdeConfig(_config_6);
|
|
93
|
+
const _config_8 = resolveHttpAuthSchemeConfig(_config_7);
|
|
91
94
|
const _config_9 = resolveRuntimeExtensions(_config_8, configuration?.extensions || []);
|
|
92
95
|
this.config = _config_9;
|
|
93
|
-
this.middlewareStack.use(
|
|
94
|
-
this.middlewareStack.use(
|
|
95
|
-
this.middlewareStack.use(
|
|
96
|
-
this.middlewareStack.use(
|
|
97
|
-
this.middlewareStack.use(
|
|
98
|
-
this.middlewareStack.use(
|
|
99
|
-
this.middlewareStack.use(
|
|
100
|
-
this.middlewareStack.use(
|
|
101
|
-
httpAuthSchemeParametersProvider:
|
|
102
|
-
identityProviderConfigProvider: async (config) => new
|
|
96
|
+
this.middlewareStack.use(getSchemaSerdePlugin(this.config));
|
|
97
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
98
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
99
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
100
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
102
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
103
|
+
this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
104
|
+
httpAuthSchemeParametersProvider: defaultSageMakerRuntimeHttpAuthSchemeParametersProvider,
|
|
105
|
+
identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
|
|
103
106
|
"aws.auth#sigv4": config.credentials,
|
|
104
107
|
}),
|
|
105
108
|
}));
|
|
106
|
-
this.middlewareStack.use(
|
|
109
|
+
this.middlewareStack.use(getHttpSigningPlugin(this.config));
|
|
107
110
|
}
|
|
108
111
|
destroy() {
|
|
109
112
|
super.destroy();
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
|
|
113
|
-
class InvokeEndpointAsyncCommand extends
|
|
116
|
+
class InvokeEndpointAsyncCommand extends Command
|
|
114
117
|
.classBuilder()
|
|
115
118
|
.ep(commonParams)
|
|
116
119
|
.m(function (Command, cs, config, o) {
|
|
117
|
-
return [
|
|
120
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
118
121
|
})
|
|
119
122
|
.s("AmazonSageMakerRuntime", "InvokeEndpointAsync", {})
|
|
120
123
|
.n("SageMakerRuntimeClient", "InvokeEndpointAsyncCommand")
|
|
121
|
-
.sc(
|
|
124
|
+
.sc(InvokeEndpointAsync$)
|
|
122
125
|
.build() {
|
|
123
126
|
}
|
|
124
127
|
|
|
125
|
-
class InvokeEndpointCommand extends
|
|
128
|
+
class InvokeEndpointCommand extends Command
|
|
126
129
|
.classBuilder()
|
|
127
130
|
.ep(commonParams)
|
|
128
131
|
.m(function (Command, cs, config, o) {
|
|
129
|
-
return [
|
|
132
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
130
133
|
})
|
|
131
134
|
.s("AmazonSageMakerRuntime", "InvokeEndpoint", {})
|
|
132
135
|
.n("SageMakerRuntimeClient", "InvokeEndpointCommand")
|
|
133
|
-
.sc(
|
|
136
|
+
.sc(InvokeEndpoint$)
|
|
134
137
|
.build() {
|
|
135
138
|
}
|
|
136
139
|
|
|
137
|
-
class InvokeEndpointWithResponseStreamCommand extends
|
|
140
|
+
class InvokeEndpointWithResponseStreamCommand extends Command
|
|
138
141
|
.classBuilder()
|
|
139
142
|
.ep(commonParams)
|
|
140
143
|
.m(function (Command, cs, config, o) {
|
|
141
|
-
return [
|
|
144
|
+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
142
145
|
})
|
|
143
146
|
.s("AmazonSageMakerRuntime", "InvokeEndpointWithResponseStream", {
|
|
144
147
|
eventStream: {
|
|
@@ -146,7 +149,7 @@ class InvokeEndpointWithResponseStreamCommand extends client.Command
|
|
|
146
149
|
},
|
|
147
150
|
})
|
|
148
151
|
.n("SageMakerRuntimeClient", "InvokeEndpointWithResponseStreamCommand")
|
|
149
|
-
.sc(
|
|
152
|
+
.sc(InvokeEndpointWithResponseStream$)
|
|
150
153
|
.build() {
|
|
151
154
|
}
|
|
152
155
|
|
|
@@ -157,33 +160,10 @@ const commands = {
|
|
|
157
160
|
};
|
|
158
161
|
class SageMakerRuntime extends SageMakerRuntimeClient {
|
|
159
162
|
}
|
|
160
|
-
|
|
163
|
+
createAggregatedClient(commands, SageMakerRuntime);
|
|
161
164
|
|
|
162
|
-
exports.$Command = client.Command;
|
|
163
|
-
exports.__Client = client.Client;
|
|
164
|
-
exports.SageMakerRuntimeServiceException = SageMakerRuntimeServiceException.SageMakerRuntimeServiceException;
|
|
165
165
|
exports.InvokeEndpointAsyncCommand = InvokeEndpointAsyncCommand;
|
|
166
166
|
exports.InvokeEndpointCommand = InvokeEndpointCommand;
|
|
167
167
|
exports.InvokeEndpointWithResponseStreamCommand = InvokeEndpointWithResponseStreamCommand;
|
|
168
168
|
exports.SageMakerRuntime = SageMakerRuntime;
|
|
169
169
|
exports.SageMakerRuntimeClient = SageMakerRuntimeClient;
|
|
170
|
-
Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
|
|
171
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
172
|
-
Object.defineProperty(exports, '__proto__', {
|
|
173
|
-
enumerable: true,
|
|
174
|
-
value: schemas_0['__proto__']
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
Object.keys(schemas_0).forEach(function (k) {
|
|
178
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
|
|
179
|
-
});
|
|
180
|
-
Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
|
|
181
|
-
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
|
|
182
|
-
Object.defineProperty(exports, '__proto__', {
|
|
183
|
-
enumerable: true,
|
|
184
|
-
value: errors['__proto__']
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
Object.keys(errors).forEach(function (k) {
|
|
188
|
-
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
|
|
189
|
-
});
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.SageMakerRuntimeServiceException =
|
|
4
|
-
const client_1 = require("@smithy/core/client");
|
|
5
|
-
Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return client_1.ServiceException; } });
|
|
6
|
-
class SageMakerRuntimeServiceException extends client_1.ServiceException {
|
|
1
|
+
const { ServiceException: __ServiceException } = require("@smithy/core/client");
|
|
2
|
+
exports.__ServiceException = __ServiceException;
|
|
3
|
+
exports.SageMakerRuntimeServiceException = class SageMakerRuntimeServiceException extends __ServiceException {
|
|
7
4
|
constructor(options) {
|
|
8
5
|
super(options);
|
|
9
6
|
Object.setPrototypeOf(this, SageMakerRuntimeServiceException.prototype);
|
|
10
7
|
}
|
|
11
|
-
}
|
|
12
|
-
exports.SageMakerRuntimeServiceException = SageMakerRuntimeServiceException;
|
|
8
|
+
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.ModelStreamError = exports.InternalStreamFailure = exports.ValidationError = exports.ServiceUnavailable = exports.ModelNotReadyException = exports.ModelError = exports.InternalFailure = exports.InternalDependencyException = void 0;
|
|
4
|
-
const SageMakerRuntimeServiceException_1 = require("./SageMakerRuntimeServiceException");
|
|
5
|
-
class InternalDependencyException extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
1
|
+
const { SageMakerRuntimeServiceException: __BaseException } = require("./SageMakerRuntimeServiceException");
|
|
2
|
+
exports.InternalDependencyException = class InternalDependencyException extends __BaseException {
|
|
6
3
|
name = "InternalDependencyException";
|
|
7
4
|
$fault = "server";
|
|
8
5
|
Message;
|
|
@@ -15,9 +12,8 @@ class InternalDependencyException extends SageMakerRuntimeServiceException_1.Sag
|
|
|
15
12
|
Object.setPrototypeOf(this, InternalDependencyException.prototype);
|
|
16
13
|
this.Message = opts.Message;
|
|
17
14
|
}
|
|
18
|
-
}
|
|
19
|
-
exports.
|
|
20
|
-
class InternalFailure extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
15
|
+
};
|
|
16
|
+
exports.InternalFailure = class InternalFailure extends __BaseException {
|
|
21
17
|
name = "InternalFailure";
|
|
22
18
|
$fault = "server";
|
|
23
19
|
Message;
|
|
@@ -30,9 +26,8 @@ class InternalFailure extends SageMakerRuntimeServiceException_1.SageMakerRuntim
|
|
|
30
26
|
Object.setPrototypeOf(this, InternalFailure.prototype);
|
|
31
27
|
this.Message = opts.Message;
|
|
32
28
|
}
|
|
33
|
-
}
|
|
34
|
-
exports.
|
|
35
|
-
class ModelError extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
29
|
+
};
|
|
30
|
+
exports.ModelError = class ModelError extends __BaseException {
|
|
36
31
|
name = "ModelError";
|
|
37
32
|
$fault = "client";
|
|
38
33
|
Message;
|
|
@@ -51,9 +46,8 @@ class ModelError extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServ
|
|
|
51
46
|
this.OriginalMessage = opts.OriginalMessage;
|
|
52
47
|
this.LogStreamArn = opts.LogStreamArn;
|
|
53
48
|
}
|
|
54
|
-
}
|
|
55
|
-
exports.
|
|
56
|
-
class ModelNotReadyException extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
49
|
+
};
|
|
50
|
+
exports.ModelNotReadyException = class ModelNotReadyException extends __BaseException {
|
|
57
51
|
name = "ModelNotReadyException";
|
|
58
52
|
$fault = "client";
|
|
59
53
|
Message;
|
|
@@ -66,9 +60,8 @@ class ModelNotReadyException extends SageMakerRuntimeServiceException_1.SageMake
|
|
|
66
60
|
Object.setPrototypeOf(this, ModelNotReadyException.prototype);
|
|
67
61
|
this.Message = opts.Message;
|
|
68
62
|
}
|
|
69
|
-
}
|
|
70
|
-
exports.
|
|
71
|
-
class ServiceUnavailable extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
63
|
+
};
|
|
64
|
+
exports.ServiceUnavailable = class ServiceUnavailable extends __BaseException {
|
|
72
65
|
name = "ServiceUnavailable";
|
|
73
66
|
$fault = "server";
|
|
74
67
|
Message;
|
|
@@ -81,9 +74,8 @@ class ServiceUnavailable extends SageMakerRuntimeServiceException_1.SageMakerRun
|
|
|
81
74
|
Object.setPrototypeOf(this, ServiceUnavailable.prototype);
|
|
82
75
|
this.Message = opts.Message;
|
|
83
76
|
}
|
|
84
|
-
}
|
|
85
|
-
exports.
|
|
86
|
-
class ValidationError extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
77
|
+
};
|
|
78
|
+
exports.ValidationError = class ValidationError extends __BaseException {
|
|
87
79
|
name = "ValidationError";
|
|
88
80
|
$fault = "client";
|
|
89
81
|
Message;
|
|
@@ -96,9 +88,8 @@ class ValidationError extends SageMakerRuntimeServiceException_1.SageMakerRuntim
|
|
|
96
88
|
Object.setPrototypeOf(this, ValidationError.prototype);
|
|
97
89
|
this.Message = opts.Message;
|
|
98
90
|
}
|
|
99
|
-
}
|
|
100
|
-
exports.
|
|
101
|
-
class InternalStreamFailure extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
91
|
+
};
|
|
92
|
+
exports.InternalStreamFailure = class InternalStreamFailure extends __BaseException {
|
|
102
93
|
name = "InternalStreamFailure";
|
|
103
94
|
$fault = "server";
|
|
104
95
|
Message;
|
|
@@ -111,9 +102,8 @@ class InternalStreamFailure extends SageMakerRuntimeServiceException_1.SageMaker
|
|
|
111
102
|
Object.setPrototypeOf(this, InternalStreamFailure.prototype);
|
|
112
103
|
this.Message = opts.Message;
|
|
113
104
|
}
|
|
114
|
-
}
|
|
115
|
-
exports.
|
|
116
|
-
class ModelStreamError extends SageMakerRuntimeServiceException_1.SageMakerRuntimeServiceException {
|
|
105
|
+
};
|
|
106
|
+
exports.ModelStreamError = class ModelStreamError extends __BaseException {
|
|
117
107
|
name = "ModelStreamError";
|
|
118
108
|
$fault = "client";
|
|
119
109
|
Message;
|
|
@@ -128,5 +118,4 @@ class ModelStreamError extends SageMakerRuntimeServiceException_1.SageMakerRunti
|
|
|
128
118
|
this.Message = opts.Message;
|
|
129
119
|
this.ErrorCode = opts.ErrorCode;
|
|
130
120
|
}
|
|
131
|
-
}
|
|
132
|
-
exports.ModelStreamError = ModelStreamError;
|
|
121
|
+
};
|
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const retry_1 = require("@smithy/core/retry");
|
|
12
|
-
const serde_1 = require("@smithy/core/serde");
|
|
13
|
-
const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
|
|
14
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
1
|
+
const packageInfo = require("../package.json");
|
|
2
|
+
const { Sha256 } = require("@aws-crypto/sha256-browser");
|
|
3
|
+
const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
|
|
4
|
+
const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
5
|
+
const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
6
|
+
const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
|
|
7
|
+
const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
|
|
8
|
+
const { calculateBodyLength } = require("@smithy/core/serde");
|
|
9
|
+
const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
|
|
10
|
+
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
15
11
|
const getRuntimeConfig = (config) => {
|
|
16
|
-
const defaultsMode =
|
|
17
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
18
|
-
const clientSharedValues = (
|
|
12
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
13
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
14
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
19
15
|
return {
|
|
20
16
|
...clientSharedValues,
|
|
21
17
|
...config,
|
|
22
18
|
runtime: "browser",
|
|
23
19
|
defaultsMode,
|
|
24
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
20
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
25
21
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
26
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
27
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ??
|
|
28
|
-
maxAttempts: config?.maxAttempts ??
|
|
29
|
-
region: config?.region ??
|
|
30
|
-
requestHandler:
|
|
31
|
-
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode ||
|
|
32
|
-
sha256: config?.sha256 ??
|
|
33
|
-
streamCollector: config?.streamCollector ??
|
|
34
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(
|
|
35
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(
|
|
22
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
23
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
24
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
25
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
26
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
27
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
28
|
+
sha256: config?.sha256 ?? Sha256,
|
|
29
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
30
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
31
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
36
32
|
};
|
|
37
33
|
};
|
|
38
34
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,24 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const retry_1 = require("@smithy/core/retry");
|
|
13
|
-
const serde_1 = require("@smithy/core/serde");
|
|
14
|
-
const node_http_handler_1 = require("@smithy/node-http-handler");
|
|
15
|
-
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
1
|
+
const packageInfo = require("../package.json");
|
|
2
|
+
const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
|
|
3
|
+
const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
|
|
4
|
+
const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
5
|
+
const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
|
|
6
|
+
const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
|
|
7
|
+
const { eventStreamSerdeProvider } = require("@smithy/core/event-streams");
|
|
8
|
+
const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
|
|
9
|
+
const { calculateBodyLength, Hash } = require("@smithy/core/serde");
|
|
10
|
+
const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
|
|
11
|
+
const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
|
|
16
12
|
const getRuntimeConfig = (config) => {
|
|
17
|
-
|
|
18
|
-
const defaultsMode =
|
|
19
|
-
const defaultConfigProvider = () => defaultsMode().then(
|
|
20
|
-
const clientSharedValues = (
|
|
21
|
-
(
|
|
13
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
14
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
15
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
16
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
17
|
+
awsCheckVersion(process.version);
|
|
22
18
|
const loaderConfig = {
|
|
23
19
|
profile: config?.profile,
|
|
24
20
|
logger: clientSharedValues.logger,
|
|
@@ -28,24 +24,24 @@ const getRuntimeConfig = (config) => {
|
|
|
28
24
|
...config,
|
|
29
25
|
runtime: "node",
|
|
30
26
|
defaultsMode,
|
|
31
|
-
authSchemePreference: config?.authSchemePreference ?? (
|
|
32
|
-
bodyLengthChecker: config?.bodyLengthChecker ??
|
|
33
|
-
credentialDefaultProvider: config?.credentialDefaultProvider ??
|
|
34
|
-
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
35
|
-
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ??
|
|
36
|
-
maxAttempts: config?.maxAttempts ?? (
|
|
37
|
-
region: config?.region ?? (
|
|
38
|
-
requestHandler:
|
|
27
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
28
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
29
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
30
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
31
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
32
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
33
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
34
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
39
35
|
retryMode: config?.retryMode ??
|
|
40
|
-
(
|
|
41
|
-
...
|
|
42
|
-
default: async () => (await defaultConfigProvider()).retryMode ||
|
|
36
|
+
loadNodeConfig({
|
|
37
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
38
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
43
39
|
}, config),
|
|
44
|
-
sha256: config?.sha256 ??
|
|
45
|
-
streamCollector: config?.streamCollector ??
|
|
46
|
-
useDualstackEndpoint: config?.useDualstackEndpoint ?? (
|
|
47
|
-
useFipsEndpoint: config?.useFipsEndpoint ?? (
|
|
48
|
-
userAgentAppId: config?.userAgentAppId ?? (
|
|
40
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
41
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
42
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
43
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
44
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
49
45
|
};
|
|
50
46
|
};
|
|
51
47
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getRuntimeConfig = void 0;
|
|
4
|
-
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
-
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
1
|
+
const { Sha256 } = require("@aws-crypto/sha256-js");
|
|
2
|
+
const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
|
|
6
3
|
const getRuntimeConfig = (config) => {
|
|
7
|
-
const browserDefaults = (
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
8
5
|
return {
|
|
9
6
|
...browserDefaults,
|
|
10
7
|
...config,
|
|
11
8
|
runtime: "react-native",
|
|
12
|
-
sha256: config?.sha256 ??
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
13
10
|
};
|
|
14
11
|
};
|
|
15
12
|
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,42 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
11
|
-
const schemas_0_1 = require("./schemas/schemas_0");
|
|
12
|
-
const getRuntimeConfig = (config) => {
|
|
1
|
+
const { AwsSdkSigV4Signer } = require("@aws-sdk/core/httpAuthSchemes");
|
|
2
|
+
const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
|
|
3
|
+
const { NoOpLogger } = require("@smithy/core/client");
|
|
4
|
+
const { parseUrl } = require("@smithy/core/protocols");
|
|
5
|
+
const { fromBase64, fromUtf8, toBase64, toUtf8 } = require("@smithy/core/serde");
|
|
6
|
+
const { defaultSageMakerRuntimeHttpAuthSchemeProvider } = require("./auth/httpAuthSchemeProvider");
|
|
7
|
+
const { defaultEndpointResolver } = require("./endpoint/endpointResolver");
|
|
8
|
+
const { errorTypeRegistries } = require("./schemas/schemas_0");
|
|
9
|
+
exports.getRuntimeConfig = (config) => {
|
|
13
10
|
return {
|
|
14
11
|
apiVersion: "2017-05-13",
|
|
15
|
-
base64Decoder: config?.base64Decoder ??
|
|
16
|
-
base64Encoder: config?.base64Encoder ??
|
|
12
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
13
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
17
14
|
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
18
|
-
endpointProvider: config?.endpointProvider ??
|
|
15
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
19
16
|
extensions: config?.extensions ?? [],
|
|
20
|
-
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ??
|
|
17
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSageMakerRuntimeHttpAuthSchemeProvider,
|
|
21
18
|
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
22
19
|
{
|
|
23
20
|
schemeId: "aws.auth#sigv4",
|
|
24
21
|
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
25
|
-
signer: new
|
|
22
|
+
signer: new AwsSdkSigV4Signer(),
|
|
26
23
|
},
|
|
27
24
|
],
|
|
28
|
-
logger: config?.logger ?? new
|
|
29
|
-
protocol: config?.protocol ??
|
|
25
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
26
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
30
27
|
protocolSettings: config?.protocolSettings ?? {
|
|
31
28
|
defaultNamespace: "com.amazonaws.sagemakerruntime",
|
|
32
|
-
errorTypeRegistries
|
|
29
|
+
errorTypeRegistries,
|
|
33
30
|
version: "2017-05-13",
|
|
34
31
|
serviceTarget: "AmazonSageMakerRuntime",
|
|
35
32
|
},
|
|
36
33
|
serviceId: config?.serviceId ?? "SageMaker Runtime",
|
|
37
|
-
urlParser: config?.urlParser ??
|
|
38
|
-
utf8Decoder: config?.utf8Decoder ??
|
|
39
|
-
utf8Encoder: config?.utf8Encoder ??
|
|
34
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
35
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
36
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
40
37
|
};
|
|
41
38
|
};
|
|
42
|
-
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InvokeEndpointWithResponseStream$ = exports.InvokeEndpointAsync$ = exports.InvokeEndpoint$ = exports.ResponseStream$ = exports.PayloadPart$ = exports.InvokeEndpointWithResponseStreamOutput$ = exports.InvokeEndpointWithResponseStreamInput$ = exports.InvokeEndpointOutput$ = exports.InvokeEndpointInput$ = exports.InvokeEndpointAsyncOutput$ = exports.InvokeEndpointAsyncInput$ = exports.errorTypeRegistries = exports.ValidationError$ = exports.ServiceUnavailable$ = exports.ModelStreamError$ = exports.ModelNotReadyException$ = exports.ModelError$ = exports.InternalStreamFailure$ = exports.InternalFailure$ = exports.InternalDependencyException$ = exports.SageMakerRuntimeServiceException$ = void 0;
|
|
4
1
|
const _A = "Accept";
|
|
2
|
+
const _ABB = "AsyncBodyBlob";
|
|
5
3
|
const _B = "Body";
|
|
6
4
|
const _BB = "BodyBlob";
|
|
7
5
|
const _By = "Bytes";
|
|
@@ -83,114 +81,132 @@ const _se = "server";
|
|
|
83
81
|
const _st = "streaming";
|
|
84
82
|
const _xAIPV = "x-Amzn-Invoked-Production-Variant";
|
|
85
83
|
const n0 = "com.amazonaws.sagemakerruntime";
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
const _s_registry =
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
const { TypeRegistry } = require("@smithy/core/schema");
|
|
85
|
+
const { InternalDependencyException, InternalFailure, InternalStreamFailure, ModelError, ModelNotReadyException, ModelStreamError, ServiceUnavailable, ValidationError } = require("../models/errors");
|
|
86
|
+
const { SageMakerRuntimeServiceException } = require("../models/SageMakerRuntimeServiceException");
|
|
87
|
+
const _s_registry = TypeRegistry.for(_s);
|
|
88
|
+
const SageMakerRuntimeServiceException$ = [-3, _s, "SageMakerRuntimeServiceException", 0, [], []];
|
|
89
|
+
exports.SageMakerRuntimeServiceException$ = SageMakerRuntimeServiceException$;
|
|
90
|
+
_s_registry.registerError(SageMakerRuntimeServiceException$, SageMakerRuntimeServiceException);
|
|
91
|
+
const n0_registry = TypeRegistry.for(n0);
|
|
92
|
+
const InternalDependencyException$ = [-3, n0, _IDE,
|
|
94
93
|
{ [_e]: _se, [_hE]: 530 },
|
|
95
94
|
[_M],
|
|
96
95
|
[0]
|
|
97
96
|
];
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
exports.InternalDependencyException$ = InternalDependencyException$;
|
|
98
|
+
n0_registry.registerError(InternalDependencyException$, InternalDependencyException);
|
|
99
|
+
const InternalFailure$ = [-3, n0, _IF,
|
|
100
100
|
{ [_e]: _se, [_hE]: 500 },
|
|
101
101
|
[_M],
|
|
102
102
|
[0]
|
|
103
103
|
];
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
exports.InternalFailure$ = InternalFailure$;
|
|
105
|
+
n0_registry.registerError(InternalFailure$, InternalFailure);
|
|
106
|
+
const InternalStreamFailure$ = [-3, n0, _ISF,
|
|
106
107
|
{ [_e]: _se },
|
|
107
108
|
[_M],
|
|
108
109
|
[0]
|
|
109
110
|
];
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
exports.InternalStreamFailure$ = InternalStreamFailure$;
|
|
112
|
+
n0_registry.registerError(InternalStreamFailure$, InternalStreamFailure);
|
|
113
|
+
const ModelError$ = [-3, n0, _ME,
|
|
112
114
|
{ [_e]: _c, [_hE]: 424 },
|
|
113
115
|
[_M, _OSC, _OM, _LSA],
|
|
114
116
|
[0, 1, 0, 0]
|
|
115
117
|
];
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
exports.ModelError$ = ModelError$;
|
|
119
|
+
n0_registry.registerError(ModelError$, ModelError);
|
|
120
|
+
const ModelNotReadyException$ = [-3, n0, _MNRE,
|
|
118
121
|
{ [_aQE]: [`ModelNotReadyException`, 429], [_e]: _c, [_hE]: 429 },
|
|
119
122
|
[_M],
|
|
120
123
|
[0]
|
|
121
124
|
];
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
exports.ModelNotReadyException$ = ModelNotReadyException$;
|
|
126
|
+
n0_registry.registerError(ModelNotReadyException$, ModelNotReadyException);
|
|
127
|
+
const ModelStreamError$ = [-3, n0, _MSE,
|
|
124
128
|
{ [_e]: _c },
|
|
125
129
|
[_M, _EC],
|
|
126
130
|
[0, 0]
|
|
127
131
|
];
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
exports.ModelStreamError$ = ModelStreamError$;
|
|
133
|
+
n0_registry.registerError(ModelStreamError$, ModelStreamError);
|
|
134
|
+
const ServiceUnavailable$ = [-3, n0, _SU,
|
|
130
135
|
{ [_e]: _se, [_hE]: 503 },
|
|
131
136
|
[_M],
|
|
132
137
|
[0]
|
|
133
138
|
];
|
|
134
|
-
|
|
135
|
-
|
|
139
|
+
exports.ServiceUnavailable$ = ServiceUnavailable$;
|
|
140
|
+
n0_registry.registerError(ServiceUnavailable$, ServiceUnavailable);
|
|
141
|
+
const ValidationError$ = [-3, n0, _VE,
|
|
136
142
|
{ [_e]: _c, [_hE]: 400 },
|
|
137
143
|
[_M],
|
|
138
144
|
[0]
|
|
139
145
|
];
|
|
140
|
-
|
|
146
|
+
exports.ValidationError$ = ValidationError$;
|
|
147
|
+
n0_registry.registerError(ValidationError$, ValidationError);
|
|
141
148
|
exports.errorTypeRegistries = [
|
|
142
149
|
_s_registry,
|
|
143
150
|
n0_registry,
|
|
144
151
|
];
|
|
152
|
+
var AsyncBodyBlob = [0, n0, _ABB, 8, 21];
|
|
145
153
|
var BodyBlob = [0, n0, _BB, 8, 21];
|
|
146
154
|
var CustomAttributesHeader = [0, n0, _CAH, 8, 0];
|
|
147
155
|
var PartBlob = [0, n0, _PB, 8, 21];
|
|
148
|
-
|
|
156
|
+
const InvokeEndpointAsyncInput$ = [3, n0, _IEAI,
|
|
149
157
|
0,
|
|
150
|
-
[_EN,
|
|
151
|
-
[[0, 1], [0, { [_hH]:
|
|
158
|
+
[_EN, _CT, _A, _CA, _II, _IL, _SOPE, _F, _RTTLS, _ITS, _B],
|
|
159
|
+
[[0, 1], [0, { [_hH]: _XASCT }], [0, { [_hH]: _XASA }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASII }], [0, { [_hH]: _XASI }], [0, { [_hH]: _XASS }], [0, { [_hH]: _XASF }], [1, { [_hH]: _XASR }], [1, { [_hH]: _XASI_ }], [() => AsyncBodyBlob, 16]], 1
|
|
152
160
|
];
|
|
153
|
-
exports.
|
|
161
|
+
exports.InvokeEndpointAsyncInput$ = InvokeEndpointAsyncInput$;
|
|
162
|
+
const InvokeEndpointAsyncOutput$ = [3, n0, _IEAO,
|
|
154
163
|
0,
|
|
155
164
|
[_II, _OL, _FL],
|
|
156
165
|
[0, [0, { [_hH]: _XASO }], [0, { [_hH]: _XASF_ }]]
|
|
157
166
|
];
|
|
158
|
-
exports.
|
|
167
|
+
exports.InvokeEndpointAsyncOutput$ = InvokeEndpointAsyncOutput$;
|
|
168
|
+
const InvokeEndpointInput$ = [3, n0, _IEI,
|
|
159
169
|
0,
|
|
160
170
|
[_EN, _B, _CT, _A, _CA, _TM, _TV, _TCH, _II, _EE, _ICN, _SI],
|
|
161
171
|
[[0, 1], [() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _A }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASTM }], [0, { [_hH]: _XASTV }], [0, { [_hH]: _XASTCH }], [0, { [_hH]: _XASII }], [0, { [_hH]: _XASEE }], [0, { [_hH]: _XASIC }], [0, { [_hH]: _XASSI }]], 2
|
|
162
172
|
];
|
|
163
|
-
exports.
|
|
173
|
+
exports.InvokeEndpointInput$ = InvokeEndpointInput$;
|
|
174
|
+
const InvokeEndpointOutput$ = [3, n0, _IEO,
|
|
164
175
|
0,
|
|
165
176
|
[_B, _CT, _IPV, _CA, _NSI, _CSI],
|
|
166
177
|
[[() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _xAIPV }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASNSI }], [0, { [_hH]: _XASCSI }]], 1
|
|
167
178
|
];
|
|
168
|
-
exports.
|
|
179
|
+
exports.InvokeEndpointOutput$ = InvokeEndpointOutput$;
|
|
180
|
+
const InvokeEndpointWithResponseStreamInput$ = [3, n0, _IEWRSI,
|
|
169
181
|
0,
|
|
170
182
|
[_EN, _B, _CT, _A, _CA, _TV, _TCH, _II, _ICN, _SI],
|
|
171
183
|
[[0, 1], [() => BodyBlob, 16], [0, { [_hH]: _CT_ }], [0, { [_hH]: _XASA }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASTV }], [0, { [_hH]: _XASTCH }], [0, { [_hH]: _XASII }], [0, { [_hH]: _XASIC }], [0, { [_hH]: _XASSI }]], 2
|
|
172
184
|
];
|
|
173
|
-
exports.
|
|
185
|
+
exports.InvokeEndpointWithResponseStreamInput$ = InvokeEndpointWithResponseStreamInput$;
|
|
186
|
+
const InvokeEndpointWithResponseStreamOutput$ = [3, n0, _IEWRSO,
|
|
174
187
|
0,
|
|
175
188
|
[_B, _CT, _IPV, _CA],
|
|
176
|
-
[[() =>
|
|
189
|
+
[[() => ResponseStream$, 16], [0, { [_hH]: _XASCT }], [0, { [_hH]: _xAIPV }], [() => CustomAttributesHeader, { [_hH]: _XASCA }]], 1
|
|
177
190
|
];
|
|
178
|
-
exports.
|
|
191
|
+
exports.InvokeEndpointWithResponseStreamOutput$ = InvokeEndpointWithResponseStreamOutput$;
|
|
192
|
+
const PayloadPart$ = [3, n0, _PP,
|
|
179
193
|
0,
|
|
180
194
|
[_By],
|
|
181
195
|
[[() => PartBlob, { [_eP]: 1 }]]
|
|
182
196
|
];
|
|
183
|
-
exports.
|
|
197
|
+
exports.PayloadPart$ = PayloadPart$;
|
|
198
|
+
const ResponseStream$ = [4, n0, _RS,
|
|
184
199
|
{ [_st]: 1 },
|
|
185
200
|
[_PP, _MSE, _ISF],
|
|
186
|
-
[[() =>
|
|
201
|
+
[[() => PayloadPart$, 0], [() => ModelStreamError$, 0], [() => InternalStreamFailure$, 0]]
|
|
187
202
|
];
|
|
203
|
+
exports.ResponseStream$ = ResponseStream$;
|
|
188
204
|
exports.InvokeEndpoint$ = [9, n0, _IE,
|
|
189
|
-
{ [_h]: ["POST", "/endpoints/{EndpointName}/invocations", 200] }, () =>
|
|
205
|
+
{ [_h]: ["POST", "/endpoints/{EndpointName}/invocations", 200] }, () => InvokeEndpointInput$, () => InvokeEndpointOutput$
|
|
190
206
|
];
|
|
191
207
|
exports.InvokeEndpointAsync$ = [9, n0, _IEA,
|
|
192
|
-
{ [_h]: ["POST", "/endpoints/{EndpointName}/async-invocations", 202] }, () =>
|
|
208
|
+
{ [_h]: ["POST", "/endpoints/{EndpointName}/async-invocations", 202] }, () => InvokeEndpointAsyncInput$, () => InvokeEndpointAsyncOutput$
|
|
193
209
|
];
|
|
194
210
|
exports.InvokeEndpointWithResponseStream$ = [9, n0, _IEWRS,
|
|
195
|
-
{ [_h]: ["POST", "/endpoints/{EndpointName}/invocations-response-stream", 200] }, () =>
|
|
211
|
+
{ [_h]: ["POST", "/endpoints/{EndpointName}/invocations-response-stream", 200] }, () => InvokeEndpointWithResponseStreamInput$, () => InvokeEndpointWithResponseStreamOutput$
|
|
196
212
|
];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const _A = "Accept";
|
|
2
|
+
const _ABB = "AsyncBodyBlob";
|
|
2
3
|
const _B = "Body";
|
|
3
4
|
const _BB = "BodyBlob";
|
|
4
5
|
const _By = "Bytes";
|
|
@@ -139,13 +140,14 @@ export const errorTypeRegistries = [
|
|
|
139
140
|
_s_registry,
|
|
140
141
|
n0_registry,
|
|
141
142
|
];
|
|
143
|
+
var AsyncBodyBlob = [0, n0, _ABB, 8, 21];
|
|
142
144
|
var BodyBlob = [0, n0, _BB, 8, 21];
|
|
143
145
|
var CustomAttributesHeader = [0, n0, _CAH, 8, 0];
|
|
144
146
|
var PartBlob = [0, n0, _PB, 8, 21];
|
|
145
147
|
export var InvokeEndpointAsyncInput$ = [3, n0, _IEAI,
|
|
146
148
|
0,
|
|
147
|
-
[_EN,
|
|
148
|
-
[[0, 1], [0, { [_hH]:
|
|
149
|
+
[_EN, _CT, _A, _CA, _II, _IL, _SOPE, _F, _RTTLS, _ITS, _B],
|
|
150
|
+
[[0, 1], [0, { [_hH]: _XASCT }], [0, { [_hH]: _XASA }], [() => CustomAttributesHeader, { [_hH]: _XASCA }], [0, { [_hH]: _XASII }], [0, { [_hH]: _XASI }], [0, { [_hH]: _XASS }], [0, { [_hH]: _XASF }], [1, { [_hH]: _XASR }], [1, { [_hH]: _XASI_ }], [() => AsyncBodyBlob, 16]], 1
|
|
149
151
|
];
|
|
150
152
|
export var InvokeEndpointAsyncOutput$ = [3, n0, _IEAO,
|
|
151
153
|
0,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
-
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
2
|
+
import type { BlobPayloadInputTypes, MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
3
|
import type { InvokeEndpointAsyncInput, InvokeEndpointAsyncOutput } from "../models/models_0";
|
|
4
4
|
import type { SageMakerRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerRuntimeClient";
|
|
5
5
|
/**
|
|
@@ -7,12 +7,18 @@ import type { SageMakerRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOu
|
|
|
7
7
|
*/
|
|
8
8
|
export type { __MetadataBearer };
|
|
9
9
|
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type InvokeEndpointAsyncCommandInputType = Omit<InvokeEndpointAsyncInput, "Body"> & {
|
|
14
|
+
Body?: BlobPayloadInputTypes;
|
|
15
|
+
};
|
|
10
16
|
/**
|
|
11
17
|
* @public
|
|
12
18
|
*
|
|
13
19
|
* The input for {@link InvokeEndpointAsyncCommand}.
|
|
14
20
|
*/
|
|
15
|
-
export interface InvokeEndpointAsyncCommandInput extends
|
|
21
|
+
export interface InvokeEndpointAsyncCommandInput extends InvokeEndpointAsyncCommandInputType {
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
18
24
|
* @public
|
|
@@ -55,11 +61,12 @@ declare const InvokeEndpointAsyncCommand_base: {
|
|
|
55
61
|
* Accept: "STRING_VALUE",
|
|
56
62
|
* CustomAttributes: "STRING_VALUE",
|
|
57
63
|
* InferenceId: "STRING_VALUE",
|
|
58
|
-
* InputLocation: "STRING_VALUE",
|
|
64
|
+
* InputLocation: "STRING_VALUE",
|
|
59
65
|
* S3OutputPathExtension: "STRING_VALUE",
|
|
60
66
|
* Filename: "STRING_VALUE",
|
|
61
67
|
* RequestTTLSeconds: Number("int"),
|
|
62
68
|
* InvocationTimeoutSeconds: Number("int"),
|
|
69
|
+
* Body: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
63
70
|
* };
|
|
64
71
|
* const command = new InvokeEndpointAsyncCommand(input);
|
|
65
72
|
* const response = await client.send(command);
|
|
@@ -213,7 +213,7 @@ export interface InvokeEndpointAsyncInput {
|
|
|
213
213
|
* <p>The Amazon S3 URI where the inference request payload is stored.</p>
|
|
214
214
|
* @public
|
|
215
215
|
*/
|
|
216
|
-
InputLocation
|
|
216
|
+
InputLocation?: string | undefined;
|
|
217
217
|
/**
|
|
218
218
|
* <p>The path extension that is appended to the Amazon S3 output path where the inference
|
|
219
219
|
* response payload is stored.</p>
|
|
@@ -238,6 +238,20 @@ export interface InvokeEndpointAsyncInput {
|
|
|
238
238
|
* @public
|
|
239
239
|
*/
|
|
240
240
|
InvocationTimeoutSeconds?: number | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* <p>Provides inline input data for the inference request, in the format specified in the
|
|
243
|
+
* <code>ContentType</code> request header. Use this parameter to send the request
|
|
244
|
+
* payload directly in the API call instead of uploading it to Amazon S3 and
|
|
245
|
+
* referencing it with <code>InputLocation</code>. The inline payload can be up to 128,000
|
|
246
|
+
* bytes.</p>
|
|
247
|
+
* <p>
|
|
248
|
+
* <code>Body</code> and <code>InputLocation</code> are mutually exclusive. Provide
|
|
249
|
+
* exactly one of them.</p>
|
|
250
|
+
* <p>For information about the format of the request body, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html">Common Data
|
|
251
|
+
* Formats-Inference</a>.</p>
|
|
252
|
+
* @public
|
|
253
|
+
*/
|
|
254
|
+
Body?: Uint8Array | undefined;
|
|
241
255
|
}
|
|
242
256
|
/**
|
|
243
257
|
* @public
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
BlobPayloadInputTypes,
|
|
4
|
+
MetadataBearer as __MetadataBearer,
|
|
5
|
+
} from "@smithy/types";
|
|
3
6
|
import {
|
|
4
7
|
InvokeEndpointAsyncInput,
|
|
5
8
|
InvokeEndpointAsyncOutput,
|
|
@@ -11,8 +14,14 @@ import {
|
|
|
11
14
|
} from "../SageMakerRuntimeClient";
|
|
12
15
|
export { __MetadataBearer };
|
|
13
16
|
export { $Command };
|
|
17
|
+
export type InvokeEndpointAsyncCommandInputType = Pick<
|
|
18
|
+
InvokeEndpointAsyncInput,
|
|
19
|
+
Exclude<keyof InvokeEndpointAsyncInput, "Body">
|
|
20
|
+
> & {
|
|
21
|
+
Body?: BlobPayloadInputTypes;
|
|
22
|
+
};
|
|
14
23
|
export interface InvokeEndpointAsyncCommandInput
|
|
15
|
-
extends
|
|
24
|
+
extends InvokeEndpointAsyncCommandInputType {}
|
|
16
25
|
export interface InvokeEndpointAsyncCommandOutput
|
|
17
26
|
extends InvokeEndpointAsyncOutput,
|
|
18
27
|
__MetadataBearer {}
|
|
@@ -27,11 +27,12 @@ export interface InvokeEndpointAsyncInput {
|
|
|
27
27
|
Accept?: string | undefined;
|
|
28
28
|
CustomAttributes?: string | undefined;
|
|
29
29
|
InferenceId?: string | undefined;
|
|
30
|
-
InputLocation
|
|
30
|
+
InputLocation?: string | undefined;
|
|
31
31
|
S3OutputPathExtension?: string | undefined;
|
|
32
32
|
Filename?: string | undefined;
|
|
33
33
|
RequestTTLSeconds?: number | undefined;
|
|
34
34
|
InvocationTimeoutSeconds?: number | undefined;
|
|
35
|
+
Body?: Uint8Array | undefined;
|
|
35
36
|
}
|
|
36
37
|
export interface InvokeEndpointAsyncOutput {
|
|
37
38
|
InferenceId?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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.1069.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline",
|
|
8
|
-
"build:es": "tsc -p tsconfig.es.json",
|
|
8
|
+
"build:es": "premove dist-es && tsc -p tsconfig.es.json",
|
|
9
9
|
"build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
|
|
10
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
10
|
+
"build:types": "premove dist-types && tsc -p tsconfig.types.json",
|
|
11
11
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
12
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
13
13
|
"extract:docs": "api-extractor run --local",
|
|
14
|
-
"generate:client": "node ../../scripts/generate-clients/single-service
|
|
14
|
+
"generate:client": "node ../../scripts/generate-clients/single-service",
|
|
15
15
|
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
|
|
16
16
|
},
|
|
17
17
|
"main": "./dist-cjs/index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
24
|
-
"@aws-sdk/core": "^3.974.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
26
|
-
"@aws-sdk/types": "^3.973.
|
|
24
|
+
"@aws-sdk/core": "^3.974.21",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "^3.972.56",
|
|
26
|
+
"@aws-sdk/types": "^3.973.13",
|
|
27
27
|
"@smithy/core": "^3.24.6",
|
|
28
28
|
"@smithy/fetch-http-handler": "^5.4.6",
|
|
29
29
|
"@smithy/node-http-handler": "^4.7.6",
|