@aws-sdk/client-sagemaker-runtime 3.315.0 → 3.319.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,37 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SageMakerRuntime = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
4
5
|
const InvokeEndpointAsyncCommand_1 = require("./commands/InvokeEndpointAsyncCommand");
|
|
5
6
|
const InvokeEndpointCommand_1 = require("./commands/InvokeEndpointCommand");
|
|
6
7
|
const SageMakerRuntimeClient_1 = require("./SageMakerRuntimeClient");
|
|
8
|
+
const commands = {
|
|
9
|
+
InvokeEndpointCommand: InvokeEndpointCommand_1.InvokeEndpointCommand,
|
|
10
|
+
InvokeEndpointAsyncCommand: InvokeEndpointAsyncCommand_1.InvokeEndpointAsyncCommand,
|
|
11
|
+
};
|
|
7
12
|
class SageMakerRuntime extends SageMakerRuntimeClient_1.SageMakerRuntimeClient {
|
|
8
|
-
invokeEndpoint(args, optionsOrCb, cb) {
|
|
9
|
-
const command = new InvokeEndpointCommand_1.InvokeEndpointCommand(args);
|
|
10
|
-
if (typeof optionsOrCb === "function") {
|
|
11
|
-
this.send(command, optionsOrCb);
|
|
12
|
-
}
|
|
13
|
-
else if (typeof cb === "function") {
|
|
14
|
-
if (typeof optionsOrCb !== "object")
|
|
15
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
16
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return this.send(command, optionsOrCb);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
invokeEndpointAsync(args, optionsOrCb, cb) {
|
|
23
|
-
const command = new InvokeEndpointAsyncCommand_1.InvokeEndpointAsyncCommand(args);
|
|
24
|
-
if (typeof optionsOrCb === "function") {
|
|
25
|
-
this.send(command, optionsOrCb);
|
|
26
|
-
}
|
|
27
|
-
else if (typeof cb === "function") {
|
|
28
|
-
if (typeof optionsOrCb !== "object")
|
|
29
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
30
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
return this.send(command, optionsOrCb);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
13
|
}
|
|
37
14
|
exports.SageMakerRuntime = SageMakerRuntime;
|
|
15
|
+
(0, smithy_client_1.createAggregatedClient)(commands, SageMakerRuntime);
|
|
@@ -1,33 +1,11 @@
|
|
|
1
|
+
import { createAggregatedClient } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { InvokeEndpointAsyncCommand, } from "./commands/InvokeEndpointAsyncCommand";
|
|
2
3
|
import { InvokeEndpointCommand, } from "./commands/InvokeEndpointCommand";
|
|
3
4
|
import { SageMakerRuntimeClient } from "./SageMakerRuntimeClient";
|
|
5
|
+
const commands = {
|
|
6
|
+
InvokeEndpointCommand,
|
|
7
|
+
InvokeEndpointAsyncCommand,
|
|
8
|
+
};
|
|
4
9
|
export class SageMakerRuntime extends SageMakerRuntimeClient {
|
|
5
|
-
invokeEndpoint(args, optionsOrCb, cb) {
|
|
6
|
-
const command = new InvokeEndpointCommand(args);
|
|
7
|
-
if (typeof optionsOrCb === "function") {
|
|
8
|
-
this.send(command, optionsOrCb);
|
|
9
|
-
}
|
|
10
|
-
else if (typeof cb === "function") {
|
|
11
|
-
if (typeof optionsOrCb !== "object")
|
|
12
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
13
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return this.send(command, optionsOrCb);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
invokeEndpointAsync(args, optionsOrCb, cb) {
|
|
20
|
-
const command = new InvokeEndpointAsyncCommand(args);
|
|
21
|
-
if (typeof optionsOrCb === "function") {
|
|
22
|
-
this.send(command, optionsOrCb);
|
|
23
|
-
}
|
|
24
|
-
else if (typeof cb === "function") {
|
|
25
|
-
if (typeof optionsOrCb !== "object")
|
|
26
|
-
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
27
|
-
this.send(command, optionsOrCb || {}, cb);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
return this.send(command, optionsOrCb);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
10
|
}
|
|
11
|
+
createAggregatedClient(commands, SageMakerRuntime);
|
|
@@ -2,53 +2,23 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
|
2
2
|
import { InvokeEndpointAsyncCommandInput, InvokeEndpointAsyncCommandOutput } from "./commands/InvokeEndpointAsyncCommand";
|
|
3
3
|
import { InvokeEndpointCommandInput, InvokeEndpointCommandOutput } from "./commands/InvokeEndpointCommand";
|
|
4
4
|
import { SageMakerRuntimeClient } from "./SageMakerRuntimeClient";
|
|
5
|
-
|
|
6
|
-
* @public
|
|
7
|
-
* <p> The Amazon SageMaker runtime API. </p>
|
|
8
|
-
*/
|
|
9
|
-
export declare class SageMakerRuntime extends SageMakerRuntimeClient {
|
|
5
|
+
export interface SageMakerRuntime {
|
|
10
6
|
/**
|
|
11
|
-
* @
|
|
12
|
-
* <p>After you deploy a model into production using Amazon SageMaker hosting services, your
|
|
13
|
-
* client applications use this API to get inferences from the model hosted at the
|
|
14
|
-
* specified endpoint. </p>
|
|
15
|
-
* <p>For an overview of Amazon SageMaker, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html">How It Works</a>. </p>
|
|
16
|
-
* <p>Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add
|
|
17
|
-
* additional headers. You should not rely on the behavior of headers outside those
|
|
18
|
-
* enumerated in the request syntax. </p>
|
|
19
|
-
* <p>Calls to <code>InvokeEndpoint</code> are authenticated by using Amazon Web Services
|
|
20
|
-
* Signature Version 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating
|
|
21
|
-
* Requests (Amazon Web Services Signature Version 4)</a> in the <i>Amazon S3 API
|
|
22
|
-
* Reference</i>.</p>
|
|
23
|
-
* <p>A customer's model containers must respond to requests within 60 seconds. The model
|
|
24
|
-
* itself can have a maximum processing time of 60 seconds before responding to
|
|
25
|
-
* invocations. If your model is going to take 50-60 seconds of processing time, the SDK
|
|
26
|
-
* socket timeout should be set to be 70 seconds.</p>
|
|
27
|
-
* <note>
|
|
28
|
-
* <p>Endpoints are scoped to an individual account, and are not public. The URL does
|
|
29
|
-
* not contain the account ID, but Amazon SageMaker determines the account ID from the
|
|
30
|
-
* authentication token that is supplied by the caller.</p>
|
|
31
|
-
* </note>
|
|
7
|
+
* @see {@link InvokeEndpointCommand}
|
|
32
8
|
*/
|
|
33
9
|
invokeEndpoint(args: InvokeEndpointCommandInput, options?: __HttpHandlerOptions): Promise<InvokeEndpointCommandOutput>;
|
|
34
10
|
invokeEndpoint(args: InvokeEndpointCommandInput, cb: (err: any, data?: InvokeEndpointCommandOutput) => void): void;
|
|
35
11
|
invokeEndpoint(args: InvokeEndpointCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeEndpointCommandOutput) => void): void;
|
|
36
12
|
/**
|
|
37
|
-
* @
|
|
38
|
-
* <p>After you deploy a model into production using Amazon SageMaker hosting services, your client
|
|
39
|
-
* applications use this API to get inferences from the model hosted at the specified
|
|
40
|
-
* endpoint in an asynchronous manner.</p>
|
|
41
|
-
* <p>Inference requests sent to this API are enqueued for asynchronous processing. The
|
|
42
|
-
* processing of the inference request may or may not complete before you receive a
|
|
43
|
-
* response from this API. The response from this API will not contain the result of the
|
|
44
|
-
* inference request but contain information about where you can locate it.</p>
|
|
45
|
-
* <p>Amazon SageMaker strips all <code>POST</code> headers except those supported by the API. Amazon SageMaker
|
|
46
|
-
* might add additional headers. You should not rely on the behavior of headers outside
|
|
47
|
-
* those enumerated in the request syntax.</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/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>
|
|
13
|
+
* @see {@link InvokeEndpointAsyncCommand}
|
|
50
14
|
*/
|
|
51
15
|
invokeEndpointAsync(args: InvokeEndpointAsyncCommandInput, options?: __HttpHandlerOptions): Promise<InvokeEndpointAsyncCommandOutput>;
|
|
52
16
|
invokeEndpointAsync(args: InvokeEndpointAsyncCommandInput, cb: (err: any, data?: InvokeEndpointAsyncCommandOutput) => void): void;
|
|
53
17
|
invokeEndpointAsync(args: InvokeEndpointAsyncCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeEndpointAsyncCommandOutput) => void): void;
|
|
54
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
* <p> The Amazon SageMaker runtime API. </p>
|
|
22
|
+
*/
|
|
23
|
+
export declare class SageMakerRuntime extends SageMakerRuntimeClient implements SageMakerRuntime {
|
|
24
|
+
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
InvokeEndpointCommandOutput,
|
|
9
9
|
} from "./commands/InvokeEndpointCommand";
|
|
10
10
|
import { SageMakerRuntimeClient } from "./SageMakerRuntimeClient";
|
|
11
|
-
export
|
|
11
|
+
export interface SageMakerRuntime {
|
|
12
12
|
invokeEndpoint(
|
|
13
13
|
args: InvokeEndpointCommandInput,
|
|
14
14
|
options?: __HttpHandlerOptions
|
|
@@ -36,3 +36,6 @@ export declare class SageMakerRuntime extends SageMakerRuntimeClient {
|
|
|
36
36
|
cb: (err: any, data?: InvokeEndpointAsyncCommandOutput) => void
|
|
37
37
|
): void;
|
|
38
38
|
}
|
|
39
|
+
export declare class SageMakerRuntime
|
|
40
|
+
extends SageMakerRuntimeClient
|
|
41
|
+
implements SageMakerRuntime {}
|
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.319.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",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.319.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.319.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|
|
28
28
|
"@aws-sdk/hash-node": "3.310.0",
|
|
29
29
|
"@aws-sdk/invalid-dependency": "3.310.0",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"@aws-sdk/middleware-serde": "3.310.0",
|
|
37
37
|
"@aws-sdk/middleware-signing": "3.310.0",
|
|
38
38
|
"@aws-sdk/middleware-stack": "3.310.0",
|
|
39
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
39
|
+
"@aws-sdk/middleware-user-agent": "3.319.0",
|
|
40
40
|
"@aws-sdk/node-config-provider": "3.310.0",
|
|
41
41
|
"@aws-sdk/node-http-handler": "3.310.0",
|
|
42
42
|
"@aws-sdk/protocol-http": "3.310.0",
|
|
43
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
+
"@aws-sdk/smithy-client": "3.316.0",
|
|
44
44
|
"@aws-sdk/types": "3.310.0",
|
|
45
45
|
"@aws-sdk/url-parser": "3.310.0",
|
|
46
46
|
"@aws-sdk/util-base64": "3.310.0",
|
|
47
47
|
"@aws-sdk/util-body-length-browser": "3.310.0",
|
|
48
48
|
"@aws-sdk/util-body-length-node": "3.310.0",
|
|
49
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
50
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
51
|
-
"@aws-sdk/util-endpoints": "3.
|
|
49
|
+
"@aws-sdk/util-defaults-mode-browser": "3.316.0",
|
|
50
|
+
"@aws-sdk/util-defaults-mode-node": "3.316.0",
|
|
51
|
+
"@aws-sdk/util-endpoints": "3.319.0",
|
|
52
52
|
"@aws-sdk/util-retry": "3.310.0",
|
|
53
53
|
"@aws-sdk/util-user-agent-browser": "3.310.0",
|
|
54
54
|
"@aws-sdk/util-user-agent-node": "3.310.0",
|