@aws-sdk/client-sagemaker-runtime 3.35.0 → 3.38.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.
Files changed (86) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/SageMakerRuntime.js +0 -4
  3. package/dist-cjs/SageMakerRuntimeClient.js +0 -9
  4. package/dist-cjs/commands/InvokeEndpointAsyncCommand.js +0 -41
  5. package/dist-cjs/commands/InvokeEndpointCommand.js +0 -44
  6. package/dist-cjs/commands/index.js +5 -0
  7. package/dist-cjs/endpoints.js +1 -2
  8. package/dist-cjs/index.js +3 -5
  9. package/dist-cjs/models/index.js +0 -1
  10. package/dist-cjs/models/models_0.js +0 -25
  11. package/dist-cjs/protocols/Aws_restJson1.js +0 -6
  12. package/dist-cjs/runtimeConfig.browser.js +1 -6
  13. package/dist-cjs/runtimeConfig.js +2 -7
  14. package/dist-cjs/runtimeConfig.native.js +0 -4
  15. package/dist-cjs/runtimeConfig.shared.js +0 -4
  16. package/dist-es/SageMakerRuntime.js +0 -1
  17. package/dist-es/SageMakerRuntimeClient.js +0 -1
  18. package/dist-es/commands/InvokeEndpointAsyncCommand.js +0 -1
  19. package/dist-es/commands/InvokeEndpointCommand.js +0 -1
  20. package/dist-es/commands/index.js +2 -0
  21. package/dist-es/endpoints.js +1 -2
  22. package/dist-es/index.js +3 -5
  23. package/dist-es/models/index.js +0 -1
  24. package/dist-es/models/models_0.js +0 -1
  25. package/dist-es/protocols/Aws_restJson1.js +0 -1
  26. package/dist-es/runtimeConfig.browser.js +1 -2
  27. package/dist-es/runtimeConfig.js +2 -3
  28. package/dist-es/runtimeConfig.native.js +0 -1
  29. package/dist-es/runtimeConfig.shared.js +0 -1
  30. package/dist-types/commands/index.d.ts +2 -0
  31. package/dist-types/index.d.ts +3 -4
  32. package/dist-types/ts3.4/SageMakerRuntime.d.ts +3 -44
  33. package/dist-types/ts3.4/SageMakerRuntimeClient.d.ts +24 -89
  34. package/dist-types/ts3.4/commands/InvokeEndpointAsyncCommand.d.ts +2 -36
  35. package/dist-types/ts3.4/commands/InvokeEndpointCommand.d.ts +2 -39
  36. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  37. package/dist-types/ts3.4/index.d.ts +3 -4
  38. package/dist-types/ts3.4/models/models_0.d.ts +37 -175
  39. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  40. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  41. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  42. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  43. package/package.json +33 -30
  44. package/dist-cjs/SageMakerRuntime.js.map +0 -1
  45. package/dist-cjs/SageMakerRuntimeClient.js.map +0 -1
  46. package/dist-cjs/commands/InvokeEndpointAsyncCommand.js.map +0 -1
  47. package/dist-cjs/commands/InvokeEndpointCommand.js.map +0 -1
  48. package/dist-cjs/endpoints.js.map +0 -1
  49. package/dist-cjs/index.js.map +0 -1
  50. package/dist-cjs/models/index.js.map +0 -1
  51. package/dist-cjs/models/models_0.js.map +0 -1
  52. package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
  53. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  54. package/dist-cjs/runtimeConfig.js.map +0 -1
  55. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  56. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  57. package/dist-es/SageMakerRuntime.js.map +0 -1
  58. package/dist-es/SageMakerRuntimeClient.js.map +0 -1
  59. package/dist-es/commands/InvokeEndpointAsyncCommand.js.map +0 -1
  60. package/dist-es/commands/InvokeEndpointCommand.js.map +0 -1
  61. package/dist-es/endpoints.js.map +0 -1
  62. package/dist-es/index.js.map +0 -1
  63. package/dist-es/models/index.js.map +0 -1
  64. package/dist-es/models/models_0.js.map +0 -1
  65. package/dist-es/protocols/Aws_restJson1.js.map +0 -1
  66. package/dist-es/runtimeConfig.browser.js.map +0 -1
  67. package/dist-es/runtimeConfig.js.map +0 -1
  68. package/dist-es/runtimeConfig.native.js.map +0 -1
  69. package/dist-es/runtimeConfig.shared.js.map +0 -1
  70. package/jest.config.js +0 -4
  71. package/src/SageMakerRuntime.ts +0 -117
  72. package/src/SageMakerRuntimeClient.ts +0 -241
  73. package/src/commands/InvokeEndpointAsyncCommand.ts +0 -111
  74. package/src/commands/InvokeEndpointCommand.ts +0 -114
  75. package/src/endpoints.ts +0 -82
  76. package/src/index.ts +0 -5
  77. package/src/models/index.ts +0 -1
  78. package/src/models/models_0.ts +0 -311
  79. package/src/protocols/Aws_restJson1.ts +0 -419
  80. package/src/runtimeConfig.browser.ts +0 -41
  81. package/src/runtimeConfig.native.ts +0 -17
  82. package/src/runtimeConfig.shared.ts +0 -17
  83. package/src/runtimeConfig.ts +0 -46
  84. package/tsconfig.es.json +0 -10
  85. package/tsconfig.json +0 -33
  86. package/tsconfig.types.json +0 -9
@@ -1,241 +0,0 @@
1
- import {
2
- EndpointsInputConfig,
3
- EndpointsResolvedConfig,
4
- RegionInputConfig,
5
- RegionResolvedConfig,
6
- resolveEndpointsConfig,
7
- resolveRegionConfig,
8
- } from "@aws-sdk/config-resolver";
9
- import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
10
- import {
11
- getHostHeaderPlugin,
12
- HostHeaderInputConfig,
13
- HostHeaderResolvedConfig,
14
- resolveHostHeaderConfig,
15
- } from "@aws-sdk/middleware-host-header";
16
- import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
17
- import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry";
18
- import {
19
- AwsAuthInputConfig,
20
- AwsAuthResolvedConfig,
21
- getAwsAuthPlugin,
22
- resolveAwsAuthConfig,
23
- } from "@aws-sdk/middleware-signing";
24
- import {
25
- getUserAgentPlugin,
26
- resolveUserAgentConfig,
27
- UserAgentInputConfig,
28
- UserAgentResolvedConfig,
29
- } from "@aws-sdk/middleware-user-agent";
30
- import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
31
- import {
32
- Client as __Client,
33
- SmithyConfiguration as __SmithyConfiguration,
34
- SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
35
- } from "@aws-sdk/smithy-client";
36
- import {
37
- Credentials as __Credentials,
38
- Decoder as __Decoder,
39
- Encoder as __Encoder,
40
- Hash as __Hash,
41
- HashConstructor as __HashConstructor,
42
- HttpHandlerOptions as __HttpHandlerOptions,
43
- Logger as __Logger,
44
- Provider as __Provider,
45
- Provider,
46
- RegionInfoProvider,
47
- StreamCollector as __StreamCollector,
48
- UrlParser as __UrlParser,
49
- UserAgent as __UserAgent,
50
- } from "@aws-sdk/types";
51
-
52
- import {
53
- InvokeEndpointAsyncCommandInput,
54
- InvokeEndpointAsyncCommandOutput,
55
- } from "./commands/InvokeEndpointAsyncCommand";
56
- import { InvokeEndpointCommandInput, InvokeEndpointCommandOutput } from "./commands/InvokeEndpointCommand";
57
- import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
58
-
59
- export type ServiceInputTypes = InvokeEndpointAsyncCommandInput | InvokeEndpointCommandInput;
60
-
61
- export type ServiceOutputTypes = InvokeEndpointAsyncCommandOutput | InvokeEndpointCommandOutput;
62
-
63
- export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
64
- /**
65
- * The HTTP handler to use. Fetch in browser and Https in Nodejs.
66
- */
67
- requestHandler?: __HttpHandler;
68
-
69
- /**
70
- * A constructor for a class implementing the {@link __Hash} interface
71
- * that computes the SHA-256 HMAC or checksum of a string or binary buffer.
72
- * @internal
73
- */
74
- sha256?: __HashConstructor;
75
-
76
- /**
77
- * The function that will be used to convert strings into HTTP endpoints.
78
- * @internal
79
- */
80
- urlParser?: __UrlParser;
81
-
82
- /**
83
- * A function that can calculate the length of a request body.
84
- * @internal
85
- */
86
- bodyLengthChecker?: (body: any) => number | undefined;
87
-
88
- /**
89
- * A function that converts a stream into an array of bytes.
90
- * @internal
91
- */
92
- streamCollector?: __StreamCollector;
93
-
94
- /**
95
- * The function that will be used to convert a base64-encoded string to a byte array.
96
- * @internal
97
- */
98
- base64Decoder?: __Decoder;
99
-
100
- /**
101
- * The function that will be used to convert binary data to a base64-encoded string.
102
- * @internal
103
- */
104
- base64Encoder?: __Encoder;
105
-
106
- /**
107
- * The function that will be used to convert a UTF8-encoded string to a byte array.
108
- * @internal
109
- */
110
- utf8Decoder?: __Decoder;
111
-
112
- /**
113
- * The function that will be used to convert binary data to a UTF-8 encoded string.
114
- * @internal
115
- */
116
- utf8Encoder?: __Encoder;
117
-
118
- /**
119
- * The runtime environment.
120
- * @internal
121
- */
122
- runtime?: string;
123
-
124
- /**
125
- * Disable dyanamically changing the endpoint of the client based on the hostPrefix
126
- * trait of an operation.
127
- */
128
- disableHostPrefix?: boolean;
129
-
130
- /**
131
- * Value for how many times a request will be made at most in case of retry.
132
- */
133
- maxAttempts?: number | __Provider<number>;
134
-
135
- /**
136
- * Specifies which retry algorithm to use.
137
- */
138
- retryMode?: string | __Provider<string>;
139
-
140
- /**
141
- * Optional logger for logging debug/info/warn/error.
142
- */
143
- logger?: __Logger;
144
-
145
- /**
146
- * Unique service identifier.
147
- * @internal
148
- */
149
- serviceId?: string;
150
-
151
- /**
152
- * The AWS region to which this client will send requests
153
- */
154
- region?: string | __Provider<string>;
155
-
156
- /**
157
- * Default credentials provider; Not available in browser runtime.
158
- * @internal
159
- */
160
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
161
-
162
- /**
163
- * Fetch related hostname, signing name or signing region with given region.
164
- * @internal
165
- */
166
- regionInfoProvider?: RegionInfoProvider;
167
-
168
- /**
169
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
170
- * @internal
171
- */
172
- defaultUserAgentProvider?: Provider<__UserAgent>;
173
- }
174
-
175
- type SageMakerRuntimeClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> &
176
- ClientDefaults &
177
- RegionInputConfig &
178
- EndpointsInputConfig &
179
- RetryInputConfig &
180
- HostHeaderInputConfig &
181
- AwsAuthInputConfig &
182
- UserAgentInputConfig;
183
- /**
184
- * The configuration interface of SageMakerRuntimeClient class constructor that set the region, credentials and other options.
185
- */
186
- export interface SageMakerRuntimeClientConfig extends SageMakerRuntimeClientConfigType {}
187
-
188
- type SageMakerRuntimeClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
189
- Required<ClientDefaults> &
190
- RegionResolvedConfig &
191
- EndpointsResolvedConfig &
192
- RetryResolvedConfig &
193
- HostHeaderResolvedConfig &
194
- AwsAuthResolvedConfig &
195
- UserAgentResolvedConfig;
196
- /**
197
- * The resolved configuration interface of SageMakerRuntimeClient class. This is resolved and normalized from the {@link SageMakerRuntimeClientConfig | constructor configuration interface}.
198
- */
199
- export interface SageMakerRuntimeClientResolvedConfig extends SageMakerRuntimeClientResolvedConfigType {}
200
-
201
- /**
202
- * <p> The Amazon SageMaker runtime API. </p>
203
- */
204
- export class SageMakerRuntimeClient extends __Client<
205
- __HttpHandlerOptions,
206
- ServiceInputTypes,
207
- ServiceOutputTypes,
208
- SageMakerRuntimeClientResolvedConfig
209
- > {
210
- /**
211
- * The resolved configuration of SageMakerRuntimeClient class. This is resolved and normalized from the {@link SageMakerRuntimeClientConfig | constructor configuration interface}.
212
- */
213
- readonly config: SageMakerRuntimeClientResolvedConfig;
214
-
215
- constructor(configuration: SageMakerRuntimeClientConfig) {
216
- const _config_0 = __getRuntimeConfig(configuration);
217
- const _config_1 = resolveRegionConfig(_config_0);
218
- const _config_2 = resolveEndpointsConfig(_config_1);
219
- const _config_3 = resolveRetryConfig(_config_2);
220
- const _config_4 = resolveHostHeaderConfig(_config_3);
221
- const _config_5 = resolveAwsAuthConfig(_config_4);
222
- const _config_6 = resolveUserAgentConfig(_config_5);
223
- super(_config_6);
224
- this.config = _config_6;
225
- this.middlewareStack.use(getRetryPlugin(this.config));
226
- this.middlewareStack.use(getContentLengthPlugin(this.config));
227
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
228
- this.middlewareStack.use(getLoggerPlugin(this.config));
229
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
230
- this.middlewareStack.use(getUserAgentPlugin(this.config));
231
- }
232
-
233
- /**
234
- * Destroy underlying resources, like sockets. It's usually not necessary to do this.
235
- * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
236
- * Otherwise, sockets might stay open for quite a long time before the server terminates them.
237
- */
238
- destroy(): void {
239
- super.destroy();
240
- }
241
- }
@@ -1,111 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { InvokeEndpointAsyncInput, InvokeEndpointAsyncOutput } from "../models/models_0";
15
- import {
16
- deserializeAws_restJson1InvokeEndpointAsyncCommand,
17
- serializeAws_restJson1InvokeEndpointAsyncCommand,
18
- } from "../protocols/Aws_restJson1";
19
- import { SageMakerRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerRuntimeClient";
20
-
21
- export interface InvokeEndpointAsyncCommandInput extends InvokeEndpointAsyncInput {}
22
- export interface InvokeEndpointAsyncCommandOutput extends InvokeEndpointAsyncOutput, __MetadataBearer {}
23
-
24
- /**
25
- * <p>After you deploy a model into production using Amazon SageMaker hosting services,
26
- * your client applications use this API to get inferences from the model hosted at
27
- * the specified endpoint in an asynchronous manner.</p>
28
- *
29
- * <p>Inference requests sent to this API are enqueued for asynchronous processing.
30
- * The processing of the inference request may or may not complete before the
31
- * you receive a response from this API. The response from this API will
32
- * not contain the result of the inference request but contain information
33
- * about where you can locate it.</p>
34
- *
35
- * <p>Amazon SageMaker strips all <code>POST</code> headers except those supported by the API.
36
- * Amazon SageMaker might add additional headers. You should not rely on the behavior
37
- * of headers outside those enumerated in the request syntax.</p>
38
- *
39
- * <p>Calls to <code>InvokeEndpointAsync</code> are authenticated by using AWS Signature
40
- * 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
41
- * Reference</i>.</p>
42
- * @example
43
- * Use a bare-bones client and the command you need to make an API call.
44
- * ```javascript
45
- * import { SageMakerRuntimeClient, InvokeEndpointAsyncCommand } from "@aws-sdk/client-sagemaker-runtime"; // ES Modules import
46
- * // const { SageMakerRuntimeClient, InvokeEndpointAsyncCommand } = require("@aws-sdk/client-sagemaker-runtime"); // CommonJS import
47
- * const client = new SageMakerRuntimeClient(config);
48
- * const command = new InvokeEndpointAsyncCommand(input);
49
- * const response = await client.send(command);
50
- * ```
51
- *
52
- * @see {@link InvokeEndpointAsyncCommandInput} for command's `input` shape.
53
- * @see {@link InvokeEndpointAsyncCommandOutput} for command's `response` shape.
54
- * @see {@link SageMakerRuntimeClientResolvedConfig | config} for command's `input` shape.
55
- *
56
- */
57
- export class InvokeEndpointAsyncCommand extends $Command<
58
- InvokeEndpointAsyncCommandInput,
59
- InvokeEndpointAsyncCommandOutput,
60
- SageMakerRuntimeClientResolvedConfig
61
- > {
62
- // Start section: command_properties
63
- // End section: command_properties
64
-
65
- constructor(readonly input: InvokeEndpointAsyncCommandInput) {
66
- // Start section: command_constructor
67
- super();
68
- // End section: command_constructor
69
- }
70
-
71
- /**
72
- * @internal
73
- */
74
- resolveMiddleware(
75
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
76
- configuration: SageMakerRuntimeClientResolvedConfig,
77
- options?: __HttpHandlerOptions
78
- ): Handler<InvokeEndpointAsyncCommandInput, InvokeEndpointAsyncCommandOutput> {
79
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
80
-
81
- const stack = clientStack.concat(this.middlewareStack);
82
-
83
- const { logger } = configuration;
84
- const clientName = "SageMakerRuntimeClient";
85
- const commandName = "InvokeEndpointAsyncCommand";
86
- const handlerExecutionContext: HandlerExecutionContext = {
87
- logger,
88
- clientName,
89
- commandName,
90
- inputFilterSensitiveLog: InvokeEndpointAsyncInput.filterSensitiveLog,
91
- outputFilterSensitiveLog: InvokeEndpointAsyncOutput.filterSensitiveLog,
92
- };
93
- const { requestHandler } = configuration;
94
- return stack.resolve(
95
- (request: FinalizeHandlerArguments<any>) =>
96
- requestHandler.handle(request.request as __HttpRequest, options || {}),
97
- handlerExecutionContext
98
- );
99
- }
100
-
101
- private serialize(input: InvokeEndpointAsyncCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
102
- return serializeAws_restJson1InvokeEndpointAsyncCommand(input, context);
103
- }
104
-
105
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<InvokeEndpointAsyncCommandOutput> {
106
- return deserializeAws_restJson1InvokeEndpointAsyncCommand(output, context);
107
- }
108
-
109
- // Start section: command_body_extra
110
- // End section: command_body_extra
111
- }
@@ -1,114 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { InvokeEndpointInput, InvokeEndpointOutput } from "../models/models_0";
15
- import {
16
- deserializeAws_restJson1InvokeEndpointCommand,
17
- serializeAws_restJson1InvokeEndpointCommand,
18
- } from "../protocols/Aws_restJson1";
19
- import { SageMakerRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerRuntimeClient";
20
-
21
- export interface InvokeEndpointCommandInput extends InvokeEndpointInput {}
22
- export interface InvokeEndpointCommandOutput extends InvokeEndpointOutput, __MetadataBearer {}
23
-
24
- /**
25
- * <p>After you deploy a model into production using Amazon SageMaker hosting services, your
26
- * client applications use this API to get inferences from the model hosted at the
27
- * specified endpoint. </p>
28
- * <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>
29
- * <p>Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add
30
- * additional headers. You should not rely on the behavior of headers outside those
31
- * enumerated in the request syntax. </p>
32
- * <p>Calls to <code>InvokeEndpoint</code> are authenticated by using AWS Signature Version
33
- * 4. For information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html">Authenticating
34
- * Requests (AWS Signature Version 4)</a> in the <i>Amazon S3 API
35
- * Reference</i>.</p>
36
- * <p>A customer's model containers must respond to requests within 60 seconds. The model
37
- * itself can have a maximum processing time of 60 seconds before responding to
38
- * invocations. If your model is going to take 50-60 seconds of processing time, the SDK
39
- * socket timeout should be set to be 70 seconds.</p>
40
- * <note>
41
- * <p>Endpoints are scoped to an individual account, and are not public. The URL does
42
- * not contain the account ID, but Amazon SageMaker determines the account ID from the
43
- * authentication token that is supplied by the caller.</p>
44
- * </note>
45
- * @example
46
- * Use a bare-bones client and the command you need to make an API call.
47
- * ```javascript
48
- * import { SageMakerRuntimeClient, InvokeEndpointCommand } from "@aws-sdk/client-sagemaker-runtime"; // ES Modules import
49
- * // const { SageMakerRuntimeClient, InvokeEndpointCommand } = require("@aws-sdk/client-sagemaker-runtime"); // CommonJS import
50
- * const client = new SageMakerRuntimeClient(config);
51
- * const command = new InvokeEndpointCommand(input);
52
- * const response = await client.send(command);
53
- * ```
54
- *
55
- * @see {@link InvokeEndpointCommandInput} for command's `input` shape.
56
- * @see {@link InvokeEndpointCommandOutput} for command's `response` shape.
57
- * @see {@link SageMakerRuntimeClientResolvedConfig | config} for command's `input` shape.
58
- *
59
- */
60
- export class InvokeEndpointCommand extends $Command<
61
- InvokeEndpointCommandInput,
62
- InvokeEndpointCommandOutput,
63
- SageMakerRuntimeClientResolvedConfig
64
- > {
65
- // Start section: command_properties
66
- // End section: command_properties
67
-
68
- constructor(readonly input: InvokeEndpointCommandInput) {
69
- // Start section: command_constructor
70
- super();
71
- // End section: command_constructor
72
- }
73
-
74
- /**
75
- * @internal
76
- */
77
- resolveMiddleware(
78
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
79
- configuration: SageMakerRuntimeClientResolvedConfig,
80
- options?: __HttpHandlerOptions
81
- ): Handler<InvokeEndpointCommandInput, InvokeEndpointCommandOutput> {
82
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
83
-
84
- const stack = clientStack.concat(this.middlewareStack);
85
-
86
- const { logger } = configuration;
87
- const clientName = "SageMakerRuntimeClient";
88
- const commandName = "InvokeEndpointCommand";
89
- const handlerExecutionContext: HandlerExecutionContext = {
90
- logger,
91
- clientName,
92
- commandName,
93
- inputFilterSensitiveLog: InvokeEndpointInput.filterSensitiveLog,
94
- outputFilterSensitiveLog: InvokeEndpointOutput.filterSensitiveLog,
95
- };
96
- const { requestHandler } = configuration;
97
- return stack.resolve(
98
- (request: FinalizeHandlerArguments<any>) =>
99
- requestHandler.handle(request.request as __HttpRequest, options || {}),
100
- handlerExecutionContext
101
- );
102
- }
103
-
104
- private serialize(input: InvokeEndpointCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
105
- return serializeAws_restJson1InvokeEndpointCommand(input, context);
106
- }
107
-
108
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<InvokeEndpointCommandOutput> {
109
- return deserializeAws_restJson1InvokeEndpointCommand(output, context);
110
- }
111
-
112
- // Start section: command_body_extra
113
- // End section: command_body_extra
114
- }
package/src/endpoints.ts DELETED
@@ -1,82 +0,0 @@
1
- import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver";
2
- import { RegionInfoProvider } from "@aws-sdk/types";
3
-
4
- const regionHash: RegionHash = {
5
- "us-east-1-fips": {
6
- hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
7
- signingRegion: "us-east-1",
8
- },
9
- "us-east-2-fips": {
10
- hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
11
- signingRegion: "us-east-2",
12
- },
13
- "us-gov-west-1-fips": {
14
- hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
15
- signingRegion: "us-gov-west-1",
16
- },
17
- "us-west-1-fips": {
18
- hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
19
- signingRegion: "us-west-1",
20
- },
21
- "us-west-2-fips": {
22
- hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
23
- signingRegion: "us-west-2",
24
- },
25
- };
26
-
27
- const partitionHash: PartitionHash = {
28
- aws: {
29
- regions: [
30
- "af-south-1",
31
- "ap-east-1",
32
- "ap-northeast-1",
33
- "ap-northeast-2",
34
- "ap-northeast-3",
35
- "ap-south-1",
36
- "ap-southeast-1",
37
- "ap-southeast-2",
38
- "ca-central-1",
39
- "eu-central-1",
40
- "eu-north-1",
41
- "eu-south-1",
42
- "eu-west-1",
43
- "eu-west-2",
44
- "eu-west-3",
45
- "me-south-1",
46
- "sa-east-1",
47
- "us-east-1",
48
- "us-east-1-fips",
49
- "us-east-2",
50
- "us-east-2-fips",
51
- "us-west-1",
52
- "us-west-1-fips",
53
- "us-west-2",
54
- "us-west-2-fips",
55
- ],
56
- hostname: "runtime.sagemaker.{region}.amazonaws.com",
57
- },
58
- "aws-cn": {
59
- regions: ["cn-north-1", "cn-northwest-1"],
60
- hostname: "runtime.sagemaker.{region}.amazonaws.com.cn",
61
- },
62
- "aws-iso": {
63
- regions: ["us-iso-east-1"],
64
- hostname: "runtime.sagemaker.{region}.c2s.ic.gov",
65
- },
66
- "aws-iso-b": {
67
- regions: ["us-isob-east-1"],
68
- hostname: "runtime.sagemaker.{region}.sc2s.sgov.gov",
69
- },
70
- "aws-us-gov": {
71
- regions: ["us-gov-east-1", "us-gov-west-1", "us-gov-west-1-fips"],
72
- hostname: "runtime.sagemaker.{region}.amazonaws.com",
73
- },
74
- };
75
-
76
- export const defaultRegionInfoProvider: RegionInfoProvider = async (region: string, options?: any) =>
77
- getRegionInfo(region, {
78
- ...options,
79
- signingService: "sagemaker",
80
- regionHash,
81
- partitionHash,
82
- });
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from "./SageMakerRuntimeClient";
2
- export * from "./SageMakerRuntime";
3
- export * from "./commands/InvokeEndpointCommand";
4
- export * from "./commands/InvokeEndpointAsyncCommand";
5
- export * from "./models/index";
@@ -1 +0,0 @@
1
- export * from "./models_0";