@aws-sdk/client-sagemaker-runtime-http2 3.938.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/LICENSE +201 -0
- package/README.md +219 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
- package/dist-cjs/endpoint/endpointResolver.js +18 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +537 -0
- package/dist-cjs/runtimeConfig.browser.js +43 -0
- package/dist-cjs/runtimeConfig.js +60 -0
- package/dist-cjs/runtimeConfig.native.js +18 -0
- package/dist-cjs/runtimeConfig.shared.js +36 -0
- package/dist-es/SageMakerRuntimeHTTP2.js +9 -0
- package/dist-es/SageMakerRuntimeHTTP2Client.js +54 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
- package/dist-es/commands/InvokeEndpointWithBidirectionalStreamCommand.js +22 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/SageMakerRuntimeHTTP2ServiceException.js +8 -0
- package/dist-es/models/errors.js +101 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/runtimeConfig.browser.js +38 -0
- package/dist-es/runtimeConfig.js +55 -0
- package/dist-es/runtimeConfig.native.js +14 -0
- package/dist-es/runtimeConfig.shared.js +32 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +273 -0
- package/dist-types/SageMakerRuntimeHTTP2.d.ts +17 -0
- package/dist-types/SageMakerRuntimeHTTP2Client.d.ts +209 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commands/InvokeEndpointWithBidirectionalStreamCommand.d.ts +118 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +38 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +14 -0
- package/dist-types/models/SageMakerRuntimeHTTP2ServiceException.d.ts +14 -0
- package/dist-types/models/errors.d.ts +144 -0
- package/dist-types/models/models_0.d.ts +190 -0
- package/dist-types/runtimeConfig.browser.d.ts +53 -0
- package/dist-types/runtimeConfig.d.ts +53 -0
- package/dist-types/runtimeConfig.native.d.ts +52 -0
- package/dist-types/runtimeConfig.shared.d.ts +22 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +16 -0
- package/dist-types/ts3.4/SageMakerRuntimeHTTP2.d.ts +30 -0
- package/dist-types/ts3.4/SageMakerRuntimeHTTP2Client.d.ts +148 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
- package/dist-types/ts3.4/commands/InvokeEndpointWithBidirectionalStreamCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
- package/dist-types/ts3.4/index.d.ts +9 -0
- package/dist-types/ts3.4/models/SageMakerRuntimeHTTP2ServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/errors.d.ts +54 -0
- package/dist-types/ts3.4/models/models_0.d.ts +78 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +27 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +13 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +21 -0
- package/package.json +104 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { InvokeEndpointWithBidirectionalStreamInput, InvokeEndpointWithBidirectionalStreamOutput } from "../models/models_0";
|
|
4
|
+
import { SageMakerRuntimeHTTP2ClientResolvedConfig } from "../SageMakerRuntimeHTTP2Client";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link InvokeEndpointWithBidirectionalStreamCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface InvokeEndpointWithBidirectionalStreamCommandInput extends InvokeEndpointWithBidirectionalStreamInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link InvokeEndpointWithBidirectionalStreamCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface InvokeEndpointWithBidirectionalStreamCommandOutput extends InvokeEndpointWithBidirectionalStreamOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const InvokeEndpointWithBidirectionalStreamCommand_base: {
|
|
25
|
+
new (input: InvokeEndpointWithBidirectionalStreamCommandInput): import("@smithy/smithy-client").CommandImpl<InvokeEndpointWithBidirectionalStreamCommandInput, InvokeEndpointWithBidirectionalStreamCommandOutput, SageMakerRuntimeHTTP2ClientResolvedConfig, InvokeEndpointWithBidirectionalStreamCommandInput, InvokeEndpointWithBidirectionalStreamCommandOutput>;
|
|
26
|
+
new (input: InvokeEndpointWithBidirectionalStreamCommandInput): import("@smithy/smithy-client").CommandImpl<InvokeEndpointWithBidirectionalStreamCommandInput, InvokeEndpointWithBidirectionalStreamCommandOutput, SageMakerRuntimeHTTP2ClientResolvedConfig, InvokeEndpointWithBidirectionalStreamCommandInput, InvokeEndpointWithBidirectionalStreamCommandOutput>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Invokes a model endpoint with bidirectional streaming capabilities. This operation establishes a persistent connection that allows you to send multiple requests and receive streaming responses from the model in real-time.</p> <p>Bidirectional streaming is useful for interactive applications such as chatbots, real-time translation, or any scenario where you need to maintain a conversation-like interaction with the model. The connection remains open, allowing you to send additional input and receive responses without establishing a new connection for each request.</p> <p>For an overview of Amazon SageMaker AI, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works.html">How It Works</a>.</p> <p>Amazon SageMaker AI strips all POST headers except those supported by the API. Amazon SageMaker AI might add additional headers. You should not rely on the behavior of headers outside those enumerated in the request syntax. </p> <p>Calls to <code>InvokeEndpointWithBidirectionalStream</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 <i>Amazon S3 API Reference</i>.</p> <p>The bidirectional stream maintains the connection until either the client closes it or the model indicates completion. Each request and response in the stream is sent as an event with optional headers for data type and completion state.</p> <note> <p>Endpoints are scoped to an individual account, and are not public. The URL does not contain the account ID, but Amazon SageMaker AI determines the account ID from the authentication token that is supplied by the caller.</p> </note>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { SageMakerRuntimeHTTP2Client, InvokeEndpointWithBidirectionalStreamCommand } from "@aws-sdk/client-sagemaker-runtime-http2"; // ES Modules import
|
|
35
|
+
* // const { SageMakerRuntimeHTTP2Client, InvokeEndpointWithBidirectionalStreamCommand } = require("@aws-sdk/client-sagemaker-runtime-http2"); // CommonJS import
|
|
36
|
+
* // import type { SageMakerRuntimeHTTP2ClientConfig } from "@aws-sdk/client-sagemaker-runtime-http2";
|
|
37
|
+
* const config = {}; // type is SageMakerRuntimeHTTP2ClientConfig
|
|
38
|
+
* const client = new SageMakerRuntimeHTTP2Client(config);
|
|
39
|
+
* const input = { // InvokeEndpointWithBidirectionalStreamInput
|
|
40
|
+
* EndpointName: "STRING_VALUE", // required
|
|
41
|
+
* Body: { // RequestStreamEvent Union: only one key present
|
|
42
|
+
* PayloadPart: { // RequestPayloadPart
|
|
43
|
+
* Bytes: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
44
|
+
* DataType: "STRING_VALUE",
|
|
45
|
+
* CompletionState: "STRING_VALUE",
|
|
46
|
+
* P: "STRING_VALUE",
|
|
47
|
+
* },
|
|
48
|
+
* },
|
|
49
|
+
* TargetVariant: "STRING_VALUE",
|
|
50
|
+
* ModelInvocationPath: "STRING_VALUE",
|
|
51
|
+
* ModelQueryString: "STRING_VALUE",
|
|
52
|
+
* };
|
|
53
|
+
* const command = new InvokeEndpointWithBidirectionalStreamCommand(input);
|
|
54
|
+
* const response = await client.send(command);
|
|
55
|
+
* // { // InvokeEndpointWithBidirectionalStreamOutput
|
|
56
|
+
* // Body: { // ResponseStreamEvent Union: only one key present
|
|
57
|
+
* // PayloadPart: { // ResponsePayloadPart
|
|
58
|
+
* // Bytes: new Uint8Array(),
|
|
59
|
+
* // DataType: "STRING_VALUE",
|
|
60
|
+
* // CompletionState: "STRING_VALUE",
|
|
61
|
+
* // P: "STRING_VALUE",
|
|
62
|
+
* // },
|
|
63
|
+
* // ModelStreamError: { // ModelStreamError
|
|
64
|
+
* // Message: "STRING_VALUE",
|
|
65
|
+
* // ErrorCode: "STRING_VALUE",
|
|
66
|
+
* // },
|
|
67
|
+
* // InternalStreamFailure: { // InternalStreamFailure
|
|
68
|
+
* // Message: "STRING_VALUE",
|
|
69
|
+
* // },
|
|
70
|
+
* // },
|
|
71
|
+
* // InvokedProductionVariant: "STRING_VALUE",
|
|
72
|
+
* // };
|
|
73
|
+
*
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @param InvokeEndpointWithBidirectionalStreamCommandInput - {@link InvokeEndpointWithBidirectionalStreamCommandInput}
|
|
77
|
+
* @returns {@link InvokeEndpointWithBidirectionalStreamCommandOutput}
|
|
78
|
+
* @see {@link InvokeEndpointWithBidirectionalStreamCommandInput} for command's `input` shape.
|
|
79
|
+
* @see {@link InvokeEndpointWithBidirectionalStreamCommandOutput} for command's `response` shape.
|
|
80
|
+
* @see {@link SageMakerRuntimeHTTP2ClientResolvedConfig | config} for SageMakerRuntimeHTTP2Client's `config` shape.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link InputValidationError} (client fault)
|
|
83
|
+
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
|
|
84
|
+
*
|
|
85
|
+
* @throws {@link InternalServerError} (server fault)
|
|
86
|
+
* <p>The request processing has failed because of an unknown error, exception or failure.</p>
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link InternalStreamFailure} (server fault)
|
|
89
|
+
* <p>Internal stream failure that occurs during streaming.</p>
|
|
90
|
+
*
|
|
91
|
+
* @throws {@link ModelError} (client fault)
|
|
92
|
+
* <p>An error occurred while processing the model.</p>
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link ModelStreamError} (client fault)
|
|
95
|
+
* <p>Model stream error that occurs during streaming.</p>
|
|
96
|
+
*
|
|
97
|
+
* @throws {@link ServiceUnavailableError} (server fault)
|
|
98
|
+
* <p>The request has failed due to a temporary failure of the server.</p>
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link SageMakerRuntimeHTTP2ServiceException}
|
|
101
|
+
* <p>Base exception class for all service exceptions from SageMakerRuntimeHTTP2 service.</p>
|
|
102
|
+
*
|
|
103
|
+
*
|
|
104
|
+
* @public
|
|
105
|
+
*/
|
|
106
|
+
export declare class InvokeEndpointWithBidirectionalStreamCommand extends InvokeEndpointWithBidirectionalStreamCommand_base {
|
|
107
|
+
/** @internal type navigation helper, not in runtime. */
|
|
108
|
+
protected static __types: {
|
|
109
|
+
api: {
|
|
110
|
+
input: InvokeEndpointWithBidirectionalStreamInput;
|
|
111
|
+
output: InvokeEndpointWithBidirectionalStreamOutput;
|
|
112
|
+
};
|
|
113
|
+
sdk: {
|
|
114
|
+
input: InvokeEndpointWithBidirectionalStreamCommandInput;
|
|
115
|
+
output: InvokeEndpointWithBidirectionalStreamCommandOutput;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./InvokeEndpointWithBidirectionalStreamCommand";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Endpoint, EndpointParameters as __EndpointParameters, EndpointV2, Provider } from "@smithy/types";
|
|
2
|
+
/**
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export interface ClientInputEndpointParameters {
|
|
6
|
+
useDualstackEndpoint?: boolean | undefined | Provider<boolean | undefined>;
|
|
7
|
+
useFipsEndpoint?: boolean | undefined | Provider<boolean | undefined>;
|
|
8
|
+
endpoint?: string | Provider<string> | Endpoint | Provider<Endpoint> | EndpointV2 | Provider<EndpointV2>;
|
|
9
|
+
region?: string | undefined | Provider<string | undefined>;
|
|
10
|
+
}
|
|
11
|
+
export type ClientResolvedEndpointParameters = Omit<ClientInputEndpointParameters, "endpoint"> & {
|
|
12
|
+
defaultSigningName: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const resolveClientEndpointParameters: <T>(options: T & ClientInputEndpointParameters) => T & ClientResolvedEndpointParameters;
|
|
15
|
+
export declare const commonParams: {
|
|
16
|
+
readonly UseFIPS: {
|
|
17
|
+
readonly type: "builtInParams";
|
|
18
|
+
readonly name: "useFipsEndpoint";
|
|
19
|
+
};
|
|
20
|
+
readonly Endpoint: {
|
|
21
|
+
readonly type: "builtInParams";
|
|
22
|
+
readonly name: "endpoint";
|
|
23
|
+
};
|
|
24
|
+
readonly Region: {
|
|
25
|
+
readonly type: "builtInParams";
|
|
26
|
+
readonly name: "region";
|
|
27
|
+
};
|
|
28
|
+
readonly UseDualStack: {
|
|
29
|
+
readonly type: "builtInParams";
|
|
30
|
+
readonly name: "useDualstackEndpoint";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export interface EndpointParameters extends __EndpointParameters {
|
|
34
|
+
UseDualStack?: boolean | undefined;
|
|
35
|
+
UseFIPS?: boolean | undefined;
|
|
36
|
+
Endpoint?: string | undefined;
|
|
37
|
+
Region?: string | undefined;
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
|
|
2
|
+
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
|
|
3
|
+
import { DefaultExtensionConfiguration } from "@smithy/types";
|
|
4
|
+
import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface SageMakerRuntimeHTTP2ExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <p> The Amazon SageMaker AI runtime HTTP/2 API. </p>
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
export * from "./SageMakerRuntimeHTTP2Client";
|
|
7
|
+
export * from "./SageMakerRuntimeHTTP2";
|
|
8
|
+
export { ClientInputEndpointParameters } from "./endpoint/EndpointParameters";
|
|
9
|
+
export type { RuntimeExtension } from "./runtimeExtensions";
|
|
10
|
+
export type { SageMakerRuntimeHTTP2ExtensionConfiguration } from "./extensionConfiguration";
|
|
11
|
+
export * from "./commands";
|
|
12
|
+
export * from "./models/errors";
|
|
13
|
+
export type * from "./models/models_0";
|
|
14
|
+
export { SageMakerRuntimeHTTP2ServiceException } from "./models/SageMakerRuntimeHTTP2ServiceException";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, ServiceExceptionOptions as __ServiceExceptionOptions } from "@smithy/smithy-client";
|
|
2
|
+
export type { __ServiceExceptionOptions };
|
|
3
|
+
export { __ServiceException };
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*
|
|
7
|
+
* Base exception class for all service exceptions from SageMakerRuntimeHTTP2 service.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SageMakerRuntimeHTTP2ServiceException extends __ServiceException {
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
constructor(options: __ServiceExceptionOptions);
|
|
14
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
|
|
2
|
+
import { SageMakerRuntimeHTTP2ServiceException as __BaseException } from "./SageMakerRuntimeHTTP2ServiceException";
|
|
3
|
+
/**
|
|
4
|
+
* <p>The input fails to satisfy the constraints specified by an AWS service.</p>
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare class InputValidationError extends __BaseException {
|
|
8
|
+
readonly name: "InputValidationError";
|
|
9
|
+
readonly $fault: "client";
|
|
10
|
+
/**
|
|
11
|
+
* <p>Error message.</p>
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
Message?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* <p>Error code.</p>
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
ErrorCode?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
constructor(opts: __ExceptionOptionType<InputValidationError, __BaseException>);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* <p>The request processing has failed because of an unknown error, exception or failure.</p>
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export declare class InternalServerError extends __BaseException {
|
|
30
|
+
readonly name: "InternalServerError";
|
|
31
|
+
readonly $fault: "server";
|
|
32
|
+
/**
|
|
33
|
+
* <p>Error message.</p>
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
Message?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* <p>Error code.</p>
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
ErrorCode?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
constructor(opts: __ExceptionOptionType<InternalServerError, __BaseException>);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* <p>Internal stream failure that occurs during streaming.</p>
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
export declare class InternalStreamFailure extends __BaseException {
|
|
52
|
+
readonly name: "InternalStreamFailure";
|
|
53
|
+
readonly $fault: "server";
|
|
54
|
+
/**
|
|
55
|
+
* <p>Error message.</p>
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
Message?: string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
constructor(opts: __ExceptionOptionType<InternalStreamFailure, __BaseException>);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* <p>Model stream error that occurs during streaming.</p>
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
export declare class ModelStreamError extends __BaseException {
|
|
69
|
+
readonly name: "ModelStreamError";
|
|
70
|
+
readonly $fault: "client";
|
|
71
|
+
/**
|
|
72
|
+
* <p>Error message.</p>
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
Message?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* <p>Error code.</p>
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
ErrorCode?: string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
constructor(opts: __ExceptionOptionType<ModelStreamError, __BaseException>);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* <p>An error occurred while processing the model.</p>
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export declare class ModelError extends __BaseException {
|
|
91
|
+
readonly name: "ModelError";
|
|
92
|
+
readonly $fault: "client";
|
|
93
|
+
/**
|
|
94
|
+
* <p>Error message.</p>
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
Message?: string | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* <p>HTTP status code returned by model.</p>
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
OriginalStatusCode?: number | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* <p>Original error message from the model.</p>
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
OriginalMessage?: string | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* <p>CloudWatch log stream ARN.</p>
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
LogStreamArn?: string | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* <p>Error code.</p>
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
ErrorCode?: string | undefined;
|
|
118
|
+
/**
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
constructor(opts: __ExceptionOptionType<ModelError, __BaseException>);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* <p>The request has failed due to a temporary failure of the server.</p>
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export declare class ServiceUnavailableError extends __BaseException {
|
|
128
|
+
readonly name: "ServiceUnavailableError";
|
|
129
|
+
readonly $fault: "server";
|
|
130
|
+
/**
|
|
131
|
+
* <p>Error message.</p>
|
|
132
|
+
* @public
|
|
133
|
+
*/
|
|
134
|
+
Message?: string | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* <p>Error code.</p>
|
|
137
|
+
* @public
|
|
138
|
+
*/
|
|
139
|
+
ErrorCode?: string | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
constructor(opts: __ExceptionOptionType<ServiceUnavailableError, __BaseException>);
|
|
144
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { InternalStreamFailure, ModelStreamError } from "./errors";
|
|
2
|
+
/**
|
|
3
|
+
* <p>Request payload part structure.</p>
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface RequestPayloadPart {
|
|
7
|
+
/**
|
|
8
|
+
* <p>The payload bytes.</p>
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
Bytes?: Uint8Array | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* <p>Data type header. Can be one of these possible values: "UTF8", "BINARY".</p>
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
DataType?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* <p>Completion state header. Can be one of these possible values: "PARTIAL", "COMPLETE".</p>
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
CompletionState?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* <p>Padding string for alignment.</p>
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
P?: string | undefined;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* <p>Request stream event union.</p>
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
32
|
+
export type RequestStreamEvent = RequestStreamEvent.PayloadPartMember | RequestStreamEvent.$UnknownMember;
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export declare namespace RequestStreamEvent {
|
|
37
|
+
/**
|
|
38
|
+
* <p>Payload part event.</p>
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
interface PayloadPartMember {
|
|
42
|
+
PayloadPart: RequestPayloadPart;
|
|
43
|
+
$unknown?: never;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
interface $UnknownMember {
|
|
49
|
+
PayloadPart?: never;
|
|
50
|
+
$unknown: [string, any];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated unused in schema-serde mode.
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
interface Visitor<T> {
|
|
57
|
+
PayloadPart: (value: RequestPayloadPart) => T;
|
|
58
|
+
_: (name: string, value: any) => T;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export interface InvokeEndpointWithBidirectionalStreamInput {
|
|
65
|
+
/**
|
|
66
|
+
* <p>The name of the endpoint to invoke.</p>
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
EndpointName: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* <p>The request payload stream.</p>
|
|
72
|
+
* @public
|
|
73
|
+
*/
|
|
74
|
+
Body: AsyncIterable<RequestStreamEvent> | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* <p>Target variant for the request.</p>
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
TargetVariant?: string | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* <p>Model invocation path.</p>
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
ModelInvocationPath?: string | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* <p>Model query string.</p>
|
|
87
|
+
* @public
|
|
88
|
+
*/
|
|
89
|
+
ModelQueryString?: string | undefined;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* <p>Response payload part structure.</p>
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
export interface ResponsePayloadPart {
|
|
96
|
+
/**
|
|
97
|
+
* <p>The payload bytes.</p>
|
|
98
|
+
* @public
|
|
99
|
+
*/
|
|
100
|
+
Bytes?: Uint8Array | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* <p>Data type header. Can be one of these possible values: "UTF8", "BINARY".</p>
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
DataType?: string | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* <p>Completion state header. Can be one of these possible values: "PARTIAL", "COMPLETE".</p>
|
|
108
|
+
* @public
|
|
109
|
+
*/
|
|
110
|
+
CompletionState?: string | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* <p>Padding string for alignment.</p>
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
P?: string | undefined;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* <p>Response stream event union.</p>
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
export type ResponseStreamEvent = ResponseStreamEvent.InternalStreamFailureMember | ResponseStreamEvent.ModelStreamErrorMember | ResponseStreamEvent.PayloadPartMember | ResponseStreamEvent.$UnknownMember;
|
|
122
|
+
/**
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
export declare namespace ResponseStreamEvent {
|
|
126
|
+
/**
|
|
127
|
+
* <p>Payload part event.</p>
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
interface PayloadPartMember {
|
|
131
|
+
PayloadPart: ResponsePayloadPart;
|
|
132
|
+
ModelStreamError?: never;
|
|
133
|
+
InternalStreamFailure?: never;
|
|
134
|
+
$unknown?: never;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* <p>Model stream error event.</p>
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
interface ModelStreamErrorMember {
|
|
141
|
+
PayloadPart?: never;
|
|
142
|
+
ModelStreamError: ModelStreamError;
|
|
143
|
+
InternalStreamFailure?: never;
|
|
144
|
+
$unknown?: never;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* <p>Internal stream failure event.</p>
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
interface InternalStreamFailureMember {
|
|
151
|
+
PayloadPart?: never;
|
|
152
|
+
ModelStreamError?: never;
|
|
153
|
+
InternalStreamFailure: InternalStreamFailure;
|
|
154
|
+
$unknown?: never;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
|
+
interface $UnknownMember {
|
|
160
|
+
PayloadPart?: never;
|
|
161
|
+
ModelStreamError?: never;
|
|
162
|
+
InternalStreamFailure?: never;
|
|
163
|
+
$unknown: [string, any];
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* @deprecated unused in schema-serde mode.
|
|
167
|
+
*
|
|
168
|
+
*/
|
|
169
|
+
interface Visitor<T> {
|
|
170
|
+
PayloadPart: (value: ResponsePayloadPart) => T;
|
|
171
|
+
ModelStreamError: (value: ModelStreamError) => T;
|
|
172
|
+
InternalStreamFailure: (value: InternalStreamFailure) => T;
|
|
173
|
+
_: (name: string, value: any) => T;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* @public
|
|
178
|
+
*/
|
|
179
|
+
export interface InvokeEndpointWithBidirectionalStreamOutput {
|
|
180
|
+
/**
|
|
181
|
+
* <p>The response payload stream.</p>
|
|
182
|
+
* @public
|
|
183
|
+
*/
|
|
184
|
+
Body: AsyncIterable<ResponseStreamEvent> | undefined;
|
|
185
|
+
/**
|
|
186
|
+
* <p>The invoked production variant.</p>
|
|
187
|
+
* @public
|
|
188
|
+
*/
|
|
189
|
+
InvokedProductionVariant?: string | undefined;
|
|
190
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FetchHttpHandler as RequestHandler } from "@smithy/fetch-http-handler";
|
|
2
|
+
import { SageMakerRuntimeHTTP2ClientConfig } from "./SageMakerRuntimeHTTP2Client";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const getRuntimeConfig: (config: SageMakerRuntimeHTTP2ClientConfig) => {
|
|
7
|
+
runtime: string;
|
|
8
|
+
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
9
|
+
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
10
|
+
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((_: unknown) => () => Promise<import("@smithy/types").AwsCredentialIdentity>);
|
|
11
|
+
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-browser").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
|
|
12
|
+
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
13
|
+
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
14
|
+
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
15
|
+
region: string | import("@smithy/types").Provider<any>;
|
|
16
|
+
requestHandler: import("@smithy/protocol-http").HttpHandler<any> | RequestHandler;
|
|
17
|
+
retryMode: string | import("@smithy/types").Provider<string>;
|
|
18
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
19
|
+
streamCollector: import("@smithy/types").StreamCollector;
|
|
20
|
+
useDualstackEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
21
|
+
useFipsEndpoint: (boolean | import("@smithy/types").Provider<boolean>) & (boolean | import("@smithy/types").Provider<boolean | undefined>);
|
|
22
|
+
apiVersion: string;
|
|
23
|
+
cacheMiddleware?: boolean | undefined;
|
|
24
|
+
urlParser: import("@smithy/types").UrlParser;
|
|
25
|
+
base64Decoder: import("@smithy/types").Decoder;
|
|
26
|
+
base64Encoder: (_input: Uint8Array | string) => string;
|
|
27
|
+
utf8Decoder: import("@smithy/types").Decoder;
|
|
28
|
+
utf8Encoder: (input: Uint8Array | string) => string;
|
|
29
|
+
disableHostPrefix: boolean;
|
|
30
|
+
serviceId: string;
|
|
31
|
+
profile?: string;
|
|
32
|
+
logger: import("@smithy/types").Logger;
|
|
33
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
34
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
35
|
+
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
36
|
+
userAgentAppId?: string | undefined | import("@smithy/types").Provider<string | undefined>;
|
|
37
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
38
|
+
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
39
|
+
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
40
|
+
logger?: import("@smithy/types").Logger;
|
|
41
|
+
}) => import("@smithy/types").EndpointV2;
|
|
42
|
+
tls?: boolean;
|
|
43
|
+
serviceConfiguredEndpoint?: never;
|
|
44
|
+
authSchemePreference?: string[] | import("@smithy/types").Provider<string[]>;
|
|
45
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
46
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SageMakerRuntimeHTTP2HttpAuthSchemeProvider;
|
|
47
|
+
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
|
|
48
|
+
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme) => Promise<import("@smithy/types").RequestSigner>);
|
|
49
|
+
signingEscapePath?: boolean;
|
|
50
|
+
systemClockOffset?: number;
|
|
51
|
+
signingRegion?: string;
|
|
52
|
+
signerConstructor?: new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner;
|
|
53
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { NodeHttp2Handler as RequestHandler } from "@smithy/node-http-handler";
|
|
2
|
+
import { SageMakerRuntimeHTTP2ClientConfig } from "./SageMakerRuntimeHTTP2Client";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare const getRuntimeConfig: (config: SageMakerRuntimeHTTP2ClientConfig) => {
|
|
7
|
+
runtime: string;
|
|
8
|
+
defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
|
|
9
|
+
authSchemePreference: string[] | import("@smithy/types").Provider<string[]>;
|
|
10
|
+
bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
|
|
11
|
+
credentialDefaultProvider: ((input: any) => import("@smithy/types").AwsCredentialIdentityProvider) | ((init?: import("@aws-sdk/credential-provider-node").DefaultProviderInit) => import("@aws-sdk/credential-provider-node/dist-types/runtime/memoize-chain").MemoizedRuntimeConfigAwsCredentialIdentityProvider);
|
|
12
|
+
defaultUserAgentProvider: (config?: import("@aws-sdk/util-user-agent-node").PreviouslyResolved) => Promise<import("@smithy/types").UserAgent>;
|
|
13
|
+
eventStreamPayloadHandlerProvider: import("@smithy/types").EventStreamPayloadHandlerProvider;
|
|
14
|
+
eventStreamSerdeProvider: import("@smithy/types").EventStreamSerdeProvider;
|
|
15
|
+
maxAttempts: number | import("@smithy/types").Provider<number>;
|
|
16
|
+
region: string | import("@smithy/types").Provider<string>;
|
|
17
|
+
requestHandler: RequestHandler | import("@smithy/protocol-http").HttpHandler<any>;
|
|
18
|
+
retryMode: string | import("@smithy/types").Provider<string>;
|
|
19
|
+
sha256: import("@smithy/types").HashConstructor;
|
|
20
|
+
streamCollector: import("@smithy/types").StreamCollector;
|
|
21
|
+
useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
22
|
+
useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
|
|
23
|
+
userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
|
|
24
|
+
apiVersion: string;
|
|
25
|
+
cacheMiddleware?: boolean | undefined;
|
|
26
|
+
urlParser: import("@smithy/types").UrlParser;
|
|
27
|
+
base64Decoder: import("@smithy/types").Decoder;
|
|
28
|
+
base64Encoder: (_input: Uint8Array | string) => string;
|
|
29
|
+
utf8Decoder: import("@smithy/types").Decoder;
|
|
30
|
+
utf8Encoder: (input: Uint8Array | string) => string;
|
|
31
|
+
disableHostPrefix: boolean;
|
|
32
|
+
serviceId: string;
|
|
33
|
+
profile?: string;
|
|
34
|
+
logger: import("@smithy/types").Logger;
|
|
35
|
+
extensions: import("./runtimeExtensions").RuntimeExtension[];
|
|
36
|
+
protocol: import("@smithy/types").ClientProtocol<import("@smithy/types").HttpRequest, import("@smithy/types").HttpResponse>;
|
|
37
|
+
customUserAgent?: string | import("@smithy/types").UserAgent;
|
|
38
|
+
retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2;
|
|
39
|
+
endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
|
|
40
|
+
endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
|
|
41
|
+
logger?: import("@smithy/types").Logger;
|
|
42
|
+
}) => import("@smithy/types").EndpointV2;
|
|
43
|
+
tls?: boolean;
|
|
44
|
+
serviceConfiguredEndpoint?: never;
|
|
45
|
+
httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
|
|
46
|
+
httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").SageMakerRuntimeHTTP2HttpAuthSchemeProvider;
|
|
47
|
+
credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider;
|
|
48
|
+
signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme) => Promise<import("@smithy/types").RequestSigner>);
|
|
49
|
+
signingEscapePath?: boolean;
|
|
50
|
+
systemClockOffset?: number;
|
|
51
|
+
signingRegion?: string;
|
|
52
|
+
signerConstructor?: new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner;
|
|
53
|
+
};
|