@aws-sdk/client-iotsitewise 3.181.0 → 3.183.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 +8 -0
- package/dist-es/IoTSiteWise.js +286 -293
- package/dist-es/IoTSiteWiseClient.js +22 -28
- package/dist-es/commands/AssociateAssetsCommand.js +22 -29
- package/dist-es/commands/AssociateTimeSeriesToAssetPropertyCommand.js +22 -29
- package/dist-es/commands/BatchAssociateProjectAssetsCommand.js +21 -28
- package/dist-es/commands/BatchDisassociateProjectAssetsCommand.js +21 -28
- package/dist-es/commands/BatchGetAssetPropertyAggregatesCommand.js +21 -28
- package/dist-es/commands/BatchGetAssetPropertyValueCommand.js +21 -28
- package/dist-es/commands/BatchGetAssetPropertyValueHistoryCommand.js +21 -28
- package/dist-es/commands/BatchPutAssetPropertyValueCommand.js +21 -28
- package/dist-es/commands/CreateAccessPolicyCommand.js +21 -28
- package/dist-es/commands/CreateAssetCommand.js +21 -28
- package/dist-es/commands/CreateAssetModelCommand.js +21 -28
- package/dist-es/commands/CreateBulkImportJobCommand.js +21 -28
- package/dist-es/commands/CreateDashboardCommand.js +21 -28
- package/dist-es/commands/CreateGatewayCommand.js +21 -28
- package/dist-es/commands/CreatePortalCommand.js +21 -28
- package/dist-es/commands/CreateProjectCommand.js +21 -28
- package/dist-es/commands/DeleteAccessPolicyCommand.js +21 -28
- package/dist-es/commands/DeleteAssetCommand.js +21 -28
- package/dist-es/commands/DeleteAssetModelCommand.js +21 -28
- package/dist-es/commands/DeleteDashboardCommand.js +21 -28
- package/dist-es/commands/DeleteGatewayCommand.js +22 -29
- package/dist-es/commands/DeletePortalCommand.js +21 -28
- package/dist-es/commands/DeleteProjectCommand.js +21 -28
- package/dist-es/commands/DeleteTimeSeriesCommand.js +22 -29
- package/dist-es/commands/DescribeAccessPolicyCommand.js +21 -28
- package/dist-es/commands/DescribeAssetCommand.js +21 -28
- package/dist-es/commands/DescribeAssetModelCommand.js +21 -28
- package/dist-es/commands/DescribeAssetPropertyCommand.js +21 -28
- package/dist-es/commands/DescribeBulkImportJobCommand.js +21 -28
- package/dist-es/commands/DescribeDashboardCommand.js +21 -28
- package/dist-es/commands/DescribeDefaultEncryptionConfigurationCommand.js +21 -28
- package/dist-es/commands/DescribeGatewayCapabilityConfigurationCommand.js +21 -28
- package/dist-es/commands/DescribeGatewayCommand.js +21 -28
- package/dist-es/commands/DescribeLoggingOptionsCommand.js +21 -28
- package/dist-es/commands/DescribePortalCommand.js +21 -28
- package/dist-es/commands/DescribeProjectCommand.js +21 -28
- package/dist-es/commands/DescribeStorageConfigurationCommand.js +21 -28
- package/dist-es/commands/DescribeTimeSeriesCommand.js +21 -28
- package/dist-es/commands/DisassociateAssetsCommand.js +22 -29
- package/dist-es/commands/DisassociateTimeSeriesFromAssetPropertyCommand.js +22 -29
- package/dist-es/commands/GetAssetPropertyAggregatesCommand.js +21 -28
- package/dist-es/commands/GetAssetPropertyValueCommand.js +21 -28
- package/dist-es/commands/GetAssetPropertyValueHistoryCommand.js +21 -28
- package/dist-es/commands/GetInterpolatedAssetPropertyValuesCommand.js +21 -28
- package/dist-es/commands/ListAccessPoliciesCommand.js +21 -28
- package/dist-es/commands/ListAssetModelsCommand.js +21 -28
- package/dist-es/commands/ListAssetRelationshipsCommand.js +21 -28
- package/dist-es/commands/ListAssetsCommand.js +21 -28
- package/dist-es/commands/ListAssociatedAssetsCommand.js +21 -28
- package/dist-es/commands/ListBulkImportJobsCommand.js +21 -28
- package/dist-es/commands/ListDashboardsCommand.js +21 -28
- package/dist-es/commands/ListGatewaysCommand.js +21 -28
- package/dist-es/commands/ListPortalsCommand.js +21 -28
- package/dist-es/commands/ListProjectAssetsCommand.js +21 -28
- package/dist-es/commands/ListProjectsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListTimeSeriesCommand.js +21 -28
- package/dist-es/commands/PutDefaultEncryptionConfigurationCommand.js +21 -28
- package/dist-es/commands/PutLoggingOptionsCommand.js +21 -28
- package/dist-es/commands/PutStorageConfigurationCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateAccessPolicyCommand.js +21 -28
- package/dist-es/commands/UpdateAssetCommand.js +21 -28
- package/dist-es/commands/UpdateAssetModelCommand.js +21 -28
- package/dist-es/commands/UpdateAssetPropertyCommand.js +22 -29
- package/dist-es/commands/UpdateDashboardCommand.js +21 -28
- package/dist-es/commands/UpdateGatewayCapabilityConfigurationCommand.js +21 -28
- package/dist-es/commands/UpdateGatewayCommand.js +22 -29
- package/dist-es/commands/UpdatePortalCommand.js +21 -28
- package/dist-es/commands/UpdateProjectCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/IoTSiteWiseServiceException.js +5 -10
- package/dist-es/models/models_0.js +802 -345
- package/dist-es/pagination/BatchGetAssetPropertyAggregatesPaginator.js +25 -68
- package/dist-es/pagination/BatchGetAssetPropertyValueHistoryPaginator.js +25 -68
- package/dist-es/pagination/BatchGetAssetPropertyValuePaginator.js +24 -67
- package/dist-es/pagination/GetAssetPropertyAggregatesPaginator.js +25 -68
- package/dist-es/pagination/GetAssetPropertyValueHistoryPaginator.js +25 -68
- package/dist-es/pagination/GetInterpolatedAssetPropertyValuesPaginator.js +25 -68
- package/dist-es/pagination/ListAccessPoliciesPaginator.js +25 -68
- package/dist-es/pagination/ListAssetModelsPaginator.js +25 -68
- package/dist-es/pagination/ListAssetRelationshipsPaginator.js +25 -68
- package/dist-es/pagination/ListAssetsPaginator.js +25 -68
- package/dist-es/pagination/ListAssociatedAssetsPaginator.js +25 -68
- package/dist-es/pagination/ListBulkImportJobsPaginator.js +25 -68
- package/dist-es/pagination/ListDashboardsPaginator.js +25 -68
- package/dist-es/pagination/ListGatewaysPaginator.js +25 -68
- package/dist-es/pagination/ListPortalsPaginator.js +25 -68
- package/dist-es/pagination/ListProjectAssetsPaginator.js +25 -68
- package/dist-es/pagination/ListProjectsPaginator.js +25 -68
- package/dist-es/pagination/ListTimeSeriesPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +6181 -8342
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/dist-es/waiters/waitForAssetActive.js +36 -56
- package/dist-es/waiters/waitForAssetModelActive.js +36 -56
- package/dist-es/waiters/waitForAssetModelNotExists.js +22 -42
- package/dist-es/waiters/waitForAssetNotExists.js +22 -42
- package/dist-es/waiters/waitForPortalActive.js +28 -48
- package/dist-es/waiters/waitForPortalNotExists.js +22 -42
- package/package.json +34 -34
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
3
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
@@ -12,15 +11,30 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
|
12
11
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
12
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
13
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
export const getRuntimeConfig = (config) => {
|
|
15
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
+
return {
|
|
19
|
+
...clientSharedValues,
|
|
20
|
+
...config,
|
|
21
|
+
runtime: "browser",
|
|
22
|
+
defaultsMode,
|
|
23
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
24
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
28
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
31
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
+
};
|
|
26
40
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
3
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
@@ -15,16 +14,35 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
|
|
|
15
14
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
15
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
17
16
|
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
18
|
-
export
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
export const getRuntimeConfig = (config) => {
|
|
20
18
|
emitWarningIfUnsupportedVersion(process.version);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
21
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
22
|
+
return {
|
|
23
|
+
...clientSharedValues,
|
|
24
|
+
...config,
|
|
25
|
+
runtime: "node",
|
|
26
|
+
defaultsMode,
|
|
27
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
28
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
32
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
33
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
34
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
35
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: config?.retryMode ??
|
|
37
|
+
loadNodeConfig({
|
|
38
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
39
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
40
|
+
}),
|
|
41
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
42
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
43
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
44
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
45
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
46
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
47
|
+
};
|
|
30
48
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
3
2
|
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
8
11
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { parseUrl } from "@aws-sdk/url-parser";
|
|
2
2
|
import { defaultRegionInfoProvider } from "./endpoints";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
|
|
12
|
-
});
|
|
13
|
-
};
|
|
3
|
+
export const getRuntimeConfig = (config) => ({
|
|
4
|
+
apiVersion: "2019-12-02",
|
|
5
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
6
|
+
logger: config?.logger ?? {},
|
|
7
|
+
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
8
|
+
serviceId: config?.serviceId ?? "IoTSiteWise",
|
|
9
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
10
|
+
});
|
|
@@ -1,60 +1,40 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeAssetCommand } from "../commands/DescribeAssetCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return result_1.assetStatus.state;
|
|
17
|
-
};
|
|
18
|
-
if (returnComparator() === "ACTIVE") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch (e) { }
|
|
23
|
-
try {
|
|
24
|
-
returnComparator = function () {
|
|
25
|
-
return result_1.assetStatus.state;
|
|
26
|
-
};
|
|
27
|
-
if (returnComparator() === "FAILED") {
|
|
28
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e) { }
|
|
32
|
-
return [3, 3];
|
|
33
|
-
case 2:
|
|
34
|
-
exception_1 = _a.sent();
|
|
35
|
-
reason = exception_1;
|
|
36
|
-
return [3, 3];
|
|
37
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeAssetCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.assetStatus.state;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "ACTIVE") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
38
15
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}); };
|
|
48
|
-
export var waitUntilAssetActive = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
49
|
-
var serviceDefaults, result;
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
switch (_a.label) {
|
|
52
|
-
case 0:
|
|
53
|
-
serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
54
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
55
|
-
case 1:
|
|
56
|
-
result = _a.sent();
|
|
57
|
-
return [2, checkExceptions(result)];
|
|
16
|
+
catch (e) { }
|
|
17
|
+
try {
|
|
18
|
+
const returnComparator = () => {
|
|
19
|
+
return result.assetStatus.state;
|
|
20
|
+
};
|
|
21
|
+
if (returnComparator() === "FAILED") {
|
|
22
|
+
return { state: WaiterState.FAILURE, reason };
|
|
23
|
+
}
|
|
58
24
|
}
|
|
59
|
-
|
|
60
|
-
}
|
|
25
|
+
catch (e) { }
|
|
26
|
+
}
|
|
27
|
+
catch (exception) {
|
|
28
|
+
reason = exception;
|
|
29
|
+
}
|
|
30
|
+
return { state: WaiterState.RETRY, reason };
|
|
31
|
+
};
|
|
32
|
+
export const waitForAssetActive = async (params, input) => {
|
|
33
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
34
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
35
|
+
};
|
|
36
|
+
export const waitUntilAssetActive = async (params, input) => {
|
|
37
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
38
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
39
|
+
return checkExceptions(result);
|
|
40
|
+
};
|
|
@@ -1,60 +1,40 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeAssetModelCommand } from "../commands/DescribeAssetModelCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return result_1.assetModelStatus.state;
|
|
17
|
-
};
|
|
18
|
-
if (returnComparator() === "ACTIVE") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch (e) { }
|
|
23
|
-
try {
|
|
24
|
-
returnComparator = function () {
|
|
25
|
-
return result_1.assetModelStatus.state;
|
|
26
|
-
};
|
|
27
|
-
if (returnComparator() === "FAILED") {
|
|
28
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e) { }
|
|
32
|
-
return [3, 3];
|
|
33
|
-
case 2:
|
|
34
|
-
exception_1 = _a.sent();
|
|
35
|
-
reason = exception_1;
|
|
36
|
-
return [3, 3];
|
|
37
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeAssetModelCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.assetModelStatus.state;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "ACTIVE") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
38
15
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}); };
|
|
48
|
-
export var waitUntilAssetModelActive = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
49
|
-
var serviceDefaults, result;
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
switch (_a.label) {
|
|
52
|
-
case 0:
|
|
53
|
-
serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
54
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
55
|
-
case 1:
|
|
56
|
-
result = _a.sent();
|
|
57
|
-
return [2, checkExceptions(result)];
|
|
16
|
+
catch (e) { }
|
|
17
|
+
try {
|
|
18
|
+
const returnComparator = () => {
|
|
19
|
+
return result.assetModelStatus.state;
|
|
20
|
+
};
|
|
21
|
+
if (returnComparator() === "FAILED") {
|
|
22
|
+
return { state: WaiterState.FAILURE, reason };
|
|
23
|
+
}
|
|
58
24
|
}
|
|
59
|
-
|
|
60
|
-
}
|
|
25
|
+
catch (e) { }
|
|
26
|
+
}
|
|
27
|
+
catch (exception) {
|
|
28
|
+
reason = exception;
|
|
29
|
+
}
|
|
30
|
+
return { state: WaiterState.RETRY, reason };
|
|
31
|
+
};
|
|
32
|
+
export const waitForAssetModelActive = async (params, input) => {
|
|
33
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
34
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
35
|
+
};
|
|
36
|
+
export const waitUntilAssetModelActive = async (params, input) => {
|
|
37
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
38
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
39
|
+
return checkExceptions(result);
|
|
40
|
+
};
|
|
@@ -1,45 +1,25 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeAssetModelCommand } from "../commands/DescribeAssetModelCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return [3, 3];
|
|
15
|
-
case 2:
|
|
16
|
-
exception_1 = _a.sent();
|
|
17
|
-
reason = exception_1;
|
|
18
|
-
if (exception_1.name && exception_1.name == "ResourceNotFoundException") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
return [3, 3];
|
|
22
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeAssetModelCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
}
|
|
9
|
+
catch (exception) {
|
|
10
|
+
reason = exception;
|
|
11
|
+
if (exception.name && exception.name == "ResourceNotFoundException") {
|
|
12
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
23
13
|
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
switch (_a.label) {
|
|
37
|
-
case 0:
|
|
38
|
-
serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
39
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
40
|
-
case 1:
|
|
41
|
-
result = _a.sent();
|
|
42
|
-
return [2, checkExceptions(result)];
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}); };
|
|
14
|
+
}
|
|
15
|
+
return { state: WaiterState.RETRY, reason };
|
|
16
|
+
};
|
|
17
|
+
export const waitForAssetModelNotExists = async (params, input) => {
|
|
18
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
19
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
20
|
+
};
|
|
21
|
+
export const waitUntilAssetModelNotExists = async (params, input) => {
|
|
22
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
23
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
24
|
+
return checkExceptions(result);
|
|
25
|
+
};
|
|
@@ -1,45 +1,25 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeAssetCommand } from "../commands/DescribeAssetCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return [3, 3];
|
|
15
|
-
case 2:
|
|
16
|
-
exception_1 = _a.sent();
|
|
17
|
-
reason = exception_1;
|
|
18
|
-
if (exception_1.name && exception_1.name == "ResourceNotFoundException") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
return [3, 3];
|
|
22
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeAssetCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
}
|
|
9
|
+
catch (exception) {
|
|
10
|
+
reason = exception;
|
|
11
|
+
if (exception.name && exception.name == "ResourceNotFoundException") {
|
|
12
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
23
13
|
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
switch (_a.label) {
|
|
37
|
-
case 0:
|
|
38
|
-
serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
39
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
40
|
-
case 1:
|
|
41
|
-
result = _a.sent();
|
|
42
|
-
return [2, checkExceptions(result)];
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}); };
|
|
14
|
+
}
|
|
15
|
+
return { state: WaiterState.RETRY, reason };
|
|
16
|
+
};
|
|
17
|
+
export const waitForAssetNotExists = async (params, input) => {
|
|
18
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
19
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
20
|
+
};
|
|
21
|
+
export const waitUntilAssetNotExists = async (params, input) => {
|
|
22
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
23
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
24
|
+
return checkExceptions(result);
|
|
25
|
+
};
|
|
@@ -1,51 +1,31 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribePortalCommand } from "../commands/DescribePortalCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
return result_1.portalStatus.state;
|
|
17
|
-
};
|
|
18
|
-
if (returnComparator() === "ACTIVE") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
catch (e) { }
|
|
23
|
-
return [3, 3];
|
|
24
|
-
case 2:
|
|
25
|
-
exception_1 = _a.sent();
|
|
26
|
-
reason = exception_1;
|
|
27
|
-
return [3, 3];
|
|
28
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribePortalCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
return result.portalStatus.state;
|
|
11
|
+
};
|
|
12
|
+
if (returnComparator() === "ACTIVE") {
|
|
13
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
14
|
+
}
|
|
29
15
|
}
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
case 1:
|
|
47
|
-
result = _a.sent();
|
|
48
|
-
return [2, checkExceptions(result)];
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
}); };
|
|
16
|
+
catch (e) { }
|
|
17
|
+
}
|
|
18
|
+
catch (exception) {
|
|
19
|
+
reason = exception;
|
|
20
|
+
}
|
|
21
|
+
return { state: WaiterState.RETRY, reason };
|
|
22
|
+
};
|
|
23
|
+
export const waitForPortalActive = async (params, input) => {
|
|
24
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
25
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
26
|
+
};
|
|
27
|
+
export const waitUntilPortalActive = async (params, input) => {
|
|
28
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
29
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
30
|
+
return checkExceptions(result);
|
|
31
|
+
};
|
|
@@ -1,45 +1,25 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribePortalCommand } from "../commands/DescribePortalCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return [3, 3];
|
|
15
|
-
case 2:
|
|
16
|
-
exception_1 = _a.sent();
|
|
17
|
-
reason = exception_1;
|
|
18
|
-
if (exception_1.name && exception_1.name == "ResourceNotFoundException") {
|
|
19
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
-
}
|
|
21
|
-
return [3, 3];
|
|
22
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribePortalCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
}
|
|
9
|
+
catch (exception) {
|
|
10
|
+
reason = exception;
|
|
11
|
+
if (exception.name && exception.name == "ResourceNotFoundException") {
|
|
12
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
23
13
|
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
switch (_a.label) {
|
|
37
|
-
case 0:
|
|
38
|
-
serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
39
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
40
|
-
case 1:
|
|
41
|
-
result = _a.sent();
|
|
42
|
-
return [2, checkExceptions(result)];
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}); };
|
|
14
|
+
}
|
|
15
|
+
return { state: WaiterState.RETRY, reason };
|
|
16
|
+
};
|
|
17
|
+
export const waitForPortalNotExists = async (params, input) => {
|
|
18
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
19
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
20
|
+
};
|
|
21
|
+
export const waitUntilPortalNotExists = async (params, input) => {
|
|
22
|
+
const serviceDefaults = { minDelay: 3, maxDelay: 120 };
|
|
23
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
24
|
+
return checkExceptions(result);
|
|
25
|
+
};
|