@aws-sdk/client-sagemaker-runtime 3.34.0 → 3.37.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/CHANGELOG.md +47 -0
- package/{dist/cjs → dist-cjs}/SageMakerRuntime.js +1 -5
- package/{dist/cjs → dist-cjs}/SageMakerRuntimeClient.js +8 -17
- package/dist-cjs/commands/InvokeEndpointAsyncCommand.js +36 -0
- package/dist-cjs/commands/InvokeEndpointCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -25
- package/{dist/cjs → dist-cjs}/protocols/Aws_restJson1.js +0 -6
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/SageMakerRuntime.js +1 -2
- package/{dist/es → dist-es}/SageMakerRuntimeClient.js +1 -2
- package/{dist/es → dist-es}/commands/InvokeEndpointAsyncCommand.js +2 -3
- package/{dist/es → dist-es}/commands/InvokeEndpointCommand.js +2 -3
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -1
- package/{dist/es → dist-es}/protocols/Aws_restJson1.js +0 -1
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.js +1 -2
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
- package/{dist/types → dist-types}/SageMakerRuntime.d.ts +2 -2
- package/{dist/types → dist-types}/SageMakerRuntimeClient.d.ts +3 -3
- package/{dist/types → dist-types}/commands/InvokeEndpointAsyncCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/InvokeEndpointCommand.d.ts +3 -3
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/protocols/Aws_restJson1.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/dist-types/ts3.4/SageMakerRuntime.d.ts +15 -0
- package/dist-types/ts3.4/SageMakerRuntimeClient.d.ts +69 -0
- package/dist-types/ts3.4/commands/InvokeEndpointAsyncCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/InvokeEndpointCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +115 -0
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_restJson1.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +3 -7
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +45 -42
- package/SageMakerRuntime.ts +0 -116
- package/SageMakerRuntimeClient.ts +0 -240
- package/commands/InvokeEndpointAsyncCommand.ts +0 -110
- package/commands/InvokeEndpointCommand.ts +0 -113
- package/dist/cjs/SageMakerRuntime.js.map +0 -1
- package/dist/cjs/SageMakerRuntimeClient.js.map +0 -1
- package/dist/cjs/commands/InvokeEndpointAsyncCommand.js +0 -77
- package/dist/cjs/commands/InvokeEndpointAsyncCommand.js.map +0 -1
- package/dist/cjs/commands/InvokeEndpointCommand.js +0 -80
- package/dist/cjs/commands/InvokeEndpointCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -91
- package/dist/cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/SageMakerRuntime.js.map +0 -1
- package/dist/es/SageMakerRuntimeClient.js.map +0 -1
- package/dist/es/commands/InvokeEndpointAsyncCommand.js.map +0 -1
- package/dist/es/commands/InvokeEndpointCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -6
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -91
- package/dist/es/protocols/Aws_restJson1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/ts3.4/SageMakerRuntime.d.ts +0 -56
- package/dist/types/ts3.4/SageMakerRuntimeClient.d.ts +0 -134
- package/dist/types/ts3.4/commands/InvokeEndpointAsyncCommand.d.ts +0 -51
- package/dist/types/ts3.4/commands/InvokeEndpointCommand.d.ts +0 -54
- package/dist/types/ts3.4/models/models_0.d.ts +0 -253
- package/endpoints.ts +0 -82
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -311
- package/protocols/Aws_restJson1.ts +0 -418
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -31
- package/tsconfig.types.json +0 -8
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
InvokeEndpointAsyncCommandInput,
|
|
3
|
-
InvokeEndpointAsyncCommandOutput,
|
|
4
|
-
} from "./commands/InvokeEndpointAsyncCommand";
|
|
5
|
-
import { InvokeEndpointCommandInput, InvokeEndpointCommandOutput } from "./commands/InvokeEndpointCommand";
|
|
6
|
-
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
7
|
-
import {
|
|
8
|
-
EndpointsInputConfig,
|
|
9
|
-
EndpointsResolvedConfig,
|
|
10
|
-
RegionInputConfig,
|
|
11
|
-
RegionResolvedConfig,
|
|
12
|
-
resolveEndpointsConfig,
|
|
13
|
-
resolveRegionConfig,
|
|
14
|
-
} from "@aws-sdk/config-resolver";
|
|
15
|
-
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
16
|
-
import {
|
|
17
|
-
HostHeaderInputConfig,
|
|
18
|
-
HostHeaderResolvedConfig,
|
|
19
|
-
getHostHeaderPlugin,
|
|
20
|
-
resolveHostHeaderConfig,
|
|
21
|
-
} from "@aws-sdk/middleware-host-header";
|
|
22
|
-
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
23
|
-
import { RetryInputConfig, RetryResolvedConfig, getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
|
|
24
|
-
import {
|
|
25
|
-
AwsAuthInputConfig,
|
|
26
|
-
AwsAuthResolvedConfig,
|
|
27
|
-
getAwsAuthPlugin,
|
|
28
|
-
resolveAwsAuthConfig,
|
|
29
|
-
} from "@aws-sdk/middleware-signing";
|
|
30
|
-
import {
|
|
31
|
-
UserAgentInputConfig,
|
|
32
|
-
UserAgentResolvedConfig,
|
|
33
|
-
getUserAgentPlugin,
|
|
34
|
-
resolveUserAgentConfig,
|
|
35
|
-
} from "@aws-sdk/middleware-user-agent";
|
|
36
|
-
import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
|
|
37
|
-
import {
|
|
38
|
-
Client as __Client,
|
|
39
|
-
SmithyConfiguration as __SmithyConfiguration,
|
|
40
|
-
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
|
|
41
|
-
} from "@aws-sdk/smithy-client";
|
|
42
|
-
import {
|
|
43
|
-
Provider,
|
|
44
|
-
RegionInfoProvider,
|
|
45
|
-
Credentials as __Credentials,
|
|
46
|
-
Decoder as __Decoder,
|
|
47
|
-
Encoder as __Encoder,
|
|
48
|
-
Hash as __Hash,
|
|
49
|
-
HashConstructor as __HashConstructor,
|
|
50
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
51
|
-
Logger as __Logger,
|
|
52
|
-
Provider as __Provider,
|
|
53
|
-
StreamCollector as __StreamCollector,
|
|
54
|
-
UrlParser as __UrlParser,
|
|
55
|
-
UserAgent as __UserAgent,
|
|
56
|
-
} from "@aws-sdk/types";
|
|
57
|
-
|
|
58
|
-
export type ServiceInputTypes = InvokeEndpointAsyncCommandInput | InvokeEndpointCommandInput;
|
|
59
|
-
|
|
60
|
-
export type ServiceOutputTypes = InvokeEndpointAsyncCommandOutput | InvokeEndpointCommandOutput;
|
|
61
|
-
|
|
62
|
-
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
63
|
-
/**
|
|
64
|
-
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
65
|
-
*/
|
|
66
|
-
requestHandler?: __HttpHandler;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* A constructor for a class implementing the {@link __Hash} interface
|
|
70
|
-
* that computes the SHA-256 HMAC or checksum of a string or binary buffer.
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
|
-
sha256?: __HashConstructor;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The function that will be used to convert strings into HTTP endpoints.
|
|
77
|
-
* @internal
|
|
78
|
-
*/
|
|
79
|
-
urlParser?: __UrlParser;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* A function that can calculate the length of a request body.
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
bodyLengthChecker?: (body: any) => number | undefined;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* A function that converts a stream into an array of bytes.
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
streamCollector?: __StreamCollector;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The function that will be used to convert a base64-encoded string to a byte array.
|
|
95
|
-
* @internal
|
|
96
|
-
*/
|
|
97
|
-
base64Decoder?: __Decoder;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* The function that will be used to convert binary data to a base64-encoded string.
|
|
101
|
-
* @internal
|
|
102
|
-
*/
|
|
103
|
-
base64Encoder?: __Encoder;
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* The function that will be used to convert a UTF8-encoded string to a byte array.
|
|
107
|
-
* @internal
|
|
108
|
-
*/
|
|
109
|
-
utf8Decoder?: __Decoder;
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* The function that will be used to convert binary data to a UTF-8 encoded string.
|
|
113
|
-
* @internal
|
|
114
|
-
*/
|
|
115
|
-
utf8Encoder?: __Encoder;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* The runtime environment.
|
|
119
|
-
* @internal
|
|
120
|
-
*/
|
|
121
|
-
runtime?: string;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Disable dyanamically changing the endpoint of the client based on the hostPrefix
|
|
125
|
-
* trait of an operation.
|
|
126
|
-
*/
|
|
127
|
-
disableHostPrefix?: boolean;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Value for how many times a request will be made at most in case of retry.
|
|
131
|
-
*/
|
|
132
|
-
maxAttempts?: number | __Provider<number>;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Specifies which retry algorithm to use.
|
|
136
|
-
*/
|
|
137
|
-
retryMode?: string | __Provider<string>;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Optional logger for logging debug/info/warn/error.
|
|
141
|
-
*/
|
|
142
|
-
logger?: __Logger;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Unique service identifier.
|
|
146
|
-
* @internal
|
|
147
|
-
*/
|
|
148
|
-
serviceId?: string;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* The AWS region to which this client will send requests
|
|
152
|
-
*/
|
|
153
|
-
region?: string | __Provider<string>;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Default credentials provider; Not available in browser runtime.
|
|
157
|
-
* @internal
|
|
158
|
-
*/
|
|
159
|
-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Fetch related hostname, signing name or signing region with given region.
|
|
163
|
-
* @internal
|
|
164
|
-
*/
|
|
165
|
-
regionInfoProvider?: RegionInfoProvider;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
|
|
169
|
-
* @internal
|
|
170
|
-
*/
|
|
171
|
-
defaultUserAgentProvider?: Provider<__UserAgent>;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
type SageMakerRuntimeClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
|
|
175
|
-
ClientDefaults &
|
|
176
|
-
RegionInputConfig &
|
|
177
|
-
EndpointsInputConfig &
|
|
178
|
-
RetryInputConfig &
|
|
179
|
-
HostHeaderInputConfig &
|
|
180
|
-
AwsAuthInputConfig &
|
|
181
|
-
UserAgentInputConfig;
|
|
182
|
-
/**
|
|
183
|
-
* The configuration interface of SageMakerRuntimeClient class constructor that set the region, credentials and other options.
|
|
184
|
-
*/
|
|
185
|
-
export interface SageMakerRuntimeClientConfig extends SageMakerRuntimeClientConfigType {}
|
|
186
|
-
|
|
187
|
-
type SageMakerRuntimeClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
|
|
188
|
-
Required<ClientDefaults> &
|
|
189
|
-
RegionResolvedConfig &
|
|
190
|
-
EndpointsResolvedConfig &
|
|
191
|
-
RetryResolvedConfig &
|
|
192
|
-
HostHeaderResolvedConfig &
|
|
193
|
-
AwsAuthResolvedConfig &
|
|
194
|
-
UserAgentResolvedConfig;
|
|
195
|
-
/**
|
|
196
|
-
* The resolved configuration interface of SageMakerRuntimeClient class. This is resolved and normalized from the {@link SageMakerRuntimeClientConfig | constructor configuration interface}.
|
|
197
|
-
*/
|
|
198
|
-
export interface SageMakerRuntimeClientResolvedConfig extends SageMakerRuntimeClientResolvedConfigType {}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* <p> The Amazon SageMaker runtime API. </p>
|
|
202
|
-
*/
|
|
203
|
-
export class SageMakerRuntimeClient extends __Client<
|
|
204
|
-
__HttpHandlerOptions,
|
|
205
|
-
ServiceInputTypes,
|
|
206
|
-
ServiceOutputTypes,
|
|
207
|
-
SageMakerRuntimeClientResolvedConfig
|
|
208
|
-
> {
|
|
209
|
-
/**
|
|
210
|
-
* The resolved configuration of SageMakerRuntimeClient class. This is resolved and normalized from the {@link SageMakerRuntimeClientConfig | constructor configuration interface}.
|
|
211
|
-
*/
|
|
212
|
-
readonly config: SageMakerRuntimeClientResolvedConfig;
|
|
213
|
-
|
|
214
|
-
constructor(configuration: SageMakerRuntimeClientConfig) {
|
|
215
|
-
let _config_0 = __getRuntimeConfig(configuration);
|
|
216
|
-
let _config_1 = resolveRegionConfig(_config_0);
|
|
217
|
-
let _config_2 = resolveEndpointsConfig(_config_1);
|
|
218
|
-
let _config_3 = resolveRetryConfig(_config_2);
|
|
219
|
-
let _config_4 = resolveHostHeaderConfig(_config_3);
|
|
220
|
-
let _config_5 = resolveAwsAuthConfig(_config_4);
|
|
221
|
-
let _config_6 = resolveUserAgentConfig(_config_5);
|
|
222
|
-
super(_config_6);
|
|
223
|
-
this.config = _config_6;
|
|
224
|
-
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
225
|
-
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
226
|
-
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
227
|
-
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
228
|
-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
229
|
-
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
234
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
235
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
236
|
-
*/
|
|
237
|
-
destroy(): void {
|
|
238
|
-
super.destroy();
|
|
239
|
-
}
|
|
240
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { SageMakerRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerRuntimeClient";
|
|
2
|
-
import { InvokeEndpointAsyncInput, InvokeEndpointAsyncOutput } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_restJson1InvokeEndpointAsyncCommand,
|
|
5
|
-
serializeAws_restJson1InvokeEndpointAsyncCommand,
|
|
6
|
-
} from "../protocols/Aws_restJson1";
|
|
7
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
8
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
9
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
FinalizeHandlerArguments,
|
|
12
|
-
Handler,
|
|
13
|
-
HandlerExecutionContext,
|
|
14
|
-
MiddlewareStack,
|
|
15
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
16
|
-
MetadataBearer as __MetadataBearer,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
} from "@aws-sdk/types";
|
|
19
|
-
|
|
20
|
-
export interface InvokeEndpointAsyncCommandInput extends InvokeEndpointAsyncInput {}
|
|
21
|
-
export interface InvokeEndpointAsyncCommandOutput extends InvokeEndpointAsyncOutput, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>After you deploy a model into production using Amazon SageMaker hosting services,
|
|
25
|
-
* your client applications use this API to get inferences from the model hosted at
|
|
26
|
-
* the specified endpoint in an asynchronous manner.</p>
|
|
27
|
-
*
|
|
28
|
-
* <p>Inference requests sent to this API are enqueued for asynchronous processing.
|
|
29
|
-
* The processing of the inference request may or may not complete before the
|
|
30
|
-
* you receive a response from this API. The response from this API will
|
|
31
|
-
* not contain the result of the inference request but contain information
|
|
32
|
-
* about where you can locate it.</p>
|
|
33
|
-
*
|
|
34
|
-
* <p>Amazon SageMaker strips all <code>POST</code> headers except those supported by the API.
|
|
35
|
-
* Amazon SageMaker might add additional headers. You should not rely on the behavior
|
|
36
|
-
* of headers outside those enumerated in the request syntax.</p>
|
|
37
|
-
*
|
|
38
|
-
* <p>Calls to <code>InvokeEndpointAsync</code> are authenticated by using AWS Signature
|
|
39
|
-
* Version 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (AWS Signature Version 4)</a> in the <i>Amazon S3 API
|
|
40
|
-
* Reference</i>.</p>
|
|
41
|
-
* @example
|
|
42
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
43
|
-
* ```javascript
|
|
44
|
-
* import { SageMakerRuntimeClient, InvokeEndpointAsyncCommand } from "@aws-sdk/client-sagemaker-runtime"; // ES Modules import
|
|
45
|
-
* // const { SageMakerRuntimeClient, InvokeEndpointAsyncCommand } = require("@aws-sdk/client-sagemaker-runtime"); // CommonJS import
|
|
46
|
-
* const client = new SageMakerRuntimeClient(config);
|
|
47
|
-
* const command = new InvokeEndpointAsyncCommand(input);
|
|
48
|
-
* const response = await client.send(command);
|
|
49
|
-
* ```
|
|
50
|
-
*
|
|
51
|
-
* @see {@link InvokeEndpointAsyncCommandInput} for command's `input` shape.
|
|
52
|
-
* @see {@link InvokeEndpointAsyncCommandOutput} for command's `response` shape.
|
|
53
|
-
* @see {@link SageMakerRuntimeClientResolvedConfig | config} for command's `input` shape.
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
export class InvokeEndpointAsyncCommand extends $Command<
|
|
57
|
-
InvokeEndpointAsyncCommandInput,
|
|
58
|
-
InvokeEndpointAsyncCommandOutput,
|
|
59
|
-
SageMakerRuntimeClientResolvedConfig
|
|
60
|
-
> {
|
|
61
|
-
// Start section: command_properties
|
|
62
|
-
// End section: command_properties
|
|
63
|
-
|
|
64
|
-
constructor(readonly input: InvokeEndpointAsyncCommandInput) {
|
|
65
|
-
// Start section: command_constructor
|
|
66
|
-
super();
|
|
67
|
-
// End section: command_constructor
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
|
-
resolveMiddleware(
|
|
74
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
75
|
-
configuration: SageMakerRuntimeClientResolvedConfig,
|
|
76
|
-
options?: __HttpHandlerOptions
|
|
77
|
-
): Handler<InvokeEndpointAsyncCommandInput, InvokeEndpointAsyncCommandOutput> {
|
|
78
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
79
|
-
|
|
80
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
81
|
-
|
|
82
|
-
const { logger } = configuration;
|
|
83
|
-
const clientName = "SageMakerRuntimeClient";
|
|
84
|
-
const commandName = "InvokeEndpointAsyncCommand";
|
|
85
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
86
|
-
logger,
|
|
87
|
-
clientName,
|
|
88
|
-
commandName,
|
|
89
|
-
inputFilterSensitiveLog: InvokeEndpointAsyncInput.filterSensitiveLog,
|
|
90
|
-
outputFilterSensitiveLog: InvokeEndpointAsyncOutput.filterSensitiveLog,
|
|
91
|
-
};
|
|
92
|
-
const { requestHandler } = configuration;
|
|
93
|
-
return stack.resolve(
|
|
94
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
95
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
96
|
-
handlerExecutionContext
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
private serialize(input: InvokeEndpointAsyncCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
101
|
-
return serializeAws_restJson1InvokeEndpointAsyncCommand(input, context);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<InvokeEndpointAsyncCommandOutput> {
|
|
105
|
-
return deserializeAws_restJson1InvokeEndpointAsyncCommand(output, context);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Start section: command_body_extra
|
|
109
|
-
// End section: command_body_extra
|
|
110
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { SageMakerRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerRuntimeClient";
|
|
2
|
-
import { InvokeEndpointInput, InvokeEndpointOutput } from "../models/models_0";
|
|
3
|
-
import {
|
|
4
|
-
deserializeAws_restJson1InvokeEndpointCommand,
|
|
5
|
-
serializeAws_restJson1InvokeEndpointCommand,
|
|
6
|
-
} from "../protocols/Aws_restJson1";
|
|
7
|
-
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
8
|
-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
|
|
9
|
-
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
10
|
-
import {
|
|
11
|
-
FinalizeHandlerArguments,
|
|
12
|
-
Handler,
|
|
13
|
-
HandlerExecutionContext,
|
|
14
|
-
MiddlewareStack,
|
|
15
|
-
HttpHandlerOptions as __HttpHandlerOptions,
|
|
16
|
-
MetadataBearer as __MetadataBearer,
|
|
17
|
-
SerdeContext as __SerdeContext,
|
|
18
|
-
} from "@aws-sdk/types";
|
|
19
|
-
|
|
20
|
-
export interface InvokeEndpointCommandInput extends InvokeEndpointInput {}
|
|
21
|
-
export interface InvokeEndpointCommandOutput extends InvokeEndpointOutput, __MetadataBearer {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* <p>After you deploy a model into production using Amazon SageMaker hosting services, your
|
|
25
|
-
* client applications use this API to get inferences from the model hosted at the
|
|
26
|
-
* specified endpoint. </p>
|
|
27
|
-
* <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>
|
|
28
|
-
* <p>Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add
|
|
29
|
-
* additional headers. You should not rely on the behavior of headers outside those
|
|
30
|
-
* enumerated in the request syntax. </p>
|
|
31
|
-
* <p>Calls to <code>InvokeEndpoint</code> are authenticated by using AWS Signature Version
|
|
32
|
-
* 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating
|
|
33
|
-
* Requests (AWS Signature Version 4)</a> in the <i>Amazon S3 API
|
|
34
|
-
* Reference</i>.</p>
|
|
35
|
-
* <p>A customer's model containers must respond to requests within 60 seconds. The model
|
|
36
|
-
* itself can have a maximum processing time of 60 seconds before responding to
|
|
37
|
-
* invocations. If your model is going to take 50-60 seconds of processing time, the SDK
|
|
38
|
-
* socket timeout should be set to be 70 seconds.</p>
|
|
39
|
-
* <note>
|
|
40
|
-
* <p>Endpoints are scoped to an individual account, and are not public. The URL does
|
|
41
|
-
* not contain the account ID, but Amazon SageMaker determines the account ID from the
|
|
42
|
-
* authentication token that is supplied by the caller.</p>
|
|
43
|
-
* </note>
|
|
44
|
-
* @example
|
|
45
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
46
|
-
* ```javascript
|
|
47
|
-
* import { SageMakerRuntimeClient, InvokeEndpointCommand } from "@aws-sdk/client-sagemaker-runtime"; // ES Modules import
|
|
48
|
-
* // const { SageMakerRuntimeClient, InvokeEndpointCommand } = require("@aws-sdk/client-sagemaker-runtime"); // CommonJS import
|
|
49
|
-
* const client = new SageMakerRuntimeClient(config);
|
|
50
|
-
* const command = new InvokeEndpointCommand(input);
|
|
51
|
-
* const response = await client.send(command);
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* @see {@link InvokeEndpointCommandInput} for command's `input` shape.
|
|
55
|
-
* @see {@link InvokeEndpointCommandOutput} for command's `response` shape.
|
|
56
|
-
* @see {@link SageMakerRuntimeClientResolvedConfig | config} for command's `input` shape.
|
|
57
|
-
*
|
|
58
|
-
*/
|
|
59
|
-
export class InvokeEndpointCommand extends $Command<
|
|
60
|
-
InvokeEndpointCommandInput,
|
|
61
|
-
InvokeEndpointCommandOutput,
|
|
62
|
-
SageMakerRuntimeClientResolvedConfig
|
|
63
|
-
> {
|
|
64
|
-
// Start section: command_properties
|
|
65
|
-
// End section: command_properties
|
|
66
|
-
|
|
67
|
-
constructor(readonly input: InvokeEndpointCommandInput) {
|
|
68
|
-
// Start section: command_constructor
|
|
69
|
-
super();
|
|
70
|
-
// End section: command_constructor
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* @internal
|
|
75
|
-
*/
|
|
76
|
-
resolveMiddleware(
|
|
77
|
-
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
|
|
78
|
-
configuration: SageMakerRuntimeClientResolvedConfig,
|
|
79
|
-
options?: __HttpHandlerOptions
|
|
80
|
-
): Handler<InvokeEndpointCommandInput, InvokeEndpointCommandOutput> {
|
|
81
|
-
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
82
|
-
|
|
83
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
84
|
-
|
|
85
|
-
const { logger } = configuration;
|
|
86
|
-
const clientName = "SageMakerRuntimeClient";
|
|
87
|
-
const commandName = "InvokeEndpointCommand";
|
|
88
|
-
const handlerExecutionContext: HandlerExecutionContext = {
|
|
89
|
-
logger,
|
|
90
|
-
clientName,
|
|
91
|
-
commandName,
|
|
92
|
-
inputFilterSensitiveLog: InvokeEndpointInput.filterSensitiveLog,
|
|
93
|
-
outputFilterSensitiveLog: InvokeEndpointOutput.filterSensitiveLog,
|
|
94
|
-
};
|
|
95
|
-
const { requestHandler } = configuration;
|
|
96
|
-
return stack.resolve(
|
|
97
|
-
(request: FinalizeHandlerArguments<any>) =>
|
|
98
|
-
requestHandler.handle(request.request as __HttpRequest, options || {}),
|
|
99
|
-
handlerExecutionContext
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
private serialize(input: InvokeEndpointCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
|
|
104
|
-
return serializeAws_restJson1InvokeEndpointCommand(input, context);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<InvokeEndpointCommandOutput> {
|
|
108
|
-
return deserializeAws_restJson1InvokeEndpointCommand(output, context);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Start section: command_body_extra
|
|
112
|
-
// End section: command_body_extra
|
|
113
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SageMakerRuntime.js","sourceRoot":"","sources":["../../SageMakerRuntime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qCAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,0CAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACH,OAAO;QACL,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF;AArCD,wDAqCC"}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InvokeEndpointAsyncCommand = void 0;
|
|
4
|
-
const models_0_1 = require("../models/models_0");
|
|
5
|
-
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
6
|
-
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
7
|
-
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
|
-
/**
|
|
9
|
-
* <p>After you deploy a model into production using Amazon SageMaker hosting services,
|
|
10
|
-
* your client applications use this API to get inferences from the model hosted at
|
|
11
|
-
* the specified endpoint in an asynchronous manner.</p>
|
|
12
|
-
*
|
|
13
|
-
* <p>Inference requests sent to this API are enqueued for asynchronous processing.
|
|
14
|
-
* The processing of the inference request may or may not complete before the
|
|
15
|
-
* you receive a response from this API. The response from this API will
|
|
16
|
-
* not contain the result of the inference request but contain information
|
|
17
|
-
* about where you can locate it.</p>
|
|
18
|
-
*
|
|
19
|
-
* <p>Amazon SageMaker strips all <code>POST</code> headers except those supported by the API.
|
|
20
|
-
* Amazon SageMaker might add additional headers. You should not rely on the behavior
|
|
21
|
-
* of headers outside those enumerated in the request syntax.</p>
|
|
22
|
-
*
|
|
23
|
-
* <p>Calls to <code>InvokeEndpointAsync</code> are authenticated by using AWS Signature
|
|
24
|
-
* Version 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating Requests (AWS Signature Version 4)</a> in the <i>Amazon S3 API
|
|
25
|
-
* Reference</i>.</p>
|
|
26
|
-
* @example
|
|
27
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
28
|
-
* ```javascript
|
|
29
|
-
* import { SageMakerRuntimeClient, InvokeEndpointAsyncCommand } from "@aws-sdk/client-sagemaker-runtime"; // ES Modules import
|
|
30
|
-
* // const { SageMakerRuntimeClient, InvokeEndpointAsyncCommand } = require("@aws-sdk/client-sagemaker-runtime"); // CommonJS import
|
|
31
|
-
* const client = new SageMakerRuntimeClient(config);
|
|
32
|
-
* const command = new InvokeEndpointAsyncCommand(input);
|
|
33
|
-
* const response = await client.send(command);
|
|
34
|
-
* ```
|
|
35
|
-
*
|
|
36
|
-
* @see {@link InvokeEndpointAsyncCommandInput} for command's `input` shape.
|
|
37
|
-
* @see {@link InvokeEndpointAsyncCommandOutput} for command's `response` shape.
|
|
38
|
-
* @see {@link SageMakerRuntimeClientResolvedConfig | config} for command's `input` shape.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
class InvokeEndpointAsyncCommand extends smithy_client_1.Command {
|
|
42
|
-
// Start section: command_properties
|
|
43
|
-
// End section: command_properties
|
|
44
|
-
constructor(input) {
|
|
45
|
-
// Start section: command_constructor
|
|
46
|
-
super();
|
|
47
|
-
this.input = input;
|
|
48
|
-
// End section: command_constructor
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
|
-
resolveMiddleware(clientStack, configuration, options) {
|
|
54
|
-
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
55
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
56
|
-
const { logger } = configuration;
|
|
57
|
-
const clientName = "SageMakerRuntimeClient";
|
|
58
|
-
const commandName = "InvokeEndpointAsyncCommand";
|
|
59
|
-
const handlerExecutionContext = {
|
|
60
|
-
logger,
|
|
61
|
-
clientName,
|
|
62
|
-
commandName,
|
|
63
|
-
inputFilterSensitiveLog: models_0_1.InvokeEndpointAsyncInput.filterSensitiveLog,
|
|
64
|
-
outputFilterSensitiveLog: models_0_1.InvokeEndpointAsyncOutput.filterSensitiveLog,
|
|
65
|
-
};
|
|
66
|
-
const { requestHandler } = configuration;
|
|
67
|
-
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
68
|
-
}
|
|
69
|
-
serialize(input, context) {
|
|
70
|
-
return Aws_restJson1_1.serializeAws_restJson1InvokeEndpointAsyncCommand(input, context);
|
|
71
|
-
}
|
|
72
|
-
deserialize(output, context) {
|
|
73
|
-
return Aws_restJson1_1.deserializeAws_restJson1InvokeEndpointAsyncCommand(output, context);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.InvokeEndpointAsyncCommand = InvokeEndpointAsyncCommand;
|
|
77
|
-
//# sourceMappingURL=InvokeEndpointAsyncCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InvokeEndpointAsyncCommand.js","sourceRoot":"","sources":["../../../commands/InvokeEndpointAsyncCommand.ts"],"names":[],"mappings":";;;AACA,iDAAyF;AACzF,8DAGoC;AACpC,gEAA2D;AAE3D,0DAA6D;AAc7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAa,0BAA2B,SAAQ,uBAI/C;IACC,oCAAoC;IACpC,kCAAkC;IAElC,YAAqB,KAAsC;QACzD,qCAAqC;QACrC,KAAK,EAAE,CAAC;QAFW,UAAK,GAAL,KAAK,CAAiC;QAGzD,mCAAmC;IACrC,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,WAAmE,EACnE,aAAmD,EACnD,OAA8B;QAE9B,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,iCAAc,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAE1F,MAAM,KAAK,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAEvD,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,CAAC;QACjC,MAAM,UAAU,GAAG,wBAAwB,CAAC;QAC5C,MAAM,WAAW,GAAG,4BAA4B,CAAC;QACjD,MAAM,uBAAuB,GAA4B;YACvD,MAAM;YACN,UAAU;YACV,WAAW;YACX,uBAAuB,EAAE,mCAAwB,CAAC,kBAAkB;YACpE,wBAAwB,EAAE,oCAAyB,CAAC,kBAAkB;SACvE,CAAC;QACF,MAAM,EAAE,cAAc,EAAE,GAAG,aAAa,CAAC;QACzC,OAAO,KAAK,CAAC,OAAO,CAClB,CAAC,OAAsC,EAAE,EAAE,CACzC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,OAAwB,EAAE,OAAO,IAAI,EAAE,CAAC,EACxE,uBAAuB,CACxB,CAAC;IACJ,CAAC;IAEO,SAAS,CAAC,KAAsC,EAAE,OAAuB;QAC/E,OAAO,gEAAgD,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAEO,WAAW,CAAC,MAAsB,EAAE,OAAuB;QACjE,OAAO,kEAAkD,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CAIF;AAtDD,gEAsDC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InvokeEndpointCommand = void 0;
|
|
4
|
-
const models_0_1 = require("../models/models_0");
|
|
5
|
-
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
6
|
-
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
7
|
-
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
|
-
/**
|
|
9
|
-
* <p>After you deploy a model into production using Amazon SageMaker hosting services, your
|
|
10
|
-
* client applications use this API to get inferences from the model hosted at the
|
|
11
|
-
* specified endpoint. </p>
|
|
12
|
-
* <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>
|
|
13
|
-
* <p>Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add
|
|
14
|
-
* additional headers. You should not rely on the behavior of headers outside those
|
|
15
|
-
* enumerated in the request syntax. </p>
|
|
16
|
-
* <p>Calls to <code>InvokeEndpoint</code> are authenticated by using AWS Signature Version
|
|
17
|
-
* 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating
|
|
18
|
-
* Requests (AWS Signature Version 4)</a> in the <i>Amazon S3 API
|
|
19
|
-
* Reference</i>.</p>
|
|
20
|
-
* <p>A customer's model containers must respond to requests within 60 seconds. The model
|
|
21
|
-
* itself can have a maximum processing time of 60 seconds before responding to
|
|
22
|
-
* invocations. If your model is going to take 50-60 seconds of processing time, the SDK
|
|
23
|
-
* socket timeout should be set to be 70 seconds.</p>
|
|
24
|
-
* <note>
|
|
25
|
-
* <p>Endpoints are scoped to an individual account, and are not public. The URL does
|
|
26
|
-
* not contain the account ID, but Amazon SageMaker determines the account ID from the
|
|
27
|
-
* authentication token that is supplied by the caller.</p>
|
|
28
|
-
* </note>
|
|
29
|
-
* @example
|
|
30
|
-
* Use a bare-bones client and the command you need to make an API call.
|
|
31
|
-
* ```javascript
|
|
32
|
-
* import { SageMakerRuntimeClient, InvokeEndpointCommand } from "@aws-sdk/client-sagemaker-runtime"; // ES Modules import
|
|
33
|
-
* // const { SageMakerRuntimeClient, InvokeEndpointCommand } = require("@aws-sdk/client-sagemaker-runtime"); // CommonJS import
|
|
34
|
-
* const client = new SageMakerRuntimeClient(config);
|
|
35
|
-
* const command = new InvokeEndpointCommand(input);
|
|
36
|
-
* const response = await client.send(command);
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @see {@link InvokeEndpointCommandInput} for command's `input` shape.
|
|
40
|
-
* @see {@link InvokeEndpointCommandOutput} for command's `response` shape.
|
|
41
|
-
* @see {@link SageMakerRuntimeClientResolvedConfig | config} for command's `input` shape.
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
class InvokeEndpointCommand extends smithy_client_1.Command {
|
|
45
|
-
// Start section: command_properties
|
|
46
|
-
// End section: command_properties
|
|
47
|
-
constructor(input) {
|
|
48
|
-
// Start section: command_constructor
|
|
49
|
-
super();
|
|
50
|
-
this.input = input;
|
|
51
|
-
// End section: command_constructor
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* @internal
|
|
55
|
-
*/
|
|
56
|
-
resolveMiddleware(clientStack, configuration, options) {
|
|
57
|
-
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
58
|
-
const stack = clientStack.concat(this.middlewareStack);
|
|
59
|
-
const { logger } = configuration;
|
|
60
|
-
const clientName = "SageMakerRuntimeClient";
|
|
61
|
-
const commandName = "InvokeEndpointCommand";
|
|
62
|
-
const handlerExecutionContext = {
|
|
63
|
-
logger,
|
|
64
|
-
clientName,
|
|
65
|
-
commandName,
|
|
66
|
-
inputFilterSensitiveLog: models_0_1.InvokeEndpointInput.filterSensitiveLog,
|
|
67
|
-
outputFilterSensitiveLog: models_0_1.InvokeEndpointOutput.filterSensitiveLog,
|
|
68
|
-
};
|
|
69
|
-
const { requestHandler } = configuration;
|
|
70
|
-
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
71
|
-
}
|
|
72
|
-
serialize(input, context) {
|
|
73
|
-
return Aws_restJson1_1.serializeAws_restJson1InvokeEndpointCommand(input, context);
|
|
74
|
-
}
|
|
75
|
-
deserialize(output, context) {
|
|
76
|
-
return Aws_restJson1_1.deserializeAws_restJson1InvokeEndpointCommand(output, context);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.InvokeEndpointCommand = InvokeEndpointCommand;
|
|
80
|
-
//# sourceMappingURL=InvokeEndpointCommand.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"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ACD,SAAS,EAAE;QACT,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,QAAQ,EAAE,uCAAuC;KAClD;IACD,WAAW,EAAE;QACX,OAAO,EAAE,CAAC,gBAAgB,CAAC;QAC3B,QAAQ,EAAE,0CAA0C;KACrD;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,EAAE,oBAAoB,CAAC;QACjE,QAAQ,EAAE,0CAA0C;KACrD;CACF,CAAC;AAEK,MAAM,yBAAyB,GAAuB,KAAK,EAAE,MAAc,EAAE,OAAa,EAAE,EAAE,CACnG,+BAAa,CAAC,MAAM,EAAE;IACpB,GAAG,OAAO;IACV,cAAc,EAAE,WAAW;IAC3B,UAAU;IACV,aAAa;CACd,CAAC,CAAC;AANQ,QAAA,yBAAyB,6BAMjC"}
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;AAAA,mEAAyC;AACzC,6DAAmC;AACnC,2EAAiD;AACjD,gFAAsD;AACtD,yDAA+B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models_0.js","sourceRoot":"","sources":["../../../models/models_0.ts"],"names":[],"mappings":";;;AAAA,0DAA0D;AAY1D,IAAiB,eAAe,CAO/B;AAPD,WAAiB,eAAe;IAC9B;;OAEG;IACU,kCAAkB,GAAG,CAAC,GAAoB,EAAO,EAAE,CAAC,CAAC;QAChE,GAAG,GAAG;KACP,CAAC,CAAC;AACL,CAAC,EAPgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAO/B;AA4ED,IAAiB,mBAAmB,CASnC;AATD,WAAiB,mBAAmB;IAClC;;OAEG;IACU,sCAAkB,GAAG,CAA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