@aws-sdk/client-sagemaker-runtime 3.181.0 → 3.183.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,3 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import packageInfo from "../package.json";
3
2
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
3
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
@@ -12,15 +11,30 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
11
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
12
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
13
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
15
- export var getRuntimeConfig = function (config) {
16
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
- var defaultsMode = resolveDefaultsModeConfig(config);
18
- var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
- var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
- switch (_a.label) {
22
- case 0: return [4, defaultConfigProvider()];
23
- case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
- }
25
- }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
14
+ export const getRuntimeConfig = (config) => {
15
+ const defaultsMode = resolveDefaultsModeConfig(config);
16
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
17
+ const clientSharedValues = getSharedRuntimeConfig(config);
18
+ return {
19
+ ...clientSharedValues,
20
+ ...config,
21
+ runtime: "browser",
22
+ defaultsMode,
23
+ base64Decoder: config?.base64Decoder ?? fromBase64,
24
+ base64Encoder: config?.base64Encoder ?? toBase64,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
28
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
29
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
30
+ region: config?.region ?? invalidProvider("Region is missing"),
31
+ requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
32
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
33
+ sha256: config?.sha256 ?? Sha256,
34
+ streamCollector: config?.streamCollector ?? streamCollector,
35
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
36
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
37
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
38
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
39
+ };
26
40
  };
@@ -1,4 +1,3 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import packageInfo from "../package.json";
3
2
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
3
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
@@ -15,16 +14,35 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
15
14
  import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
15
  import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
17
16
  import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
18
- export var getRuntimeConfig = function (config) {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ export const getRuntimeConfig = (config) => {
20
18
  emitWarningIfUnsupportedVersion(process.version);
21
- var defaultsMode = resolveDefaultsModeConfig(config);
22
- var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
23
- var clientSharedValues = getSharedRuntimeConfig(config);
24
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
25
- switch (_a.label) {
26
- case 0: return [4, defaultConfigProvider()];
27
- case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
28
- }
29
- }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
19
+ const defaultsMode = resolveDefaultsModeConfig(config);
20
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
21
+ const clientSharedValues = getSharedRuntimeConfig(config);
22
+ return {
23
+ ...clientSharedValues,
24
+ ...config,
25
+ runtime: "node",
26
+ defaultsMode,
27
+ base64Decoder: config?.base64Decoder ?? fromBase64,
28
+ base64Encoder: config?.base64Encoder ?? toBase64,
29
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
31
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
+ defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
33
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
34
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
35
+ requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
36
+ retryMode: config?.retryMode ??
37
+ loadNodeConfig({
38
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
39
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
40
+ }),
41
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
42
+ streamCollector: config?.streamCollector ?? streamCollector,
43
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
44
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
45
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
46
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
47
+ };
30
48
  };
@@ -1,8 +1,11 @@
1
- import { __assign } from "tslib";
2
1
  import { Sha256 } from "@aws-crypto/sha256-js";
3
2
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
4
- export var getRuntimeConfig = function (config) {
5
- var _a;
6
- var browserDefaults = getBrowserRuntimeConfig(config);
7
- return __assign(__assign(__assign({}, browserDefaults), config), { runtime: "react-native", sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : Sha256 });
3
+ export const getRuntimeConfig = (config) => {
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
5
+ return {
6
+ ...browserDefaults,
7
+ ...config,
8
+ runtime: "react-native",
9
+ sha256: config?.sha256 ?? Sha256,
10
+ };
8
11
  };
@@ -1,13 +1,10 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
2
  import { defaultRegionInfoProvider } from "./endpoints";
3
- export var getRuntimeConfig = function (config) {
4
- var _a, _b, _c, _d, _e;
5
- return ({
6
- apiVersion: "2017-05-13",
7
- disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
8
- logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {},
9
- regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : defaultRegionInfoProvider,
10
- serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "SageMaker Runtime",
11
- urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
12
- });
13
- };
3
+ export const getRuntimeConfig = (config) => ({
4
+ apiVersion: "2017-05-13",
5
+ disableHostPrefix: config?.disableHostPrefix ?? false,
6
+ logger: config?.logger ?? {},
7
+ regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
8
+ serviceId: config?.serviceId ?? "SageMaker Runtime",
9
+ urlParser: config?.urlParser ?? parseUrl,
10
+ });
@@ -14,8 +14,8 @@ export declare class SageMakerRuntime extends SageMakerRuntimeClient {
14
14
  * <p>Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add
15
15
  * additional headers. You should not rely on the behavior of headers outside those
16
16
  * enumerated in the request syntax. </p>
17
- * <p>Calls to <code>InvokeEndpoint</code> are authenticated by using Amazon Web Services Signature Version
18
- * 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating
17
+ * <p>Calls to <code>InvokeEndpoint</code> are authenticated by using Amazon Web Services
18
+ * Signature Version 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating
19
19
  * Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API
20
20
  * Reference</i>.</p>
21
21
  * <p>A customer's model containers must respond to requests within 60 seconds. The model
@@ -32,23 +32,21 @@ export declare class SageMakerRuntime extends SageMakerRuntimeClient {
32
32
  invokeEndpoint(args: InvokeEndpointCommandInput, cb: (err: any, data?: InvokeEndpointCommandOutput) => void): void;
33
33
  invokeEndpoint(args: InvokeEndpointCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeEndpointCommandOutput) => void): void;
34
34
  /**
35
- * <p>After you deploy a model into production using Amazon SageMaker hosting services,
36
- * your client applications use this API to get inferences from the model hosted at
37
- * the specified endpoint in an asynchronous manner.</p>
35
+ * <p>After you deploy a model into production using Amazon SageMaker hosting services, your client
36
+ * applications use this API to get inferences from the model hosted at the specified
37
+ * endpoint in an asynchronous manner.</p>
38
38
  *
39
- * <p>Inference requests sent to this API are enqueued for asynchronous processing.
40
- * The processing of the inference request may or may not complete before the
41
- * you receive a response from this API. The response from this API will
42
- * not contain the result of the inference request but contain information
43
- * about where you can locate it.</p>
39
+ * <p>Inference requests sent to this API are enqueued for asynchronous processing. The
40
+ * processing of the inference request may or may not complete before the you receive a
41
+ * response from this API. The response from this API will not contain the result of the
42
+ * inference request but contain information about where you can locate it.</p>
44
43
  *
45
- * <p>Amazon SageMaker strips all <code>POST</code> headers except those supported by the API.
46
- * Amazon SageMaker might add additional headers. You should not rely on the behavior
47
- * of headers outside those enumerated in the request syntax.</p>
44
+ * <p>Amazon SageMaker strips all <code>POST</code> headers except those supported by the API. Amazon SageMaker
45
+ * might add additional headers. You should not rely on the behavior of headers outside
46
+ * those enumerated in the request syntax.</p>
48
47
  *
49
- * <p>Calls to <code>InvokeEndpointAsync</code> are authenticated by using Amazon Web Services Signature
50
- * Version 4. For information, see <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API
51
- * Reference</i>.</p>
48
+ * <p>Calls to <code>InvokeEndpointAsync</code> are authenticated by using Amazon Web Services Signature Version 4. For information, see <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the
49
+ * <i>Amazon S3 API Reference</i>.</p>
52
50
  */
53
51
  invokeEndpointAsync(args: InvokeEndpointAsyncCommandInput, options?: __HttpHandlerOptions): Promise<InvokeEndpointAsyncCommandOutput>;
54
52
  invokeEndpointAsync(args: InvokeEndpointAsyncCommandInput, cb: (err: any, data?: InvokeEndpointAsyncCommandOutput) => void): void;
@@ -7,23 +7,21 @@ export interface InvokeEndpointAsyncCommandInput extends InvokeEndpointAsyncInpu
7
7
  export interface InvokeEndpointAsyncCommandOutput extends InvokeEndpointAsyncOutput, __MetadataBearer {
8
8
  }
9
9
  /**
10
- * <p>After you deploy a model into production using Amazon SageMaker hosting services,
11
- * your client applications use this API to get inferences from the model hosted at
12
- * the specified endpoint in an asynchronous manner.</p>
10
+ * <p>After you deploy a model into production using Amazon SageMaker hosting services, your client
11
+ * applications use this API to get inferences from the model hosted at the specified
12
+ * endpoint in an asynchronous manner.</p>
13
13
  *
14
- * <p>Inference requests sent to this API are enqueued for asynchronous processing.
15
- * The processing of the inference request may or may not complete before the
16
- * you receive a response from this API. The response from this API will
17
- * not contain the result of the inference request but contain information
18
- * about where you can locate it.</p>
14
+ * <p>Inference requests sent to this API are enqueued for asynchronous processing. The
15
+ * processing of the inference request may or may not complete before the you receive a
16
+ * response from this API. The response from this API will not contain the result of the
17
+ * inference request but contain information about where you can locate it.</p>
19
18
  *
20
- * <p>Amazon SageMaker strips all <code>POST</code> headers except those supported by the API.
21
- * Amazon SageMaker might add additional headers. You should not rely on the behavior
22
- * of headers outside those enumerated in the request syntax.</p>
19
+ * <p>Amazon SageMaker strips all <code>POST</code> headers except those supported by the API. Amazon SageMaker
20
+ * might add additional headers. You should not rely on the behavior of headers outside
21
+ * those enumerated in the request syntax.</p>
23
22
  *
24
- * <p>Calls to <code>InvokeEndpointAsync</code> are authenticated by using Amazon Web Services Signature
25
- * Version 4. For information, see <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API
26
- * Reference</i>.</p>
23
+ * <p>Calls to <code>InvokeEndpointAsync</code> are authenticated by using Amazon Web Services Signature Version 4. For information, see <a href="https://docs.aws.amazon.com/https:/docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (Amazon Web Services Signature Version 4)</a> in the
24
+ * <i>Amazon S3 API Reference</i>.</p>
27
25
  * @example
28
26
  * Use a bare-bones client and the command you need to make an API call.
29
27
  * ```javascript
@@ -14,8 +14,8 @@ export interface InvokeEndpointCommandOutput extends InvokeEndpointOutput, __Met
14
14
  * <p>Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add
15
15
  * additional headers. You should not rely on the behavior of headers outside those
16
16
  * enumerated in the request syntax. </p>
17
- * <p>Calls to <code>InvokeEndpoint</code> are authenticated by using Amazon Web Services Signature Version
18
- * 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating
17
+ * <p>Calls to <code>InvokeEndpoint</code> are authenticated by using Amazon Web Services
18
+ * Signature Version 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating
19
19
  * Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API
20
20
  * Reference</i>.</p>
21
21
  * <p>A customer's model containers must respond to requests within 60 seconds. The model
@@ -1,7 +1,8 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { SageMakerRuntimeServiceException as __BaseException } from "./SageMakerRuntimeServiceException";
3
3
  /**
4
- * <p>Your request caused an exception with an internal dependency. Contact customer support. </p>
4
+ * <p>Your request caused an exception with an internal dependency. Contact customer
5
+ * support. </p>
5
6
  */
6
7
  export declare class InternalDependencyException extends __BaseException {
7
8
  readonly name: "InternalDependencyException";
@@ -59,8 +60,8 @@ export interface InvokeEndpointInput {
59
60
  * prepend the custom attribute with <code>Trace ID:</code> in your post-processing
60
61
  * function.</p>
61
62
  *
62
- * <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python
63
- * SDK.</p>
63
+ * <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker
64
+ * Python SDK.</p>
64
65
  */
65
66
  CustomAttributes?: string;
66
67
  /**
@@ -88,12 +89,21 @@ export interface InvokeEndpointInput {
88
89
  * Data</a>.</p>
89
90
  */
90
91
  InferenceId?: string;
92
+ /**
93
+ * <p>An optional JMESPath expression used to override the <code>EnableExplanations</code>
94
+ * parameter of the <code>ClarifyExplainerConfig</code> API. See the <a href="https://docs.aws.amazon.com/clarify-online-explainability-create-endpoint.html#clarify-online-exaplainability-create-endpoint-enable">EnableExplanations</a> section in the developer guide for more information.
95
+ * </p>
96
+ */
97
+ EnableExplanations?: string;
91
98
  }
92
99
  export interface InvokeEndpointOutput {
93
100
  /**
94
- * <p>Includes the inference provided by the model.</p>
101
+ * <p>Includes the inference provided by the model. </p>
95
102
  * <p>For information about the format of the response body, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/cdf-inference.html">Common Data
96
103
  * Formats-Inference</a>.</p>
104
+ * <p>If the explainer is activated, the
105
+ * body includes the explanations provided by the model. For more information, see the
106
+ * <b>Response section</b> under <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-invoke-endpoint.html#clarify-online-explainability-response">Invoke the Endpoint</a> in the Developer Guide.</p>
97
107
  */
98
108
  Body: Uint8Array | undefined;
99
109
  /**
@@ -119,8 +129,8 @@ export interface InvokeEndpointOutput {
119
129
  * returned. For example, if a custom attribute represents the trace ID, your model can
120
130
  * prepend the custom attribute with <code>Trace ID:</code> in your post-processing
121
131
  * function.</p>
122
- * <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python
123
- * SDK.</p>
132
+ * <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker
133
+ * Python SDK.</p>
124
134
  */
125
135
  CustomAttributes?: string;
126
136
  }
@@ -150,7 +160,9 @@ export declare class ModelError extends __BaseException {
150
160
  constructor(opts: __ExceptionOptionType<ModelError, __BaseException>);
151
161
  }
152
162
  /**
153
- * <p>Either a serverless endpoint variant's resources are still being provisioned, or a multi-model endpoint is still downloading or loading the target model. Wait and try your request again.</p>
163
+ * <p>Either a serverless endpoint variant's resources are still being provisioned, or a
164
+ * multi-model endpoint is still downloading or loading the target model. Wait and try your
165
+ * request again.</p>
154
166
  */
155
167
  export declare class ModelNotReadyException extends __BaseException {
156
168
  readonly name: "ModelNotReadyException";
@@ -187,8 +199,8 @@ export declare class ValidationError extends __BaseException {
187
199
  }
188
200
  export interface InvokeEndpointAsyncInput {
189
201
  /**
190
- * <p>The name of the endpoint that you specified when you created the endpoint using
191
- * the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html">
202
+ * <p>The name of the endpoint that you specified when you created the endpoint using the
203
+ * <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateEndpoint.html">
192
204
  * <code>CreateEndpoint</code>
193
205
  * </a> API.</p>
194
206
  */
@@ -202,26 +214,27 @@ export interface InvokeEndpointAsyncInput {
202
214
  */
203
215
  Accept?: string;
204
216
  /**
205
- * <p>Provides additional information about a request for an inference submitted to
206
- * a model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is
207
- * forwarded verbatim. You could use this value, for example, to provide an ID that you
208
- * can use to track a request or to provide other metadata that a service endpoint was
209
- * programmed to process. The value must consist of no more than 1024
210
- * visible US-ASCII characters as specified in
211
- * <a href="https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6">Section 3.3.6.
212
- * Field Value Components</a> of the Hypertext Transfer Protocol (HTTP/1.1). </p>
217
+ * <p>Provides additional information about a request for an inference submitted to a model
218
+ * hosted at an Amazon SageMaker endpoint. The information is an opaque value that is forwarded
219
+ * verbatim. You could use this value, for example, to provide an ID that you can use to
220
+ * track a request or to provide other metadata that a service endpoint was programmed to
221
+ * process. The value must consist of no more than 1024 visible US-ASCII characters as
222
+ * specified in <a href="https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6">Section 3.3.6. Field Value Components</a> of the Hypertext Transfer Protocol
223
+ * (HTTP/1.1). </p>
213
224
  *
214
- * <p>The code in your model is responsible for setting or updating any custom attributes
215
- * in the response. If your code does not set this value in the response, an empty
216
- * value is returned. For example, if a custom attribute represents the trace ID,
217
- * your model can prepend the custom attribute with <code>Trace ID</code>: in your post-processing function. </p>
225
+ * <p>The code in your model is responsible for setting or updating any custom attributes in
226
+ * the response. If your code does not set this value in the response, an empty value is
227
+ * returned. For example, if a custom attribute represents the trace ID, your model can
228
+ * prepend the custom attribute with <code>Trace ID</code>: in your post-processing
229
+ * function. </p>
218
230
  *
219
- * <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK. </p>
231
+ * <p>This feature is currently supported in the Amazon Web Services SDKs but not in the Amazon SageMaker
232
+ * Python SDK. </p>
220
233
  */
221
234
  CustomAttributes?: string;
222
235
  /**
223
- * <p>The identifier for the inference request. Amazon SageMaker will generate an identifier for you
224
- * if none is specified. </p>
236
+ * <p>The identifier for the inference request. Amazon SageMaker will generate an identifier for you if
237
+ * none is specified. </p>
225
238
  */
226
239
  InferenceId?: string;
227
240
  /**
@@ -229,14 +242,16 @@ export interface InvokeEndpointAsyncInput {
229
242
  */
230
243
  InputLocation: string | undefined;
231
244
  /**
232
- * <p>Maximum age in seconds a request can be in the queue before it is marked as expired.</p>
245
+ * <p>Maximum age in seconds a request can be in the queue before it is marked as
246
+ * expired.</p>
233
247
  */
234
248
  RequestTTLSeconds?: number;
235
249
  }
236
250
  export interface InvokeEndpointAsyncOutput {
237
251
  /**
238
- * <p>Identifier for an inference request. This will be the same as the <code>InferenceId</code> specified
239
- * in the input. Amazon SageMaker will generate an identifier for you if you do not specify one.</p>
252
+ * <p>Identifier for an inference request. This will be the same as the
253
+ * <code>InferenceId</code> specified in the input. Amazon SageMaker will generate an identifier
254
+ * for you if you do not specify one.</p>
240
255
  */
241
256
  InferenceId?: string;
242
257
  /**
@@ -24,6 +24,7 @@ export interface InvokeEndpointInput {
24
24
  TargetVariant?: string;
25
25
  TargetContainerHostname?: string;
26
26
  InferenceId?: string;
27
+ EnableExplanations?: string;
27
28
  }
28
29
  export interface InvokeEndpointOutput {
29
30
  Body: Uint8Array | undefined;
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.181.0",
4
+ "version": "3.183.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",
@@ -19,41 +19,41 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.181.0",
23
- "@aws-sdk/config-resolver": "3.178.0",
24
- "@aws-sdk/credential-provider-node": "3.181.0",
25
- "@aws-sdk/fetch-http-handler": "3.178.0",
26
- "@aws-sdk/hash-node": "3.178.0",
27
- "@aws-sdk/invalid-dependency": "3.178.0",
28
- "@aws-sdk/middleware-content-length": "3.178.0",
29
- "@aws-sdk/middleware-host-header": "3.178.0",
30
- "@aws-sdk/middleware-logger": "3.178.0",
31
- "@aws-sdk/middleware-recursion-detection": "3.178.0",
32
- "@aws-sdk/middleware-retry": "3.178.0",
33
- "@aws-sdk/middleware-serde": "3.178.0",
34
- "@aws-sdk/middleware-signing": "3.179.0",
35
- "@aws-sdk/middleware-stack": "3.178.0",
36
- "@aws-sdk/middleware-user-agent": "3.178.0",
37
- "@aws-sdk/node-config-provider": "3.178.0",
38
- "@aws-sdk/node-http-handler": "3.178.0",
39
- "@aws-sdk/protocol-http": "3.178.0",
40
- "@aws-sdk/smithy-client": "3.180.0",
41
- "@aws-sdk/types": "3.178.0",
42
- "@aws-sdk/url-parser": "3.178.0",
43
- "@aws-sdk/util-base64-browser": "3.170.0",
44
- "@aws-sdk/util-base64-node": "3.170.0",
45
- "@aws-sdk/util-body-length-browser": "3.170.0",
46
- "@aws-sdk/util-body-length-node": "3.170.0",
47
- "@aws-sdk/util-defaults-mode-browser": "3.180.0",
48
- "@aws-sdk/util-defaults-mode-node": "3.180.0",
49
- "@aws-sdk/util-user-agent-browser": "3.178.0",
50
- "@aws-sdk/util-user-agent-node": "3.178.0",
51
- "@aws-sdk/util-utf8-browser": "3.170.0",
52
- "@aws-sdk/util-utf8-node": "3.170.0",
22
+ "@aws-sdk/client-sts": "3.183.0",
23
+ "@aws-sdk/config-resolver": "3.183.0",
24
+ "@aws-sdk/credential-provider-node": "3.183.0",
25
+ "@aws-sdk/fetch-http-handler": "3.183.0",
26
+ "@aws-sdk/hash-node": "3.183.0",
27
+ "@aws-sdk/invalid-dependency": "3.183.0",
28
+ "@aws-sdk/middleware-content-length": "3.183.0",
29
+ "@aws-sdk/middleware-host-header": "3.183.0",
30
+ "@aws-sdk/middleware-logger": "3.183.0",
31
+ "@aws-sdk/middleware-recursion-detection": "3.183.0",
32
+ "@aws-sdk/middleware-retry": "3.183.0",
33
+ "@aws-sdk/middleware-serde": "3.183.0",
34
+ "@aws-sdk/middleware-signing": "3.183.0",
35
+ "@aws-sdk/middleware-stack": "3.183.0",
36
+ "@aws-sdk/middleware-user-agent": "3.183.0",
37
+ "@aws-sdk/node-config-provider": "3.183.0",
38
+ "@aws-sdk/node-http-handler": "3.183.0",
39
+ "@aws-sdk/protocol-http": "3.183.0",
40
+ "@aws-sdk/smithy-client": "3.183.0",
41
+ "@aws-sdk/types": "3.183.0",
42
+ "@aws-sdk/url-parser": "3.183.0",
43
+ "@aws-sdk/util-base64-browser": "3.183.0",
44
+ "@aws-sdk/util-base64-node": "3.183.0",
45
+ "@aws-sdk/util-body-length-browser": "3.183.0",
46
+ "@aws-sdk/util-body-length-node": "3.183.0",
47
+ "@aws-sdk/util-defaults-mode-browser": "3.183.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.183.0",
49
+ "@aws-sdk/util-user-agent-browser": "3.183.0",
50
+ "@aws-sdk/util-user-agent-node": "3.183.0",
51
+ "@aws-sdk/util-utf8-browser": "3.183.0",
52
+ "@aws-sdk/util-utf8-node": "3.183.0",
53
53
  "tslib": "^2.3.1"
54
54
  },
55
55
  "devDependencies": {
56
- "@aws-sdk/service-client-documentation-generator": "3.170.0",
56
+ "@aws-sdk/service-client-documentation-generator": "3.183.0",
57
57
  "@tsconfig/recommended": "1.0.1",
58
58
  "@types/node": "^12.7.5",
59
59
  "concurrently": "7.0.0",