@aws-sdk/client-sagemaker-runtime 3.186.0 → 3.190.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 CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.190.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.189.0...v3.190.0) (2022-10-17)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-sagemaker-runtime
9
+
10
+
11
+
12
+
13
+
14
+ # [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/client-sagemaker-runtime
17
+
18
+
19
+
20
+
21
+
6
22
  # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
7
23
 
8
24
  **Note:** Version bump only for package @aws-sdk/client-sagemaker-runtime
@@ -1,40 +1,33 @@
1
- import { __extends } from "tslib";
2
1
  import { InvokeEndpointAsyncCommand, } from "./commands/InvokeEndpointAsyncCommand";
3
2
  import { InvokeEndpointCommand, } from "./commands/InvokeEndpointCommand";
4
3
  import { SageMakerRuntimeClient } from "./SageMakerRuntimeClient";
5
- var SageMakerRuntime = (function (_super) {
6
- __extends(SageMakerRuntime, _super);
7
- function SageMakerRuntime() {
8
- return _super !== null && _super.apply(this, arguments) || this;
9
- }
10
- SageMakerRuntime.prototype.invokeEndpoint = function (args, optionsOrCb, cb) {
11
- var command = new InvokeEndpointCommand(args);
4
+ export class SageMakerRuntime extends SageMakerRuntimeClient {
5
+ invokeEndpoint(args, optionsOrCb, cb) {
6
+ const command = new InvokeEndpointCommand(args);
12
7
  if (typeof optionsOrCb === "function") {
13
8
  this.send(command, optionsOrCb);
14
9
  }
15
10
  else if (typeof cb === "function") {
16
11
  if (typeof optionsOrCb !== "object")
17
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
12
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
18
13
  this.send(command, optionsOrCb || {}, cb);
19
14
  }
20
15
  else {
21
16
  return this.send(command, optionsOrCb);
22
17
  }
23
- };
24
- SageMakerRuntime.prototype.invokeEndpointAsync = function (args, optionsOrCb, cb) {
25
- var command = new InvokeEndpointAsyncCommand(args);
18
+ }
19
+ invokeEndpointAsync(args, optionsOrCb, cb) {
20
+ const command = new InvokeEndpointAsyncCommand(args);
26
21
  if (typeof optionsOrCb === "function") {
27
22
  this.send(command, optionsOrCb);
28
23
  }
29
24
  else if (typeof cb === "function") {
30
25
  if (typeof optionsOrCb !== "object")
31
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
26
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
32
27
  this.send(command, optionsOrCb || {}, cb);
33
28
  }
34
29
  else {
35
30
  return this.send(command, optionsOrCb);
36
31
  }
37
- };
38
- return SageMakerRuntime;
39
- }(SageMakerRuntimeClient));
40
- export { SageMakerRuntime };
32
+ }
33
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var SageMakerRuntimeClient = (function (_super) {
13
- __extends(SageMakerRuntimeClient, _super);
14
- function SageMakerRuntimeClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
- return _this;
11
+ export class SageMakerRuntimeClient extends __Client {
12
+ constructor(configuration) {
13
+ const _config_0 = __getRuntimeConfig(configuration);
14
+ const _config_1 = resolveRegionConfig(_config_0);
15
+ const _config_2 = resolveEndpointsConfig(_config_1);
16
+ const _config_3 = resolveRetryConfig(_config_2);
17
+ const _config_4 = resolveHostHeaderConfig(_config_3);
18
+ const _config_5 = resolveAwsAuthConfig(_config_4);
19
+ const _config_6 = resolveUserAgentConfig(_config_5);
20
+ super(_config_6);
21
+ this.config = _config_6;
22
+ this.middlewareStack.use(getRetryPlugin(this.config));
23
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
24
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
+ this.middlewareStack.use(getLoggerPlugin(this.config));
26
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
33
29
  }
34
- SageMakerRuntimeClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return SageMakerRuntimeClient;
38
- }(__Client));
39
- export { SageMakerRuntimeClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { InvokeEndpointAsyncInputFilterSensitiveLog, InvokeEndpointAsyncOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1InvokeEndpointAsyncCommand, serializeAws_restJson1InvokeEndpointAsyncCommand, } from "../protocols/Aws_restJson1";
6
- var InvokeEndpointAsyncCommand = (function (_super) {
7
- __extends(InvokeEndpointAsyncCommand, _super);
8
- function InvokeEndpointAsyncCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class InvokeEndpointAsyncCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- InvokeEndpointAsyncCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "SageMakerRuntimeClient";
18
- var commandName = "InvokeEndpointAsyncCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "SageMakerRuntimeClient";
15
+ const commandName = "InvokeEndpointAsyncCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: InvokeEndpointAsyncInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: InvokeEndpointAsyncOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- InvokeEndpointAsyncCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1InvokeEndpointAsyncCommand(input, context);
33
- };
34
- InvokeEndpointAsyncCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1InvokeEndpointAsyncCommand(output, context);
36
- };
37
- return InvokeEndpointAsyncCommand;
38
- }($Command));
39
- export { InvokeEndpointAsyncCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { InvokeEndpointInputFilterSensitiveLog, InvokeEndpointOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1InvokeEndpointCommand, serializeAws_restJson1InvokeEndpointCommand, } from "../protocols/Aws_restJson1";
6
- var InvokeEndpointCommand = (function (_super) {
7
- __extends(InvokeEndpointCommand, _super);
8
- function InvokeEndpointCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class InvokeEndpointCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- InvokeEndpointCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "SageMakerRuntimeClient";
18
- var commandName = "InvokeEndpointCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "SageMakerRuntimeClient";
15
+ const commandName = "InvokeEndpointCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: InvokeEndpointInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: InvokeEndpointOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- InvokeEndpointCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1InvokeEndpointCommand(input, context);
33
- };
34
- InvokeEndpointCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1InvokeEndpointCommand(output, context);
36
- };
37
- return InvokeEndpointCommand;
38
- }($Command));
39
- export { InvokeEndpointCommand };
31
+ }
32
+ }
@@ -1,6 +1,5 @@
1
- import { __assign, __awaiter, __generator } from "tslib";
2
1
  import { getRegionInfo } from "@aws-sdk/config-resolver";
3
- var regionHash = {
2
+ const regionHash = {
4
3
  "us-east-1": {
5
4
  variants: [
6
5
  {
@@ -42,7 +41,7 @@ var regionHash = {
42
41
  ],
43
42
  },
44
43
  };
45
- var partitionHash = {
44
+ const partitionHash = {
46
45
  aws: {
47
46
  regions: [
48
47
  "af-south-1",
@@ -166,8 +165,9 @@ var partitionHash = {
166
165
  ],
167
166
  },
168
167
  };
169
- export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
170
- return __generator(this, function (_a) {
171
- return [2, getRegionInfo(region, __assign(__assign({}, options), { signingService: "sagemaker", regionHash: regionHash, partitionHash: partitionHash }))];
172
- });
173
- }); };
168
+ export const defaultRegionInfoProvider = async (region, options) => getRegionInfo(region, {
169
+ ...options,
170
+ signingService: "sagemaker",
171
+ regionHash,
172
+ partitionHash,
173
+ });
@@ -1,12 +1,7 @@
1
- import { __extends } from "tslib";
2
1
  import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
3
- var SageMakerRuntimeServiceException = (function (_super) {
4
- __extends(SageMakerRuntimeServiceException, _super);
5
- function SageMakerRuntimeServiceException(options) {
6
- var _this = _super.call(this, options) || this;
7
- Object.setPrototypeOf(_this, SageMakerRuntimeServiceException.prototype);
8
- return _this;
2
+ export class SageMakerRuntimeServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, SageMakerRuntimeServiceException.prototype);
9
6
  }
10
- return SageMakerRuntimeServiceException;
11
- }(__ServiceException));
12
- export { SageMakerRuntimeServiceException };
7
+ }
@@ -1,88 +1,100 @@
1
- import { __assign, __extends } from "tslib";
2
1
  import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
3
2
  import { SageMakerRuntimeServiceException as __BaseException } from "./SageMakerRuntimeServiceException";
4
- var InternalDependencyException = (function (_super) {
5
- __extends(InternalDependencyException, _super);
6
- function InternalDependencyException(opts) {
7
- var _this = _super.call(this, __assign({ name: "InternalDependencyException", $fault: "server" }, opts)) || this;
8
- _this.name = "InternalDependencyException";
9
- _this.$fault = "server";
10
- Object.setPrototypeOf(_this, InternalDependencyException.prototype);
11
- _this.Message = opts.Message;
12
- return _this;
3
+ export class InternalDependencyException extends __BaseException {
4
+ constructor(opts) {
5
+ super({
6
+ name: "InternalDependencyException",
7
+ $fault: "server",
8
+ ...opts,
9
+ });
10
+ this.name = "InternalDependencyException";
11
+ this.$fault = "server";
12
+ Object.setPrototypeOf(this, InternalDependencyException.prototype);
13
+ this.Message = opts.Message;
13
14
  }
14
- return InternalDependencyException;
15
- }(__BaseException));
16
- export { InternalDependencyException };
17
- var InternalFailure = (function (_super) {
18
- __extends(InternalFailure, _super);
19
- function InternalFailure(opts) {
20
- var _this = _super.call(this, __assign({ name: "InternalFailure", $fault: "server" }, opts)) || this;
21
- _this.name = "InternalFailure";
22
- _this.$fault = "server";
23
- Object.setPrototypeOf(_this, InternalFailure.prototype);
24
- _this.Message = opts.Message;
25
- return _this;
15
+ }
16
+ export class InternalFailure extends __BaseException {
17
+ constructor(opts) {
18
+ super({
19
+ name: "InternalFailure",
20
+ $fault: "server",
21
+ ...opts,
22
+ });
23
+ this.name = "InternalFailure";
24
+ this.$fault = "server";
25
+ Object.setPrototypeOf(this, InternalFailure.prototype);
26
+ this.Message = opts.Message;
26
27
  }
27
- return InternalFailure;
28
- }(__BaseException));
29
- export { InternalFailure };
30
- var ModelError = (function (_super) {
31
- __extends(ModelError, _super);
32
- function ModelError(opts) {
33
- var _this = _super.call(this, __assign({ name: "ModelError", $fault: "client" }, opts)) || this;
34
- _this.name = "ModelError";
35
- _this.$fault = "client";
36
- Object.setPrototypeOf(_this, ModelError.prototype);
37
- _this.Message = opts.Message;
38
- _this.OriginalStatusCode = opts.OriginalStatusCode;
39
- _this.OriginalMessage = opts.OriginalMessage;
40
- _this.LogStreamArn = opts.LogStreamArn;
41
- return _this;
28
+ }
29
+ export class ModelError extends __BaseException {
30
+ constructor(opts) {
31
+ super({
32
+ name: "ModelError",
33
+ $fault: "client",
34
+ ...opts,
35
+ });
36
+ this.name = "ModelError";
37
+ this.$fault = "client";
38
+ Object.setPrototypeOf(this, ModelError.prototype);
39
+ this.Message = opts.Message;
40
+ this.OriginalStatusCode = opts.OriginalStatusCode;
41
+ this.OriginalMessage = opts.OriginalMessage;
42
+ this.LogStreamArn = opts.LogStreamArn;
42
43
  }
43
- return ModelError;
44
- }(__BaseException));
45
- export { ModelError };
46
- var ModelNotReadyException = (function (_super) {
47
- __extends(ModelNotReadyException, _super);
48
- function ModelNotReadyException(opts) {
49
- var _this = _super.call(this, __assign({ name: "ModelNotReadyException", $fault: "client" }, opts)) || this;
50
- _this.name = "ModelNotReadyException";
51
- _this.$fault = "client";
52
- Object.setPrototypeOf(_this, ModelNotReadyException.prototype);
53
- _this.Message = opts.Message;
54
- return _this;
44
+ }
45
+ export class ModelNotReadyException extends __BaseException {
46
+ constructor(opts) {
47
+ super({
48
+ name: "ModelNotReadyException",
49
+ $fault: "client",
50
+ ...opts,
51
+ });
52
+ this.name = "ModelNotReadyException";
53
+ this.$fault = "client";
54
+ Object.setPrototypeOf(this, ModelNotReadyException.prototype);
55
+ this.Message = opts.Message;
55
56
  }
56
- return ModelNotReadyException;
57
- }(__BaseException));
58
- export { ModelNotReadyException };
59
- var ServiceUnavailable = (function (_super) {
60
- __extends(ServiceUnavailable, _super);
61
- function ServiceUnavailable(opts) {
62
- var _this = _super.call(this, __assign({ name: "ServiceUnavailable", $fault: "server" }, opts)) || this;
63
- _this.name = "ServiceUnavailable";
64
- _this.$fault = "server";
65
- Object.setPrototypeOf(_this, ServiceUnavailable.prototype);
66
- _this.Message = opts.Message;
67
- return _this;
57
+ }
58
+ export class ServiceUnavailable extends __BaseException {
59
+ constructor(opts) {
60
+ super({
61
+ name: "ServiceUnavailable",
62
+ $fault: "server",
63
+ ...opts,
64
+ });
65
+ this.name = "ServiceUnavailable";
66
+ this.$fault = "server";
67
+ Object.setPrototypeOf(this, ServiceUnavailable.prototype);
68
+ this.Message = opts.Message;
68
69
  }
69
- return ServiceUnavailable;
70
- }(__BaseException));
71
- export { ServiceUnavailable };
72
- var ValidationError = (function (_super) {
73
- __extends(ValidationError, _super);
74
- function ValidationError(opts) {
75
- var _this = _super.call(this, __assign({ name: "ValidationError", $fault: "client" }, opts)) || this;
76
- _this.name = "ValidationError";
77
- _this.$fault = "client";
78
- Object.setPrototypeOf(_this, ValidationError.prototype);
79
- _this.Message = opts.Message;
80
- return _this;
70
+ }
71
+ export class ValidationError extends __BaseException {
72
+ constructor(opts) {
73
+ super({
74
+ name: "ValidationError",
75
+ $fault: "client",
76
+ ...opts,
77
+ });
78
+ this.name = "ValidationError";
79
+ this.$fault = "client";
80
+ Object.setPrototypeOf(this, ValidationError.prototype);
81
+ this.Message = opts.Message;
81
82
  }
82
- return ValidationError;
83
- }(__BaseException));
84
- export { ValidationError };
85
- export var InvokeEndpointInputFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Body && { Body: SENSITIVE_STRING })), (obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }))); };
86
- export var InvokeEndpointOutputFilterSensitiveLog = function (obj) { return (__assign(__assign(__assign({}, obj), (obj.Body && { Body: SENSITIVE_STRING })), (obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }))); };
87
- export var InvokeEndpointAsyncInputFilterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }))); };
88
- export var InvokeEndpointAsyncOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
83
+ }
84
+ export const InvokeEndpointInputFilterSensitiveLog = (obj) => ({
85
+ ...obj,
86
+ ...(obj.Body && { Body: SENSITIVE_STRING }),
87
+ ...(obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }),
88
+ });
89
+ export const InvokeEndpointOutputFilterSensitiveLog = (obj) => ({
90
+ ...obj,
91
+ ...(obj.Body && { Body: SENSITIVE_STRING }),
92
+ ...(obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }),
93
+ });
94
+ export const InvokeEndpointAsyncInputFilterSensitiveLog = (obj) => ({
95
+ ...obj,
96
+ ...(obj.CustomAttributes && { CustomAttributes: SENSITIVE_STRING }),
97
+ });
98
+ export const InvokeEndpointAsyncOutputFilterSensitiveLog = (obj) => ({
99
+ ...obj,
100
+ });