@aws-sdk/client-database-migration-service 3.180.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 +20 -0
- package/dist-cjs/protocols/Aws_json1_1.js +71 -65
- package/dist-es/DatabaseMigrationService.js +262 -269
- package/dist-es/DatabaseMigrationServiceClient.js +22 -28
- package/dist-es/commands/AddTagsToResourceCommand.js +21 -28
- package/dist-es/commands/ApplyPendingMaintenanceActionCommand.js +21 -28
- package/dist-es/commands/CancelReplicationTaskAssessmentRunCommand.js +21 -28
- package/dist-es/commands/CreateEndpointCommand.js +21 -28
- package/dist-es/commands/CreateEventSubscriptionCommand.js +21 -28
- package/dist-es/commands/CreateFleetAdvisorCollectorCommand.js +21 -28
- package/dist-es/commands/CreateReplicationInstanceCommand.js +21 -28
- package/dist-es/commands/CreateReplicationSubnetGroupCommand.js +21 -28
- package/dist-es/commands/CreateReplicationTaskCommand.js +21 -28
- package/dist-es/commands/DeleteCertificateCommand.js +21 -28
- package/dist-es/commands/DeleteConnectionCommand.js +21 -28
- package/dist-es/commands/DeleteEndpointCommand.js +21 -28
- package/dist-es/commands/DeleteEventSubscriptionCommand.js +21 -28
- package/dist-es/commands/DeleteFleetAdvisorCollectorCommand.js +22 -29
- package/dist-es/commands/DeleteFleetAdvisorDatabasesCommand.js +21 -28
- package/dist-es/commands/DeleteReplicationInstanceCommand.js +21 -28
- package/dist-es/commands/DeleteReplicationSubnetGroupCommand.js +21 -28
- package/dist-es/commands/DeleteReplicationTaskAssessmentRunCommand.js +21 -28
- package/dist-es/commands/DeleteReplicationTaskCommand.js +21 -28
- package/dist-es/commands/DescribeAccountAttributesCommand.js +21 -28
- package/dist-es/commands/DescribeApplicableIndividualAssessmentsCommand.js +21 -28
- package/dist-es/commands/DescribeCertificatesCommand.js +21 -28
- package/dist-es/commands/DescribeConnectionsCommand.js +21 -28
- package/dist-es/commands/DescribeEndpointSettingsCommand.js +21 -28
- package/dist-es/commands/DescribeEndpointTypesCommand.js +21 -28
- package/dist-es/commands/DescribeEndpointsCommand.js +21 -28
- package/dist-es/commands/DescribeEventCategoriesCommand.js +21 -28
- package/dist-es/commands/DescribeEventSubscriptionsCommand.js +21 -28
- package/dist-es/commands/DescribeEventsCommand.js +21 -28
- package/dist-es/commands/DescribeFleetAdvisorCollectorsCommand.js +21 -28
- package/dist-es/commands/DescribeFleetAdvisorDatabasesCommand.js +21 -28
- package/dist-es/commands/DescribeFleetAdvisorLsaAnalysisCommand.js +21 -28
- package/dist-es/commands/DescribeFleetAdvisorSchemaObjectSummaryCommand.js +21 -28
- package/dist-es/commands/DescribeFleetAdvisorSchemasCommand.js +21 -28
- package/dist-es/commands/DescribeOrderableReplicationInstancesCommand.js +21 -28
- package/dist-es/commands/DescribePendingMaintenanceActionsCommand.js +21 -28
- package/dist-es/commands/DescribeRefreshSchemasStatusCommand.js +21 -28
- package/dist-es/commands/DescribeReplicationInstanceTaskLogsCommand.js +21 -28
- package/dist-es/commands/DescribeReplicationInstancesCommand.js +21 -28
- package/dist-es/commands/DescribeReplicationSubnetGroupsCommand.js +21 -28
- package/dist-es/commands/DescribeReplicationTaskAssessmentResultsCommand.js +21 -28
- package/dist-es/commands/DescribeReplicationTaskAssessmentRunsCommand.js +21 -28
- package/dist-es/commands/DescribeReplicationTaskIndividualAssessmentsCommand.js +21 -28
- package/dist-es/commands/DescribeReplicationTasksCommand.js +21 -28
- package/dist-es/commands/DescribeSchemasCommand.js +21 -28
- package/dist-es/commands/DescribeTableStatisticsCommand.js +21 -28
- package/dist-es/commands/ImportCertificateCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ModifyEndpointCommand.js +21 -28
- package/dist-es/commands/ModifyEventSubscriptionCommand.js +21 -28
- package/dist-es/commands/ModifyReplicationInstanceCommand.js +21 -28
- package/dist-es/commands/ModifyReplicationSubnetGroupCommand.js +21 -28
- package/dist-es/commands/ModifyReplicationTaskCommand.js +21 -28
- package/dist-es/commands/MoveReplicationTaskCommand.js +21 -28
- package/dist-es/commands/RebootReplicationInstanceCommand.js +21 -28
- package/dist-es/commands/RefreshSchemasCommand.js +21 -28
- package/dist-es/commands/ReloadTablesCommand.js +21 -28
- package/dist-es/commands/RemoveTagsFromResourceCommand.js +21 -28
- package/dist-es/commands/RunFleetAdvisorLsaAnalysisCommand.js +22 -29
- package/dist-es/commands/StartReplicationTaskAssessmentCommand.js +21 -28
- package/dist-es/commands/StartReplicationTaskAssessmentRunCommand.js +21 -28
- package/dist-es/commands/StartReplicationTaskCommand.js +21 -28
- package/dist-es/commands/StopReplicationTaskCommand.js +21 -28
- package/dist-es/commands/TestConnectionCommand.js +21 -28
- package/dist-es/commands/UpdateSubscriptionsToEventBridgeCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/DatabaseMigrationServiceServiceException.js +5 -10
- package/dist-es/models/models_0.js +904 -471
- package/dist-es/pagination/DescribeApplicableIndividualAssessmentsPaginator.js +25 -68
- package/dist-es/pagination/DescribeCertificatesPaginator.js +25 -68
- package/dist-es/pagination/DescribeConnectionsPaginator.js +25 -68
- package/dist-es/pagination/DescribeEndpointSettingsPaginator.js +25 -68
- package/dist-es/pagination/DescribeEndpointTypesPaginator.js +25 -68
- package/dist-es/pagination/DescribeEndpointsPaginator.js +25 -68
- package/dist-es/pagination/DescribeEventSubscriptionsPaginator.js +25 -68
- package/dist-es/pagination/DescribeEventsPaginator.js +25 -68
- package/dist-es/pagination/DescribeFleetAdvisorCollectorsPaginator.js +25 -68
- package/dist-es/pagination/DescribeFleetAdvisorDatabasesPaginator.js +25 -68
- package/dist-es/pagination/DescribeFleetAdvisorLsaAnalysisPaginator.js +25 -68
- package/dist-es/pagination/DescribeFleetAdvisorSchemaObjectSummaryPaginator.js +25 -68
- package/dist-es/pagination/DescribeFleetAdvisorSchemasPaginator.js +25 -68
- package/dist-es/pagination/DescribeOrderableReplicationInstancesPaginator.js +25 -68
- package/dist-es/pagination/DescribePendingMaintenanceActionsPaginator.js +25 -68
- package/dist-es/pagination/DescribeReplicationInstanceTaskLogsPaginator.js +25 -68
- package/dist-es/pagination/DescribeReplicationInstancesPaginator.js +25 -68
- package/dist-es/pagination/DescribeReplicationSubnetGroupsPaginator.js +25 -68
- package/dist-es/pagination/DescribeReplicationTaskAssessmentResultsPaginator.js +25 -68
- package/dist-es/pagination/DescribeReplicationTaskAssessmentRunsPaginator.js +25 -68
- package/dist-es/pagination/DescribeReplicationTaskIndividualAssessmentsPaginator.js +25 -68
- package/dist-es/pagination/DescribeReplicationTasksPaginator.js +25 -68
- package/dist-es/pagination/DescribeSchemasPaginator.js +25 -68
- package/dist-es/pagination/DescribeTableStatisticsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +4646 -5418
- 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/waitForEndpointDeleted.js +49 -90
- package/dist-es/waiters/waitForReplicationInstanceAvailable.js +92 -163
- package/dist-es/waiters/waitForReplicationInstanceDeleted.js +35 -66
- package/dist-es/waiters/waitForReplicationTaskDeleted.js +91 -162
- package/dist-es/waiters/waitForReplicationTaskReady.js +148 -259
- package/dist-es/waiters/waitForReplicationTaskRunning.js +148 -259
- package/dist-es/waiters/waitForReplicationTaskStopped.js +134 -235
- package/dist-es/waiters/waitForTestConnectionSucceeds.js +50 -91
- 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: "2016-01-01",
|
|
5
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
6
|
+
logger: config?.logger ?? {},
|
|
7
|
+
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
8
|
+
serviceId: config?.serviceId ?? "Database Migration Service",
|
|
9
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
10
|
+
});
|
|
@@ -1,96 +1,55 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeEndpointsCommand } from "../commands/DescribeEndpointsCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
return projection_3;
|
|
22
|
-
};
|
|
23
|
-
try {
|
|
24
|
-
for (_a = __values(returnComparator()), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
25
|
-
anyStringEq_4 = _b.value;
|
|
26
|
-
if (anyStringEq_4 == "active") {
|
|
27
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
32
|
-
finally {
|
|
33
|
-
try {
|
|
34
|
-
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
35
|
-
}
|
|
36
|
-
finally { if (e_1) throw e_1.error; }
|
|
37
|
-
}
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeEndpointsCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
const flat_1 = [].concat(...result.Endpoints);
|
|
11
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
12
|
+
return element_2.Status;
|
|
13
|
+
});
|
|
14
|
+
return projection_3;
|
|
15
|
+
};
|
|
16
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
17
|
+
if (anyStringEq_4 == "active") {
|
|
18
|
+
return { state: WaiterState.FAILURE, reason };
|
|
38
19
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
57
|
-
finally {
|
|
58
|
-
try {
|
|
59
|
-
if (_d && !_d.done && (_f = _c.return)) _f.call(_c);
|
|
60
|
-
}
|
|
61
|
-
finally { if (e_2) throw e_2.error; }
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (e) { }
|
|
65
|
-
return [3, 3];
|
|
66
|
-
case 2:
|
|
67
|
-
exception_1 = _g.sent();
|
|
68
|
-
reason = exception_1;
|
|
69
|
-
if (exception_1.name && exception_1.name == "ResourceNotFoundFault") {
|
|
70
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
catch (e) { }
|
|
23
|
+
try {
|
|
24
|
+
const returnComparator = () => {
|
|
25
|
+
const flat_1 = [].concat(...result.Endpoints);
|
|
26
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
27
|
+
return element_2.Status;
|
|
28
|
+
});
|
|
29
|
+
return projection_3;
|
|
30
|
+
};
|
|
31
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
32
|
+
if (anyStringEq_4 == "creating") {
|
|
33
|
+
return { state: WaiterState.FAILURE, reason };
|
|
71
34
|
}
|
|
72
|
-
|
|
73
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
35
|
+
}
|
|
74
36
|
}
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
82
|
-
});
|
|
83
|
-
}); };
|
|
84
|
-
export var waitUntilEndpointDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
85
|
-
var serviceDefaults, result;
|
|
86
|
-
return __generator(this, function (_a) {
|
|
87
|
-
switch (_a.label) {
|
|
88
|
-
case 0:
|
|
89
|
-
serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
90
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
91
|
-
case 1:
|
|
92
|
-
result = _a.sent();
|
|
93
|
-
return [2, checkExceptions(result)];
|
|
37
|
+
catch (e) { }
|
|
38
|
+
}
|
|
39
|
+
catch (exception) {
|
|
40
|
+
reason = exception;
|
|
41
|
+
if (exception.name && exception.name == "ResourceNotFoundFault") {
|
|
42
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
94
43
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
44
|
+
}
|
|
45
|
+
return { state: WaiterState.RETRY, reason };
|
|
46
|
+
};
|
|
47
|
+
export const waitForEndpointDeleted = async (params, input) => {
|
|
48
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
49
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
50
|
+
};
|
|
51
|
+
export const waitUntilEndpointDeleted = async (params, input) => {
|
|
52
|
+
const serviceDefaults = { minDelay: 5, maxDelay: 120 };
|
|
53
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
54
|
+
return checkExceptions(result);
|
|
55
|
+
};
|
|
@@ -1,170 +1,99 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
|
|
2
1
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
3
2
|
import { DescribeReplicationInstancesCommand, } from "../commands/DescribeReplicationInstancesCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
if (allStringEq_5) {
|
|
38
|
-
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
catch (e) { }
|
|
42
|
-
try {
|
|
43
|
-
returnComparator = function () {
|
|
44
|
-
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.ReplicationInstances), false));
|
|
45
|
-
var projection_3 = flat_1.map(function (element_2) {
|
|
46
|
-
return element_2.ReplicationInstanceStatus;
|
|
47
|
-
});
|
|
48
|
-
return projection_3;
|
|
49
|
-
};
|
|
50
|
-
try {
|
|
51
|
-
for (_c = __values(returnComparator()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
52
|
-
anyStringEq_4 = _d.value;
|
|
53
|
-
if (anyStringEq_4 == "deleting") {
|
|
54
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
59
|
-
finally {
|
|
60
|
-
try {
|
|
61
|
-
if (_d && !_d.done && (_m = _c.return)) _m.call(_c);
|
|
62
|
-
}
|
|
63
|
-
finally { if (e_2) throw e_2.error; }
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
catch (e) { }
|
|
67
|
-
try {
|
|
68
|
-
returnComparator = function () {
|
|
69
|
-
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.ReplicationInstances), false));
|
|
70
|
-
var projection_3 = flat_1.map(function (element_2) {
|
|
71
|
-
return element_2.ReplicationInstanceStatus;
|
|
72
|
-
});
|
|
73
|
-
return projection_3;
|
|
74
|
-
};
|
|
75
|
-
try {
|
|
76
|
-
for (_e = __values(returnComparator()), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
77
|
-
anyStringEq_4 = _f.value;
|
|
78
|
-
if (anyStringEq_4 == "incompatible-credentials") {
|
|
79
|
-
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
84
|
-
finally {
|
|
85
|
-
try {
|
|
86
|
-
if (_f && !_f.done && (_o = _e.return)) _o.call(_e);
|
|
87
|
-
}
|
|
88
|
-
finally { if (e_3) throw e_3.error; }
|
|
89
|
-
}
|
|
3
|
+
const checkState = async (client, input) => {
|
|
4
|
+
let reason;
|
|
5
|
+
try {
|
|
6
|
+
const result = await client.send(new DescribeReplicationInstancesCommand(input));
|
|
7
|
+
reason = result;
|
|
8
|
+
try {
|
|
9
|
+
const returnComparator = () => {
|
|
10
|
+
const flat_1 = [].concat(...result.ReplicationInstances);
|
|
11
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
12
|
+
return element_2.ReplicationInstanceStatus;
|
|
13
|
+
});
|
|
14
|
+
return projection_3;
|
|
15
|
+
};
|
|
16
|
+
let allStringEq_5 = returnComparator().length > 0;
|
|
17
|
+
for (const element_4 of returnComparator()) {
|
|
18
|
+
allStringEq_5 = allStringEq_5 && element_4 == "available";
|
|
19
|
+
}
|
|
20
|
+
if (allStringEq_5) {
|
|
21
|
+
return { state: WaiterState.SUCCESS, reason };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch (e) { }
|
|
25
|
+
try {
|
|
26
|
+
const returnComparator = () => {
|
|
27
|
+
const flat_1 = [].concat(...result.ReplicationInstances);
|
|
28
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
29
|
+
return element_2.ReplicationInstanceStatus;
|
|
30
|
+
});
|
|
31
|
+
return projection_3;
|
|
32
|
+
};
|
|
33
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
34
|
+
if (anyStringEq_4 == "deleting") {
|
|
35
|
+
return { state: WaiterState.FAILURE, reason };
|
|
90
36
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
109
|
-
finally {
|
|
110
|
-
try {
|
|
111
|
-
if (_h && !_h.done && (_p = _g.return)) _p.call(_g);
|
|
112
|
-
}
|
|
113
|
-
finally { if (e_4) throw e_4.error; }
|
|
114
|
-
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (e) { }
|
|
40
|
+
try {
|
|
41
|
+
const returnComparator = () => {
|
|
42
|
+
const flat_1 = [].concat(...result.ReplicationInstances);
|
|
43
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
44
|
+
return element_2.ReplicationInstanceStatus;
|
|
45
|
+
});
|
|
46
|
+
return projection_3;
|
|
47
|
+
};
|
|
48
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
49
|
+
if (anyStringEq_4 == "incompatible-credentials") {
|
|
50
|
+
return { state: WaiterState.FAILURE, reason };
|
|
115
51
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
134
|
-
finally {
|
|
135
|
-
try {
|
|
136
|
-
if (_k && !_k.done && (_q = _j.return)) _q.call(_j);
|
|
137
|
-
}
|
|
138
|
-
finally { if (e_5) throw e_5.error; }
|
|
139
|
-
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (e) { }
|
|
55
|
+
try {
|
|
56
|
+
const returnComparator = () => {
|
|
57
|
+
const flat_1 = [].concat(...result.ReplicationInstances);
|
|
58
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
59
|
+
return element_2.ReplicationInstanceStatus;
|
|
60
|
+
});
|
|
61
|
+
return projection_3;
|
|
62
|
+
};
|
|
63
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
64
|
+
if (anyStringEq_4 == "incompatible-network") {
|
|
65
|
+
return { state: WaiterState.FAILURE, reason };
|
|
140
66
|
}
|
|
141
|
-
|
|
142
|
-
return [3, 3];
|
|
143
|
-
case 2:
|
|
144
|
-
exception_1 = _r.sent();
|
|
145
|
-
reason = exception_1;
|
|
146
|
-
return [3, 3];
|
|
147
|
-
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
67
|
+
}
|
|
148
68
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
serviceDefaults = { minDelay: 60, maxDelay: 120 };
|
|
164
|
-
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
165
|
-
case 1:
|
|
166
|
-
result = _a.sent();
|
|
167
|
-
return [2, checkExceptions(result)];
|
|
69
|
+
catch (e) { }
|
|
70
|
+
try {
|
|
71
|
+
const returnComparator = () => {
|
|
72
|
+
const flat_1 = [].concat(...result.ReplicationInstances);
|
|
73
|
+
const projection_3 = flat_1.map((element_2) => {
|
|
74
|
+
return element_2.ReplicationInstanceStatus;
|
|
75
|
+
});
|
|
76
|
+
return projection_3;
|
|
77
|
+
};
|
|
78
|
+
for (const anyStringEq_4 of returnComparator()) {
|
|
79
|
+
if (anyStringEq_4 == "inaccessible-encryption-credentials") {
|
|
80
|
+
return { state: WaiterState.FAILURE, reason };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
168
83
|
}
|
|
169
|
-
|
|
170
|
-
}
|
|
84
|
+
catch (e) { }
|
|
85
|
+
}
|
|
86
|
+
catch (exception) {
|
|
87
|
+
reason = exception;
|
|
88
|
+
}
|
|
89
|
+
return { state: WaiterState.RETRY, reason };
|
|
90
|
+
};
|
|
91
|
+
export const waitForReplicationInstanceAvailable = async (params, input) => {
|
|
92
|
+
const serviceDefaults = { minDelay: 60, maxDelay: 120 };
|
|
93
|
+
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
94
|
+
};
|
|
95
|
+
export const waitUntilReplicationInstanceAvailable = async (params, input) => {
|
|
96
|
+
const serviceDefaults = { minDelay: 60, maxDelay: 120 };
|
|
97
|
+
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
98
|
+
return checkExceptions(result);
|
|
99
|
+
};
|