@aws-sdk/client-machine-learning 3.35.0 → 3.36.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 +13 -0
- package/dist-cjs/MachineLearning.js +0 -1
- package/dist-cjs/MachineLearningClient.js +0 -1
- package/dist-cjs/commands/AddTagsCommand.js +0 -1
- package/dist-cjs/commands/CreateBatchPredictionCommand.js +0 -1
- package/dist-cjs/commands/CreateDataSourceFromRDSCommand.js +0 -1
- package/dist-cjs/commands/CreateDataSourceFromRedshiftCommand.js +0 -1
- package/dist-cjs/commands/CreateDataSourceFromS3Command.js +0 -1
- package/dist-cjs/commands/CreateEvaluationCommand.js +0 -1
- package/dist-cjs/commands/CreateMLModelCommand.js +0 -1
- package/dist-cjs/commands/CreateRealtimeEndpointCommand.js +0 -1
- package/dist-cjs/commands/DeleteBatchPredictionCommand.js +0 -1
- package/dist-cjs/commands/DeleteDataSourceCommand.js +0 -1
- package/dist-cjs/commands/DeleteEvaluationCommand.js +0 -1
- package/dist-cjs/commands/DeleteMLModelCommand.js +0 -1
- package/dist-cjs/commands/DeleteRealtimeEndpointCommand.js +0 -1
- package/dist-cjs/commands/DeleteTagsCommand.js +0 -1
- package/dist-cjs/commands/DescribeBatchPredictionsCommand.js +0 -1
- package/dist-cjs/commands/DescribeDataSourcesCommand.js +0 -1
- package/dist-cjs/commands/DescribeEvaluationsCommand.js +0 -1
- package/dist-cjs/commands/DescribeMLModelsCommand.js +0 -1
- package/dist-cjs/commands/DescribeTagsCommand.js +0 -1
- package/dist-cjs/commands/GetBatchPredictionCommand.js +0 -1
- package/dist-cjs/commands/GetDataSourceCommand.js +0 -1
- package/dist-cjs/commands/GetEvaluationCommand.js +0 -1
- package/dist-cjs/commands/GetMLModelCommand.js +0 -1
- package/dist-cjs/commands/PredictCommand.js +0 -1
- package/dist-cjs/commands/UpdateBatchPredictionCommand.js +0 -1
- package/dist-cjs/commands/UpdateDataSourceCommand.js +0 -1
- package/dist-cjs/commands/UpdateEvaluationCommand.js +0 -1
- package/dist-cjs/commands/UpdateMLModelCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/DescribeBatchPredictionsPaginator.js +0 -1
- package/dist-cjs/pagination/DescribeDataSourcesPaginator.js +0 -1
- package/dist-cjs/pagination/DescribeEvaluationsPaginator.js +0 -1
- package/dist-cjs/pagination/DescribeMLModelsPaginator.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/protocols/Aws_json1_1.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-cjs/waiters/waitForBatchPredictionAvailable.js +0 -1
- package/dist-cjs/waiters/waitForDataSourceAvailable.js +0 -1
- package/dist-cjs/waiters/waitForEvaluationAvailable.js +0 -1
- package/dist-cjs/waiters/waitForMLModelAvailable.js +0 -1
- package/dist-es/MachineLearning.js +0 -1
- package/dist-es/MachineLearningClient.js +0 -1
- package/dist-es/commands/AddTagsCommand.js +0 -1
- package/dist-es/commands/CreateBatchPredictionCommand.js +0 -1
- package/dist-es/commands/CreateDataSourceFromRDSCommand.js +0 -1
- package/dist-es/commands/CreateDataSourceFromRedshiftCommand.js +0 -1
- package/dist-es/commands/CreateDataSourceFromS3Command.js +0 -1
- package/dist-es/commands/CreateEvaluationCommand.js +0 -1
- package/dist-es/commands/CreateMLModelCommand.js +0 -1
- package/dist-es/commands/CreateRealtimeEndpointCommand.js +0 -1
- package/dist-es/commands/DeleteBatchPredictionCommand.js +0 -1
- package/dist-es/commands/DeleteDataSourceCommand.js +0 -1
- package/dist-es/commands/DeleteEvaluationCommand.js +0 -1
- package/dist-es/commands/DeleteMLModelCommand.js +0 -1
- package/dist-es/commands/DeleteRealtimeEndpointCommand.js +0 -1
- package/dist-es/commands/DeleteTagsCommand.js +0 -1
- package/dist-es/commands/DescribeBatchPredictionsCommand.js +0 -1
- package/dist-es/commands/DescribeDataSourcesCommand.js +0 -1
- package/dist-es/commands/DescribeEvaluationsCommand.js +0 -1
- package/dist-es/commands/DescribeMLModelsCommand.js +0 -1
- package/dist-es/commands/DescribeTagsCommand.js +0 -1
- package/dist-es/commands/GetBatchPredictionCommand.js +0 -1
- package/dist-es/commands/GetDataSourceCommand.js +0 -1
- package/dist-es/commands/GetEvaluationCommand.js +0 -1
- package/dist-es/commands/GetMLModelCommand.js +0 -1
- package/dist-es/commands/PredictCommand.js +0 -1
- package/dist-es/commands/UpdateBatchPredictionCommand.js +0 -1
- package/dist-es/commands/UpdateDataSourceCommand.js +0 -1
- package/dist-es/commands/UpdateEvaluationCommand.js +0 -1
- package/dist-es/commands/UpdateMLModelCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/DescribeBatchPredictionsPaginator.js +0 -1
- package/dist-es/pagination/DescribeDataSourcesPaginator.js +0 -1
- package/dist-es/pagination/DescribeEvaluationsPaginator.js +0 -1
- package/dist-es/pagination/DescribeMLModelsPaginator.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/protocols/Aws_json1_1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/dist-es/waiters/waitForBatchPredictionAvailable.js +0 -1
- package/dist-es/waiters/waitForDataSourceAvailable.js +0 -1
- package/dist-es/waiters/waitForEvaluationAvailable.js +0 -1
- package/dist-es/waiters/waitForMLModelAvailable.js +0 -1
- package/package.json +35 -32
- package/dist-cjs/MachineLearning.js.map +0 -1
- package/dist-cjs/MachineLearningClient.js.map +0 -1
- package/dist-cjs/commands/AddTagsCommand.js.map +0 -1
- package/dist-cjs/commands/CreateBatchPredictionCommand.js.map +0 -1
- package/dist-cjs/commands/CreateDataSourceFromRDSCommand.js.map +0 -1
- package/dist-cjs/commands/CreateDataSourceFromRedshiftCommand.js.map +0 -1
- package/dist-cjs/commands/CreateDataSourceFromS3Command.js.map +0 -1
- package/dist-cjs/commands/CreateEvaluationCommand.js.map +0 -1
- package/dist-cjs/commands/CreateMLModelCommand.js.map +0 -1
- package/dist-cjs/commands/CreateRealtimeEndpointCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteBatchPredictionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteDataSourceCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteEvaluationCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteMLModelCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteRealtimeEndpointCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteTagsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeBatchPredictionsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeDataSourcesCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeEvaluationsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeMLModelsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeTagsCommand.js.map +0 -1
- package/dist-cjs/commands/GetBatchPredictionCommand.js.map +0 -1
- package/dist-cjs/commands/GetDataSourceCommand.js.map +0 -1
- package/dist-cjs/commands/GetEvaluationCommand.js.map +0 -1
- package/dist-cjs/commands/GetMLModelCommand.js.map +0 -1
- package/dist-cjs/commands/PredictCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateBatchPredictionCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDataSourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateEvaluationCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateMLModelCommand.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/pagination/DescribeBatchPredictionsPaginator.js.map +0 -1
- package/dist-cjs/pagination/DescribeDataSourcesPaginator.js.map +0 -1
- package/dist-cjs/pagination/DescribeEvaluationsPaginator.js.map +0 -1
- package/dist-cjs/pagination/DescribeMLModelsPaginator.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/protocols/Aws_json1_1.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-cjs/waiters/waitForBatchPredictionAvailable.js.map +0 -1
- package/dist-cjs/waiters/waitForDataSourceAvailable.js.map +0 -1
- package/dist-cjs/waiters/waitForEvaluationAvailable.js.map +0 -1
- package/dist-cjs/waiters/waitForMLModelAvailable.js.map +0 -1
- package/dist-es/MachineLearning.js.map +0 -1
- package/dist-es/MachineLearningClient.js.map +0 -1
- package/dist-es/commands/AddTagsCommand.js.map +0 -1
- package/dist-es/commands/CreateBatchPredictionCommand.js.map +0 -1
- package/dist-es/commands/CreateDataSourceFromRDSCommand.js.map +0 -1
- package/dist-es/commands/CreateDataSourceFromRedshiftCommand.js.map +0 -1
- package/dist-es/commands/CreateDataSourceFromS3Command.js.map +0 -1
- package/dist-es/commands/CreateEvaluationCommand.js.map +0 -1
- package/dist-es/commands/CreateMLModelCommand.js.map +0 -1
- package/dist-es/commands/CreateRealtimeEndpointCommand.js.map +0 -1
- package/dist-es/commands/DeleteBatchPredictionCommand.js.map +0 -1
- package/dist-es/commands/DeleteDataSourceCommand.js.map +0 -1
- package/dist-es/commands/DeleteEvaluationCommand.js.map +0 -1
- package/dist-es/commands/DeleteMLModelCommand.js.map +0 -1
- package/dist-es/commands/DeleteRealtimeEndpointCommand.js.map +0 -1
- package/dist-es/commands/DeleteTagsCommand.js.map +0 -1
- package/dist-es/commands/DescribeBatchPredictionsCommand.js.map +0 -1
- package/dist-es/commands/DescribeDataSourcesCommand.js.map +0 -1
- package/dist-es/commands/DescribeEvaluationsCommand.js.map +0 -1
- package/dist-es/commands/DescribeMLModelsCommand.js.map +0 -1
- package/dist-es/commands/DescribeTagsCommand.js.map +0 -1
- package/dist-es/commands/GetBatchPredictionCommand.js.map +0 -1
- package/dist-es/commands/GetDataSourceCommand.js.map +0 -1
- package/dist-es/commands/GetEvaluationCommand.js.map +0 -1
- package/dist-es/commands/GetMLModelCommand.js.map +0 -1
- package/dist-es/commands/PredictCommand.js.map +0 -1
- package/dist-es/commands/UpdateBatchPredictionCommand.js.map +0 -1
- package/dist-es/commands/UpdateDataSourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateEvaluationCommand.js.map +0 -1
- package/dist-es/commands/UpdateMLModelCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/DescribeBatchPredictionsPaginator.js.map +0 -1
- package/dist-es/pagination/DescribeDataSourcesPaginator.js.map +0 -1
- package/dist-es/pagination/DescribeEvaluationsPaginator.js.map +0 -1
- package/dist-es/pagination/DescribeMLModelsPaginator.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/protocols/Aws_json1_1.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-es/waiters/waitForBatchPredictionAvailable.js.map +0 -1
- package/dist-es/waiters/waitForDataSourceAvailable.js.map +0 -1
- package/dist-es/waiters/waitForEvaluationAvailable.js.map +0 -1
- package/dist-es/waiters/waitForMLModelAvailable.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/MachineLearning.ts +0 -1150
- package/src/MachineLearningClient.ts +0 -354
- package/src/commands/AddTagsCommand.ts +0 -94
- package/src/commands/CreateBatchPredictionCommand.ts +0 -106
- package/src/commands/CreateDataSourceFromRDSCommand.ts +0 -106
- package/src/commands/CreateDataSourceFromRedshiftCommand.ts +0 -132
- package/src/commands/CreateDataSourceFromS3Command.ts +0 -125
- package/src/commands/CreateEvaluationCommand.ts +0 -106
- package/src/commands/CreateMLModelCommand.ts +0 -114
- package/src/commands/CreateRealtimeEndpointCommand.ts +0 -95
- package/src/commands/DeleteBatchPredictionCommand.ts +0 -100
- package/src/commands/DeleteDataSourceCommand.ts +0 -98
- package/src/commands/DeleteEvaluationCommand.ts +0 -100
- package/src/commands/DeleteMLModelCommand.ts +0 -100
- package/src/commands/DeleteRealtimeEndpointCommand.ts +0 -95
- package/src/commands/DeleteTagsCommand.ts +0 -96
- package/src/commands/DescribeBatchPredictionsCommand.ts +0 -95
- package/src/commands/DescribeDataSourcesCommand.ts +0 -95
- package/src/commands/DescribeEvaluationsCommand.ts +0 -95
- package/src/commands/DescribeMLModelsCommand.ts +0 -95
- package/src/commands/DescribeTagsCommand.ts +0 -95
- package/src/commands/GetBatchPredictionCommand.ts +0 -96
- package/src/commands/GetDataSourceCommand.ts +0 -98
- package/src/commands/GetEvaluationCommand.ts +0 -95
- package/src/commands/GetMLModelCommand.ts +0 -97
- package/src/commands/PredictCommand.ts +0 -97
- package/src/commands/UpdateBatchPredictionCommand.ts +0 -96
- package/src/commands/UpdateDataSourceCommand.ts +0 -96
- package/src/commands/UpdateEvaluationCommand.ts +0 -96
- package/src/commands/UpdateMLModelCommand.ts +0 -96
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -40
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -4066
- package/src/pagination/DescribeBatchPredictionsPaginator.ts +0 -59
- package/src/pagination/DescribeDataSourcesPaginator.ts +0 -59
- package/src/pagination/DescribeEvaluationsPaginator.ts +0 -59
- package/src/pagination/DescribeMLModelsPaginator.ts +0 -59
- package/src/pagination/Interfaces.ts +0 -8
- package/src/protocols/Aws_json1_1.ts +0 -3958
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/src/waiters/waitForBatchPredictionAvailable.ts +0 -75
- package/src/waiters/waitForDataSourceAvailable.ts +0 -72
- package/src/waiters/waitForEvaluationAvailable.ts +0 -72
- package/src/waiters/waitForMLModelAvailable.ts +0 -72
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
2
|
-
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
3
|
-
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
4
|
-
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
5
|
-
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
|
|
6
|
-
import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
|
|
7
|
-
import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
8
|
-
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
9
|
-
|
|
10
|
-
// @ts-ignore: package.json will be imported from dist folders
|
|
11
|
-
import packageInfo from "../package.json";
|
|
12
|
-
import { MachineLearningClientConfig } from "./MachineLearningClient";
|
|
13
|
-
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
|
-
export const getRuntimeConfig = (config: MachineLearningClientConfig) => {
|
|
19
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
20
|
-
return {
|
|
21
|
-
...clientSharedValues,
|
|
22
|
-
...config,
|
|
23
|
-
runtime: "browser",
|
|
24
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
25
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
26
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
27
|
-
credentialDefaultProvider:
|
|
28
|
-
config?.credentialDefaultProvider ?? ((_: unknown) => () => Promise.reject(new Error("Credential is missing"))),
|
|
29
|
-
defaultUserAgentProvider:
|
|
30
|
-
config?.defaultUserAgentProvider ??
|
|
31
|
-
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
32
|
-
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
33
|
-
region: config?.region ?? invalidProvider("Region is missing"),
|
|
34
|
-
requestHandler: config?.requestHandler ?? new FetchHttpHandler(),
|
|
35
|
-
retryMode: config?.retryMode ?? (() => Promise.resolve(DEFAULT_RETRY_MODE)),
|
|
36
|
-
sha256: config?.sha256 ?? Sha256,
|
|
37
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
38
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
39
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
40
|
-
};
|
|
41
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
-
|
|
3
|
-
import { MachineLearningClientConfig } from "./MachineLearningClient";
|
|
4
|
-
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
export const getRuntimeConfig = (config: MachineLearningClientConfig) => {
|
|
10
|
-
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
11
|
-
return {
|
|
12
|
-
...browserDefaults,
|
|
13
|
-
...config,
|
|
14
|
-
runtime: "react-native",
|
|
15
|
-
sha256: config?.sha256 ?? Sha256,
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Logger as __Logger } from "@aws-sdk/types";
|
|
2
|
-
import { parseUrl } from "@aws-sdk/url-parser";
|
|
3
|
-
|
|
4
|
-
import { defaultRegionInfoProvider } from "./endpoints";
|
|
5
|
-
import { MachineLearningClientConfig } from "./MachineLearningClient";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export const getRuntimeConfig = (config: MachineLearningClientConfig) => ({
|
|
11
|
-
apiVersion: "2014-12-12",
|
|
12
|
-
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
13
|
-
logger: config?.logger ?? ({} as __Logger),
|
|
14
|
-
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
15
|
-
serviceId: config?.serviceId ?? "Machine Learning",
|
|
16
|
-
urlParser: config?.urlParser ?? parseUrl,
|
|
17
|
-
});
|
package/src/runtimeConfig.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
2
|
-
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS } from "@aws-sdk/config-resolver";
|
|
3
|
-
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
-
import { Hash } from "@aws-sdk/hash-node";
|
|
5
|
-
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
|
|
6
|
-
import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
|
|
7
|
-
import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
|
|
8
|
-
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
9
|
-
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
|
|
10
|
-
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
|
|
11
|
-
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
|
|
12
|
-
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
|
|
13
|
-
|
|
14
|
-
// @ts-ignore: package.json will be imported from dist folders
|
|
15
|
-
import packageInfo from "../package.json";
|
|
16
|
-
import { MachineLearningClientConfig } from "./MachineLearningClient";
|
|
17
|
-
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
export const getRuntimeConfig = (config: MachineLearningClientConfig) => {
|
|
23
|
-
emitWarningIfUnsupportedVersion(process.version);
|
|
24
|
-
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
25
|
-
return {
|
|
26
|
-
...clientSharedValues,
|
|
27
|
-
...config,
|
|
28
|
-
runtime: "node",
|
|
29
|
-
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
30
|
-
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
31
|
-
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
32
|
-
credentialDefaultProvider:
|
|
33
|
-
config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
34
|
-
defaultUserAgentProvider:
|
|
35
|
-
config?.defaultUserAgentProvider ??
|
|
36
|
-
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
37
|
-
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
38
|
-
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
39
|
-
requestHandler: config?.requestHandler ?? new NodeHttpHandler(),
|
|
40
|
-
retryMode: config?.retryMode ?? loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS),
|
|
41
|
-
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
42
|
-
streamCollector: config?.streamCollector ?? streamCollector,
|
|
43
|
-
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
44
|
-
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
45
|
-
};
|
|
46
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
DescribeBatchPredictionsCommand,
|
|
5
|
-
DescribeBatchPredictionsCommandInput,
|
|
6
|
-
} from "../commands/DescribeBatchPredictionsCommand";
|
|
7
|
-
import { MachineLearningClient } from "../MachineLearningClient";
|
|
8
|
-
|
|
9
|
-
const checkState = async (
|
|
10
|
-
client: MachineLearningClient,
|
|
11
|
-
input: DescribeBatchPredictionsCommandInput
|
|
12
|
-
): Promise<WaiterResult> => {
|
|
13
|
-
let reason;
|
|
14
|
-
try {
|
|
15
|
-
const result: any = await client.send(new DescribeBatchPredictionsCommand(input));
|
|
16
|
-
reason = result;
|
|
17
|
-
try {
|
|
18
|
-
const returnComparator = () => {
|
|
19
|
-
const flat_1: any[] = [].concat(...result.Results);
|
|
20
|
-
const projection_3 = flat_1.map((element_2: any) => {
|
|
21
|
-
return element_2.Status;
|
|
22
|
-
});
|
|
23
|
-
return projection_3;
|
|
24
|
-
};
|
|
25
|
-
let allStringEq_5 = returnComparator().length > 0;
|
|
26
|
-
for (const element_4 of returnComparator()) {
|
|
27
|
-
allStringEq_5 = allStringEq_5 && element_4 == "COMPLETED";
|
|
28
|
-
}
|
|
29
|
-
if (allStringEq_5) {
|
|
30
|
-
return { state: WaiterState.SUCCESS, reason };
|
|
31
|
-
}
|
|
32
|
-
} catch (e) {}
|
|
33
|
-
try {
|
|
34
|
-
const returnComparator = () => {
|
|
35
|
-
const flat_1: any[] = [].concat(...result.Results);
|
|
36
|
-
const projection_3 = flat_1.map((element_2: any) => {
|
|
37
|
-
return element_2.Status;
|
|
38
|
-
});
|
|
39
|
-
return projection_3;
|
|
40
|
-
};
|
|
41
|
-
for (const anyStringEq_4 of returnComparator()) {
|
|
42
|
-
if (anyStringEq_4 == "FAILED") {
|
|
43
|
-
return { state: WaiterState.FAILURE, reason };
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
} catch (e) {}
|
|
47
|
-
} catch (exception) {
|
|
48
|
-
reason = exception;
|
|
49
|
-
}
|
|
50
|
-
return { state: WaiterState.RETRY, reason };
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @deprecated Use waitUntilBatchPredictionAvailable instead. waitForBatchPredictionAvailable does not throw error in non-success cases.
|
|
55
|
-
*/
|
|
56
|
-
export const waitForBatchPredictionAvailable = async (
|
|
57
|
-
params: WaiterConfiguration<MachineLearningClient>,
|
|
58
|
-
input: DescribeBatchPredictionsCommandInput
|
|
59
|
-
): Promise<WaiterResult> => {
|
|
60
|
-
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
61
|
-
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
* @param params - Waiter configuration options.
|
|
66
|
-
* @param input - The input to DescribeBatchPredictionsCommand for polling.
|
|
67
|
-
*/
|
|
68
|
-
export const waitUntilBatchPredictionAvailable = async (
|
|
69
|
-
params: WaiterConfiguration<MachineLearningClient>,
|
|
70
|
-
input: DescribeBatchPredictionsCommandInput
|
|
71
|
-
): Promise<WaiterResult> => {
|
|
72
|
-
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
73
|
-
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
74
|
-
return checkExceptions(result);
|
|
75
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter";
|
|
2
|
-
|
|
3
|
-
import { DescribeDataSourcesCommand, DescribeDataSourcesCommandInput } from "../commands/DescribeDataSourcesCommand";
|
|
4
|
-
import { MachineLearningClient } from "../MachineLearningClient";
|
|
5
|
-
|
|
6
|
-
const checkState = async (
|
|
7
|
-
client: MachineLearningClient,
|
|
8
|
-
input: DescribeDataSourcesCommandInput
|
|
9
|
-
): Promise<WaiterResult> => {
|
|
10
|
-
let reason;
|
|
11
|
-
try {
|
|
12
|
-
const result: any = await client.send(new DescribeDataSourcesCommand(input));
|
|
13
|
-
reason = result;
|
|
14
|
-
try {
|
|
15
|
-
const returnComparator = () => {
|
|
16
|
-
const flat_1: any[] = [].concat(...result.Results);
|
|
17
|
-
const projection_3 = flat_1.map((element_2: any) => {
|
|
18
|
-
return element_2.Status;
|
|
19
|
-
});
|
|
20
|
-
return projection_3;
|
|
21
|
-
};
|
|
22
|
-
let allStringEq_5 = returnComparator().length > 0;
|
|
23
|
-
for (const element_4 of returnComparator()) {
|
|
24
|
-
allStringEq_5 = allStringEq_5 && element_4 == "COMPLETED";
|
|
25
|
-
}
|
|
26
|
-
if (allStringEq_5) {
|
|
27
|
-
return { state: WaiterState.SUCCESS, reason };
|
|
28
|
-
}
|
|
29
|
-
} catch (e) {}
|
|
30
|
-
try {
|
|
31
|
-
const returnComparator = () => {
|
|
32
|
-
const flat_1: any[] = [].concat(...result.Results);
|
|
33
|
-
const projection_3 = flat_1.map((element_2: any) => {
|
|
34
|
-
return element_2.Status;
|
|
35
|
-
});
|
|
36
|
-
return projection_3;
|
|
37
|
-
};
|
|
38
|
-
for (const anyStringEq_4 of returnComparator()) {
|
|
39
|
-
if (anyStringEq_4 == "FAILED") {
|
|
40
|
-
return { state: WaiterState.FAILURE, reason };
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
} catch (e) {}
|
|
44
|
-
} catch (exception) {
|
|
45
|
-
reason = exception;
|
|
46
|
-
}
|
|
47
|
-
return { state: WaiterState.RETRY, reason };
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @deprecated Use waitUntilDataSourceAvailable instead. waitForDataSourceAvailable does not throw error in non-success cases.
|
|
52
|
-
*/
|
|
53
|
-
export const waitForDataSourceAvailable = async (
|
|
54
|
-
params: WaiterConfiguration<MachineLearningClient>,
|
|
55
|
-
input: DescribeDataSourcesCommandInput
|
|
56
|
-
): Promise<WaiterResult> => {
|
|
57
|
-
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
58
|
-
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @param params - Waiter configuration options.
|
|
63
|
-
* @param input - The input to DescribeDataSourcesCommand for polling.
|
|
64
|
-
*/
|
|
65
|
-
export const waitUntilDataSourceAvailable = async (
|
|
66
|
-
params: WaiterConfiguration<MachineLearningClient>,
|
|
67
|
-
input: DescribeDataSourcesCommandInput
|
|
68
|
-
): Promise<WaiterResult> => {
|
|
69
|
-
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
70
|
-
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
71
|
-
return checkExceptions(result);
|
|
72
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter";
|
|
2
|
-
|
|
3
|
-
import { DescribeEvaluationsCommand, DescribeEvaluationsCommandInput } from "../commands/DescribeEvaluationsCommand";
|
|
4
|
-
import { MachineLearningClient } from "../MachineLearningClient";
|
|
5
|
-
|
|
6
|
-
const checkState = async (
|
|
7
|
-
client: MachineLearningClient,
|
|
8
|
-
input: DescribeEvaluationsCommandInput
|
|
9
|
-
): Promise<WaiterResult> => {
|
|
10
|
-
let reason;
|
|
11
|
-
try {
|
|
12
|
-
const result: any = await client.send(new DescribeEvaluationsCommand(input));
|
|
13
|
-
reason = result;
|
|
14
|
-
try {
|
|
15
|
-
const returnComparator = () => {
|
|
16
|
-
const flat_1: any[] = [].concat(...result.Results);
|
|
17
|
-
const projection_3 = flat_1.map((element_2: any) => {
|
|
18
|
-
return element_2.Status;
|
|
19
|
-
});
|
|
20
|
-
return projection_3;
|
|
21
|
-
};
|
|
22
|
-
let allStringEq_5 = returnComparator().length > 0;
|
|
23
|
-
for (const element_4 of returnComparator()) {
|
|
24
|
-
allStringEq_5 = allStringEq_5 && element_4 == "COMPLETED";
|
|
25
|
-
}
|
|
26
|
-
if (allStringEq_5) {
|
|
27
|
-
return { state: WaiterState.SUCCESS, reason };
|
|
28
|
-
}
|
|
29
|
-
} catch (e) {}
|
|
30
|
-
try {
|
|
31
|
-
const returnComparator = () => {
|
|
32
|
-
const flat_1: any[] = [].concat(...result.Results);
|
|
33
|
-
const projection_3 = flat_1.map((element_2: any) => {
|
|
34
|
-
return element_2.Status;
|
|
35
|
-
});
|
|
36
|
-
return projection_3;
|
|
37
|
-
};
|
|
38
|
-
for (const anyStringEq_4 of returnComparator()) {
|
|
39
|
-
if (anyStringEq_4 == "FAILED") {
|
|
40
|
-
return { state: WaiterState.FAILURE, reason };
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
} catch (e) {}
|
|
44
|
-
} catch (exception) {
|
|
45
|
-
reason = exception;
|
|
46
|
-
}
|
|
47
|
-
return { state: WaiterState.RETRY, reason };
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @deprecated Use waitUntilEvaluationAvailable instead. waitForEvaluationAvailable does not throw error in non-success cases.
|
|
52
|
-
*/
|
|
53
|
-
export const waitForEvaluationAvailable = async (
|
|
54
|
-
params: WaiterConfiguration<MachineLearningClient>,
|
|
55
|
-
input: DescribeEvaluationsCommandInput
|
|
56
|
-
): Promise<WaiterResult> => {
|
|
57
|
-
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
58
|
-
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @param params - Waiter configuration options.
|
|
63
|
-
* @param input - The input to DescribeEvaluationsCommand for polling.
|
|
64
|
-
*/
|
|
65
|
-
export const waitUntilEvaluationAvailable = async (
|
|
66
|
-
params: WaiterConfiguration<MachineLearningClient>,
|
|
67
|
-
input: DescribeEvaluationsCommandInput
|
|
68
|
-
): Promise<WaiterResult> => {
|
|
69
|
-
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
70
|
-
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
71
|
-
return checkExceptions(result);
|
|
72
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { checkExceptions, createWaiter, WaiterConfiguration, WaiterResult, WaiterState } from "@aws-sdk/util-waiter";
|
|
2
|
-
|
|
3
|
-
import { DescribeMLModelsCommand, DescribeMLModelsCommandInput } from "../commands/DescribeMLModelsCommand";
|
|
4
|
-
import { MachineLearningClient } from "../MachineLearningClient";
|
|
5
|
-
|
|
6
|
-
const checkState = async (
|
|
7
|
-
client: MachineLearningClient,
|
|
8
|
-
input: DescribeMLModelsCommandInput
|
|
9
|
-
): Promise<WaiterResult> => {
|
|
10
|
-
let reason;
|
|
11
|
-
try {
|
|
12
|
-
const result: any = await client.send(new DescribeMLModelsCommand(input));
|
|
13
|
-
reason = result;
|
|
14
|
-
try {
|
|
15
|
-
const returnComparator = () => {
|
|
16
|
-
const flat_1: any[] = [].concat(...result.Results);
|
|
17
|
-
const projection_3 = flat_1.map((element_2: any) => {
|
|
18
|
-
return element_2.Status;
|
|
19
|
-
});
|
|
20
|
-
return projection_3;
|
|
21
|
-
};
|
|
22
|
-
let allStringEq_5 = returnComparator().length > 0;
|
|
23
|
-
for (const element_4 of returnComparator()) {
|
|
24
|
-
allStringEq_5 = allStringEq_5 && element_4 == "COMPLETED";
|
|
25
|
-
}
|
|
26
|
-
if (allStringEq_5) {
|
|
27
|
-
return { state: WaiterState.SUCCESS, reason };
|
|
28
|
-
}
|
|
29
|
-
} catch (e) {}
|
|
30
|
-
try {
|
|
31
|
-
const returnComparator = () => {
|
|
32
|
-
const flat_1: any[] = [].concat(...result.Results);
|
|
33
|
-
const projection_3 = flat_1.map((element_2: any) => {
|
|
34
|
-
return element_2.Status;
|
|
35
|
-
});
|
|
36
|
-
return projection_3;
|
|
37
|
-
};
|
|
38
|
-
for (const anyStringEq_4 of returnComparator()) {
|
|
39
|
-
if (anyStringEq_4 == "FAILED") {
|
|
40
|
-
return { state: WaiterState.FAILURE, reason };
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
} catch (e) {}
|
|
44
|
-
} catch (exception) {
|
|
45
|
-
reason = exception;
|
|
46
|
-
}
|
|
47
|
-
return { state: WaiterState.RETRY, reason };
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
* @deprecated Use waitUntilMLModelAvailable instead. waitForMLModelAvailable does not throw error in non-success cases.
|
|
52
|
-
*/
|
|
53
|
-
export const waitForMLModelAvailable = async (
|
|
54
|
-
params: WaiterConfiguration<MachineLearningClient>,
|
|
55
|
-
input: DescribeMLModelsCommandInput
|
|
56
|
-
): Promise<WaiterResult> => {
|
|
57
|
-
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
58
|
-
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @param params - Waiter configuration options.
|
|
63
|
-
* @param input - The input to DescribeMLModelsCommand for polling.
|
|
64
|
-
*/
|
|
65
|
-
export const waitUntilMLModelAvailable = async (
|
|
66
|
-
params: WaiterConfiguration<MachineLearningClient>,
|
|
67
|
-
input: DescribeMLModelsCommandInput
|
|
68
|
-
): Promise<WaiterResult> => {
|
|
69
|
-
const serviceDefaults = { minDelay: 30, maxDelay: 120 };
|
|
70
|
-
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
71
|
-
return checkExceptions(result);
|
|
72
|
-
};
|
package/tsconfig.es.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "es5",
|
|
5
|
-
"module": "esnext",
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"lib": ["dom", "es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"],
|
|
8
|
-
"outDir": "dist-es"
|
|
9
|
-
}
|
|
10
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"alwaysStrict": true,
|
|
4
|
-
"target": "ES2018",
|
|
5
|
-
"module": "commonjs",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"sourceMap": true,
|
|
8
|
-
"downlevelIteration": true,
|
|
9
|
-
"importHelpers": true,
|
|
10
|
-
"noEmitHelpers": true,
|
|
11
|
-
"incremental": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"rootDir": "src",
|
|
15
|
-
"outDir": "dist-cjs",
|
|
16
|
-
"removeComments": true
|
|
17
|
-
},
|
|
18
|
-
"typedocOptions": {
|
|
19
|
-
"exclude": ["**/node_modules/**", "**/*.spec.ts", "**/protocols/*.ts", "**/e2e/*.ts", "**/endpoints.ts"],
|
|
20
|
-
"excludeNotExported": true,
|
|
21
|
-
"excludePrivate": true,
|
|
22
|
-
"hideGenerator": true,
|
|
23
|
-
"ignoreCompilerErrors": true,
|
|
24
|
-
"includeDeclarations": true,
|
|
25
|
-
"stripInternal": true,
|
|
26
|
-
"readme": "README.md",
|
|
27
|
-
"mode": "file",
|
|
28
|
-
"out": "docs",
|
|
29
|
-
"theme": "minimal",
|
|
30
|
-
"plugin": ["@aws-sdk/client-documentation-generator"]
|
|
31
|
-
},
|
|
32
|
-
"exclude": ["test/**/*"]
|
|
33
|
-
}
|