@aws-sdk/client-sagemaker-runtime 3.461.0 → 3.462.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/protocols/Aws_restJson1.js +2 -0
- package/dist-es/protocols/Aws_restJson1.js +2 -0
- package/dist-types/commands/InvokeEndpointCommand.d.ts +1 -0
- package/dist-types/commands/InvokeEndpointWithResponseStreamCommand.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +12 -0
- package/dist-types/ts3.4/models/models_0.d.ts +2 -0
- package/package.json +2 -2
|
@@ -16,6 +16,7 @@ const se_InvokeEndpointCommand = async (input, context) => {
|
|
|
16
16
|
"x-amzn-sagemaker-target-container-hostname": input.TargetContainerHostname,
|
|
17
17
|
"x-amzn-sagemaker-inference-id": input.InferenceId,
|
|
18
18
|
"x-amzn-sagemaker-enable-explanations": input.EnableExplanations,
|
|
19
|
+
"x-amzn-sagemaker-inference-component": input.InferenceComponentName,
|
|
19
20
|
});
|
|
20
21
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/endpoints/{EndpointName}/invocations";
|
|
21
22
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "EndpointName", () => input.EndpointName, "{EndpointName}", false);
|
|
@@ -75,6 +76,7 @@ const se_InvokeEndpointWithResponseStreamCommand = async (input, context) => {
|
|
|
75
76
|
"x-amzn-sagemaker-target-variant": input.TargetVariant,
|
|
76
77
|
"x-amzn-sagemaker-target-container-hostname": input.TargetContainerHostname,
|
|
77
78
|
"x-amzn-sagemaker-inference-id": input.InferenceId,
|
|
79
|
+
"x-amzn-sagemaker-inference-component": input.InferenceComponentName,
|
|
78
80
|
});
|
|
79
81
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
80
82
|
"/endpoints/{EndpointName}/invocations-response-stream";
|
|
@@ -13,6 +13,7 @@ export const se_InvokeEndpointCommand = async (input, context) => {
|
|
|
13
13
|
"x-amzn-sagemaker-target-container-hostname": input.TargetContainerHostname,
|
|
14
14
|
"x-amzn-sagemaker-inference-id": input.InferenceId,
|
|
15
15
|
"x-amzn-sagemaker-enable-explanations": input.EnableExplanations,
|
|
16
|
+
"x-amzn-sagemaker-inference-component": input.InferenceComponentName,
|
|
16
17
|
});
|
|
17
18
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/endpoints/{EndpointName}/invocations";
|
|
18
19
|
resolvedPath = __resolvedPath(resolvedPath, input, "EndpointName", () => input.EndpointName, "{EndpointName}", false);
|
|
@@ -70,6 +71,7 @@ export const se_InvokeEndpointWithResponseStreamCommand = async (input, context)
|
|
|
70
71
|
"x-amzn-sagemaker-target-variant": input.TargetVariant,
|
|
71
72
|
"x-amzn-sagemaker-target-container-hostname": input.TargetContainerHostname,
|
|
72
73
|
"x-amzn-sagemaker-inference-id": input.InferenceId,
|
|
74
|
+
"x-amzn-sagemaker-inference-component": input.InferenceComponentName,
|
|
73
75
|
});
|
|
74
76
|
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
75
77
|
"/endpoints/{EndpointName}/invocations-response-stream";
|
|
@@ -72,6 +72,7 @@ export interface InvokeEndpointCommandOutput extends InvokeEndpointCommandOutput
|
|
|
72
72
|
* TargetContainerHostname: "STRING_VALUE",
|
|
73
73
|
* InferenceId: "STRING_VALUE",
|
|
74
74
|
* EnableExplanations: "STRING_VALUE",
|
|
75
|
+
* InferenceComponentName: "STRING_VALUE",
|
|
75
76
|
* };
|
|
76
77
|
* const command = new InvokeEndpointCommand(input);
|
|
77
78
|
* const response = await client.send(command);
|
|
@@ -44,6 +44,9 @@ export interface InvokeEndpointWithResponseStreamCommandOutput extends InvokeEnd
|
|
|
44
44
|
* <p>For information about how to process the streaming response, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/realtime-endpoints-test-endpoints.html">Invoke real-time endpoints</a>.</p>
|
|
45
45
|
* </li>
|
|
46
46
|
* </ul>
|
|
47
|
+
* <p>Before you can use this operation, your IAM permissions must allow the
|
|
48
|
+
* <code>sagemaker:InvokeEndpoint</code> action. For more information about Amazon SageMaker actions for IAM policies, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonsagemaker.html">Actions, resources, and condition keys for Amazon SageMaker</a> in the <i>IAM Service Authorization
|
|
49
|
+
* Reference</i>.</p>
|
|
47
50
|
* <p>Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add
|
|
48
51
|
* additional headers. You should not rely on the behavior of headers outside those
|
|
49
52
|
* enumerated in the request syntax. </p>
|
|
@@ -65,6 +68,7 @@ export interface InvokeEndpointWithResponseStreamCommandOutput extends InvokeEnd
|
|
|
65
68
|
* TargetVariant: "STRING_VALUE",
|
|
66
69
|
* TargetContainerHostname: "STRING_VALUE",
|
|
67
70
|
* InferenceId: "STRING_VALUE",
|
|
71
|
+
* InferenceComponentName: "STRING_VALUE",
|
|
68
72
|
* };
|
|
69
73
|
* const command = new InvokeEndpointWithResponseStreamCommand(input);
|
|
70
74
|
* const response = await client.send(command);
|
|
@@ -109,6 +109,12 @@ export interface InvokeEndpointInput {
|
|
|
109
109
|
* </p>
|
|
110
110
|
*/
|
|
111
111
|
EnableExplanations?: string;
|
|
112
|
+
/**
|
|
113
|
+
* @public
|
|
114
|
+
* <p>If the endpoint hosts one or more inference components, this parameter specifies the
|
|
115
|
+
* name of inference component to invoke.</p>
|
|
116
|
+
*/
|
|
117
|
+
InferenceComponentName?: string;
|
|
112
118
|
}
|
|
113
119
|
/**
|
|
114
120
|
* @public
|
|
@@ -391,6 +397,12 @@ export interface InvokeEndpointWithResponseStreamInput {
|
|
|
391
397
|
* <p>An identifier that you assign to your request.</p>
|
|
392
398
|
*/
|
|
393
399
|
InferenceId?: string;
|
|
400
|
+
/**
|
|
401
|
+
* @public
|
|
402
|
+
* <p>If the endpoint hosts one or more inference components, this parameter specifies the
|
|
403
|
+
* name of inference component to invoke for a streaming response.</p>
|
|
404
|
+
*/
|
|
405
|
+
InferenceComponentName?: string;
|
|
394
406
|
}
|
|
395
407
|
/**
|
|
396
408
|
* @public
|
|
@@ -25,6 +25,7 @@ export interface InvokeEndpointInput {
|
|
|
25
25
|
TargetContainerHostname?: string;
|
|
26
26
|
InferenceId?: string;
|
|
27
27
|
EnableExplanations?: string;
|
|
28
|
+
InferenceComponentName?: string;
|
|
28
29
|
}
|
|
29
30
|
export interface InvokeEndpointOutput {
|
|
30
31
|
Body: Uint8Array | undefined;
|
|
@@ -93,6 +94,7 @@ export interface InvokeEndpointWithResponseStreamInput {
|
|
|
93
94
|
TargetVariant?: string;
|
|
94
95
|
TargetContainerHostname?: string;
|
|
95
96
|
InferenceId?: string;
|
|
97
|
+
InferenceComponentName?: string;
|
|
96
98
|
}
|
|
97
99
|
export declare class ModelStreamError extends __BaseException {
|
|
98
100
|
readonly name: "ModelStreamError";
|
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.462.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,7 +21,7 @@
|
|
|
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.462.0",
|
|
25
25
|
"@aws-sdk/core": "3.451.0",
|
|
26
26
|
"@aws-sdk/credential-provider-node": "3.460.0",
|
|
27
27
|
"@aws-sdk/middleware-host-header": "3.460.0",
|