@aws-sdk/client-elasticache 3.183.0 → 3.185.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 +11 -0
- package/dist-cjs/protocols/Aws_query.js +2 -2
- package/dist-es/ElastiCache.js +269 -262
- package/dist-es/ElastiCacheClient.js +28 -22
- package/dist-es/commands/AddTagsToResourceCommand.js +28 -21
- package/dist-es/commands/AuthorizeCacheSecurityGroupIngressCommand.js +28 -21
- package/dist-es/commands/BatchApplyUpdateActionCommand.js +28 -21
- package/dist-es/commands/BatchStopUpdateActionCommand.js +28 -21
- package/dist-es/commands/CompleteMigrationCommand.js +28 -21
- package/dist-es/commands/CopySnapshotCommand.js +28 -21
- package/dist-es/commands/CreateCacheClusterCommand.js +28 -21
- package/dist-es/commands/CreateCacheParameterGroupCommand.js +28 -21
- package/dist-es/commands/CreateCacheSecurityGroupCommand.js +28 -21
- package/dist-es/commands/CreateCacheSubnetGroupCommand.js +28 -21
- package/dist-es/commands/CreateGlobalReplicationGroupCommand.js +28 -21
- package/dist-es/commands/CreateReplicationGroupCommand.js +28 -21
- package/dist-es/commands/CreateSnapshotCommand.js +28 -21
- package/dist-es/commands/CreateUserCommand.js +28 -21
- package/dist-es/commands/CreateUserGroupCommand.js +28 -21
- package/dist-es/commands/DecreaseNodeGroupsInGlobalReplicationGroupCommand.js +28 -21
- package/dist-es/commands/DecreaseReplicaCountCommand.js +28 -21
- package/dist-es/commands/DeleteCacheClusterCommand.js +28 -21
- package/dist-es/commands/DeleteCacheParameterGroupCommand.js +29 -22
- package/dist-es/commands/DeleteCacheSecurityGroupCommand.js +29 -22
- package/dist-es/commands/DeleteCacheSubnetGroupCommand.js +29 -22
- package/dist-es/commands/DeleteGlobalReplicationGroupCommand.js +28 -21
- package/dist-es/commands/DeleteReplicationGroupCommand.js +28 -21
- package/dist-es/commands/DeleteSnapshotCommand.js +28 -21
- package/dist-es/commands/DeleteUserCommand.js +28 -21
- package/dist-es/commands/DeleteUserGroupCommand.js +28 -21
- package/dist-es/commands/DescribeCacheClustersCommand.js +28 -21
- package/dist-es/commands/DescribeCacheEngineVersionsCommand.js +28 -21
- package/dist-es/commands/DescribeCacheParameterGroupsCommand.js +28 -21
- package/dist-es/commands/DescribeCacheParametersCommand.js +28 -21
- package/dist-es/commands/DescribeCacheSecurityGroupsCommand.js +28 -21
- package/dist-es/commands/DescribeCacheSubnetGroupsCommand.js +28 -21
- package/dist-es/commands/DescribeEngineDefaultParametersCommand.js +28 -21
- package/dist-es/commands/DescribeEventsCommand.js +28 -21
- package/dist-es/commands/DescribeGlobalReplicationGroupsCommand.js +28 -21
- package/dist-es/commands/DescribeReplicationGroupsCommand.js +28 -21
- package/dist-es/commands/DescribeReservedCacheNodesCommand.js +28 -21
- package/dist-es/commands/DescribeReservedCacheNodesOfferingsCommand.js +28 -21
- package/dist-es/commands/DescribeServiceUpdatesCommand.js +28 -21
- package/dist-es/commands/DescribeSnapshotsCommand.js +28 -21
- package/dist-es/commands/DescribeUpdateActionsCommand.js +28 -21
- package/dist-es/commands/DescribeUserGroupsCommand.js +28 -21
- package/dist-es/commands/DescribeUsersCommand.js +28 -21
- package/dist-es/commands/DisassociateGlobalReplicationGroupCommand.js +28 -21
- package/dist-es/commands/FailoverGlobalReplicationGroupCommand.js +28 -21
- package/dist-es/commands/IncreaseNodeGroupsInGlobalReplicationGroupCommand.js +28 -21
- package/dist-es/commands/IncreaseReplicaCountCommand.js +28 -21
- package/dist-es/commands/ListAllowedNodeTypeModificationsCommand.js +28 -21
- package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
- package/dist-es/commands/ModifyCacheClusterCommand.js +28 -21
- package/dist-es/commands/ModifyCacheParameterGroupCommand.js +28 -21
- package/dist-es/commands/ModifyCacheSubnetGroupCommand.js +28 -21
- package/dist-es/commands/ModifyGlobalReplicationGroupCommand.js +28 -21
- package/dist-es/commands/ModifyReplicationGroupCommand.js +28 -21
- package/dist-es/commands/ModifyReplicationGroupShardConfigurationCommand.js +28 -21
- package/dist-es/commands/ModifyUserCommand.js +28 -21
- package/dist-es/commands/ModifyUserGroupCommand.js +28 -21
- package/dist-es/commands/PurchaseReservedCacheNodesOfferingCommand.js +28 -21
- package/dist-es/commands/RebalanceSlotsInGlobalReplicationGroupCommand.js +28 -21
- package/dist-es/commands/RebootCacheClusterCommand.js +28 -21
- package/dist-es/commands/RemoveTagsFromResourceCommand.js +28 -21
- package/dist-es/commands/ResetCacheParameterGroupCommand.js +28 -21
- package/dist-es/commands/RevokeCacheSecurityGroupIngressCommand.js +28 -21
- package/dist-es/commands/StartMigrationCommand.js +28 -21
- package/dist-es/commands/TestFailoverCommand.js +28 -21
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/ElastiCacheServiceException.js +10 -5
- package/dist-es/models/models_0.js +985 -1344
- package/dist-es/pagination/DescribeCacheClustersPaginator.js +68 -25
- package/dist-es/pagination/DescribeCacheEngineVersionsPaginator.js +68 -25
- package/dist-es/pagination/DescribeCacheParameterGroupsPaginator.js +68 -25
- package/dist-es/pagination/DescribeCacheParametersPaginator.js +68 -25
- package/dist-es/pagination/DescribeCacheSecurityGroupsPaginator.js +68 -25
- package/dist-es/pagination/DescribeCacheSubnetGroupsPaginator.js +68 -25
- package/dist-es/pagination/DescribeEngineDefaultParametersPaginator.js +68 -25
- package/dist-es/pagination/DescribeEventsPaginator.js +68 -25
- package/dist-es/pagination/DescribeGlobalReplicationGroupsPaginator.js +68 -25
- package/dist-es/pagination/DescribeReplicationGroupsPaginator.js +68 -25
- package/dist-es/pagination/DescribeReservedCacheNodesOfferingsPaginator.js +68 -25
- package/dist-es/pagination/DescribeReservedCacheNodesPaginator.js +68 -25
- package/dist-es/pagination/DescribeServiceUpdatesPaginator.js +68 -25
- package/dist-es/pagination/DescribeSnapshotsPaginator.js +68 -25
- package/dist-es/pagination/DescribeUpdateActionsPaginator.js +68 -25
- package/dist-es/pagination/DescribeUserGroupsPaginator.js +68 -25
- package/dist-es/pagination/DescribeUsersPaginator.js +68 -25
- package/dist-es/protocols/Aws_query.js +7362 -5557
- package/dist-es/runtimeConfig.browser.js +12 -26
- package/dist-es/runtimeConfig.js +12 -30
- package/dist-es/runtimeConfig.native.js +5 -8
- package/dist-es/runtimeConfig.shared.js +11 -8
- package/dist-es/waiters/waitForCacheClusterAvailable.js +163 -92
- package/dist-es/waiters/waitForCacheClusterDeleted.js +213 -122
- package/dist-es/waiters/waitForReplicationGroupAvailable.js +91 -50
- package/dist-es/waiters/waitForReplicationGroupDeleted.js +93 -52
- package/package.json +5 -5
|
@@ -1,132 +1,223 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
|
|
1
2
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
2
3
|
import { DescribeCacheClustersCommand, } from "../commands/DescribeCacheClustersCommand";
|
|
3
|
-
|
|
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
|
-
|
|
4
|
+
var checkState = function (client, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var reason, result_1, returnComparator, allStringEq_5, _a, _b, element_4, returnComparator, _c, _d, anyStringEq_4, returnComparator, _e, _f, anyStringEq_4, returnComparator, _g, _h, anyStringEq_4, returnComparator, _j, _k, anyStringEq_4, returnComparator, _l, _m, anyStringEq_4, returnComparator, _o, _p, anyStringEq_4, exception_1;
|
|
6
|
+
var e_1, _q, e_2, _r, e_3, _s, e_4, _t, e_5, _u, e_6, _v, e_7, _w;
|
|
7
|
+
return __generator(this, function (_x) {
|
|
8
|
+
switch (_x.label) {
|
|
9
|
+
case 0:
|
|
10
|
+
_x.trys.push([0, 2, , 3]);
|
|
11
|
+
return [4, client.send(new DescribeCacheClustersCommand(input))];
|
|
12
|
+
case 1:
|
|
13
|
+
result_1 = _x.sent();
|
|
14
|
+
reason = result_1;
|
|
15
|
+
try {
|
|
16
|
+
returnComparator = function () {
|
|
17
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.CacheClusters), false));
|
|
18
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
19
|
+
return element_2.CacheClusterStatus;
|
|
20
|
+
});
|
|
21
|
+
return projection_3;
|
|
22
|
+
};
|
|
23
|
+
allStringEq_5 = returnComparator().length > 0;
|
|
24
|
+
try {
|
|
25
|
+
for (_a = __values(returnComparator()), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
26
|
+
element_4 = _b.value;
|
|
27
|
+
allStringEq_5 = allStringEq_5 && element_4 == "deleted";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
31
|
+
finally {
|
|
32
|
+
try {
|
|
33
|
+
if (_b && !_b.done && (_q = _a.return)) _q.call(_a);
|
|
34
|
+
}
|
|
35
|
+
finally { if (e_1) throw e_1.error; }
|
|
36
|
+
}
|
|
37
|
+
if (allStringEq_5) {
|
|
38
|
+
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
catch (e) { }
|
|
42
|
+
try {
|
|
43
|
+
returnComparator = function () {
|
|
44
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.CacheClusters), false));
|
|
45
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
46
|
+
return element_2.CacheClusterStatus;
|
|
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 == "available") {
|
|
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 && (_r = _c.return)) _r.call(_c);
|
|
62
|
+
}
|
|
63
|
+
finally { if (e_2) throw e_2.error; }
|
|
64
|
+
}
|
|
51
65
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
catch (e) { }
|
|
67
|
+
try {
|
|
68
|
+
returnComparator = function () {
|
|
69
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.CacheClusters), false));
|
|
70
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
71
|
+
return element_2.CacheClusterStatus;
|
|
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 == "creating") {
|
|
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 && (_s = _e.return)) _s.call(_e);
|
|
87
|
+
}
|
|
88
|
+
finally { if (e_3) throw e_3.error; }
|
|
89
|
+
}
|
|
66
90
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
91
|
+
catch (e) { }
|
|
92
|
+
try {
|
|
93
|
+
returnComparator = function () {
|
|
94
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.CacheClusters), false));
|
|
95
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
96
|
+
return element_2.CacheClusterStatus;
|
|
97
|
+
});
|
|
98
|
+
return projection_3;
|
|
99
|
+
};
|
|
100
|
+
try {
|
|
101
|
+
for (_g = __values(returnComparator()), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
102
|
+
anyStringEq_4 = _h.value;
|
|
103
|
+
if (anyStringEq_4 == "incompatible-network") {
|
|
104
|
+
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
109
|
+
finally {
|
|
110
|
+
try {
|
|
111
|
+
if (_h && !_h.done && (_t = _g.return)) _t.call(_g);
|
|
112
|
+
}
|
|
113
|
+
finally { if (e_4) throw e_4.error; }
|
|
114
|
+
}
|
|
81
115
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
116
|
+
catch (e) { }
|
|
117
|
+
try {
|
|
118
|
+
returnComparator = function () {
|
|
119
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.CacheClusters), false));
|
|
120
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
121
|
+
return element_2.CacheClusterStatus;
|
|
122
|
+
});
|
|
123
|
+
return projection_3;
|
|
124
|
+
};
|
|
125
|
+
try {
|
|
126
|
+
for (_j = __values(returnComparator()), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
127
|
+
anyStringEq_4 = _k.value;
|
|
128
|
+
if (anyStringEq_4 == "modifying") {
|
|
129
|
+
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
134
|
+
finally {
|
|
135
|
+
try {
|
|
136
|
+
if (_k && !_k.done && (_u = _j.return)) _u.call(_j);
|
|
137
|
+
}
|
|
138
|
+
finally { if (e_5) throw e_5.error; }
|
|
139
|
+
}
|
|
96
140
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
141
|
+
catch (e) { }
|
|
142
|
+
try {
|
|
143
|
+
returnComparator = function () {
|
|
144
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.CacheClusters), false));
|
|
145
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
146
|
+
return element_2.CacheClusterStatus;
|
|
147
|
+
});
|
|
148
|
+
return projection_3;
|
|
149
|
+
};
|
|
150
|
+
try {
|
|
151
|
+
for (_l = __values(returnComparator()), _m = _l.next(); !_m.done; _m = _l.next()) {
|
|
152
|
+
anyStringEq_4 = _m.value;
|
|
153
|
+
if (anyStringEq_4 == "restore-failed") {
|
|
154
|
+
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
159
|
+
finally {
|
|
160
|
+
try {
|
|
161
|
+
if (_m && !_m.done && (_v = _l.return)) _v.call(_l);
|
|
162
|
+
}
|
|
163
|
+
finally { if (e_6) throw e_6.error; }
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
catch (e) { }
|
|
167
|
+
try {
|
|
168
|
+
returnComparator = function () {
|
|
169
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.CacheClusters), false));
|
|
170
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
171
|
+
return element_2.CacheClusterStatus;
|
|
172
|
+
});
|
|
173
|
+
return projection_3;
|
|
174
|
+
};
|
|
175
|
+
try {
|
|
176
|
+
for (_o = __values(returnComparator()), _p = _o.next(); !_p.done; _p = _o.next()) {
|
|
177
|
+
anyStringEq_4 = _p.value;
|
|
178
|
+
if (anyStringEq_4 == "snapshotting") {
|
|
179
|
+
return [2, { state: WaiterState.FAILURE, reason: reason }];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
184
|
+
finally {
|
|
185
|
+
try {
|
|
186
|
+
if (_p && !_p.done && (_w = _o.return)) _w.call(_o);
|
|
187
|
+
}
|
|
188
|
+
finally { if (e_7) throw e_7.error; }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
catch (e) { }
|
|
192
|
+
return [3, 3];
|
|
193
|
+
case 2:
|
|
194
|
+
exception_1 = _x.sent();
|
|
195
|
+
reason = exception_1;
|
|
196
|
+
if (exception_1.name && exception_1.name == "CacheClusterNotFound") {
|
|
197
|
+
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
111
198
|
}
|
|
112
|
-
|
|
199
|
+
return [3, 3];
|
|
200
|
+
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
113
201
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
202
|
+
});
|
|
203
|
+
}); };
|
|
204
|
+
export var waitForCacheClusterDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
205
|
+
var serviceDefaults;
|
|
206
|
+
return __generator(this, function (_a) {
|
|
207
|
+
serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
208
|
+
return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
209
|
+
});
|
|
210
|
+
}); };
|
|
211
|
+
export var waitUntilCacheClusterDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
212
|
+
var serviceDefaults, result;
|
|
213
|
+
return __generator(this, function (_a) {
|
|
214
|
+
switch (_a.label) {
|
|
215
|
+
case 0:
|
|
216
|
+
serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
217
|
+
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
218
|
+
case 1:
|
|
219
|
+
result = _a.sent();
|
|
220
|
+
return [2, checkExceptions(result)];
|
|
120
221
|
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
};
|
|
124
|
-
export const waitForCacheClusterDeleted = async (params, input) => {
|
|
125
|
-
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
126
|
-
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
127
|
-
};
|
|
128
|
-
export const waitUntilCacheClusterDeleted = async (params, input) => {
|
|
129
|
-
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
130
|
-
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
131
|
-
return checkExceptions(result);
|
|
132
|
-
};
|
|
222
|
+
});
|
|
223
|
+
}); };
|
|
@@ -1,54 +1,95 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
|
|
1
2
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
2
3
|
import { DescribeReplicationGroupsCommand, } from "../commands/DescribeReplicationGroupsCommand";
|
|
3
|
-
|
|
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
|
-
|
|
4
|
+
var checkState = function (client, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var reason, result_1, returnComparator, allStringEq_5, _a, _b, element_4, returnComparator, _c, _d, anyStringEq_4, exception_1;
|
|
6
|
+
var e_1, _e, e_2, _f;
|
|
7
|
+
return __generator(this, function (_g) {
|
|
8
|
+
switch (_g.label) {
|
|
9
|
+
case 0:
|
|
10
|
+
_g.trys.push([0, 2, , 3]);
|
|
11
|
+
return [4, client.send(new DescribeReplicationGroupsCommand(input))];
|
|
12
|
+
case 1:
|
|
13
|
+
result_1 = _g.sent();
|
|
14
|
+
reason = result_1;
|
|
15
|
+
try {
|
|
16
|
+
returnComparator = function () {
|
|
17
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.ReplicationGroups), false));
|
|
18
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
19
|
+
return element_2.Status;
|
|
20
|
+
});
|
|
21
|
+
return projection_3;
|
|
22
|
+
};
|
|
23
|
+
allStringEq_5 = returnComparator().length > 0;
|
|
24
|
+
try {
|
|
25
|
+
for (_a = __values(returnComparator()), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
26
|
+
element_4 = _b.value;
|
|
27
|
+
allStringEq_5 = allStringEq_5 && element_4 == "available";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
31
|
+
finally {
|
|
32
|
+
try {
|
|
33
|
+
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
34
|
+
}
|
|
35
|
+
finally { if (e_1) throw e_1.error; }
|
|
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.ReplicationGroups), false));
|
|
45
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
46
|
+
return element_2.Status;
|
|
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 == "deleted") {
|
|
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 && (_f = _c.return)) _f.call(_c);
|
|
62
|
+
}
|
|
63
|
+
finally { if (e_2) throw e_2.error; }
|
|
64
|
+
}
|
|
36
65
|
}
|
|
37
|
-
|
|
66
|
+
catch (e) { }
|
|
67
|
+
return [3, 3];
|
|
68
|
+
case 2:
|
|
69
|
+
exception_1 = _g.sent();
|
|
70
|
+
reason = exception_1;
|
|
71
|
+
return [3, 3];
|
|
72
|
+
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}); };
|
|
76
|
+
export var waitForReplicationGroupAvailable = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
77
|
+
var serviceDefaults;
|
|
78
|
+
return __generator(this, function (_a) {
|
|
79
|
+
serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
80
|
+
return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
81
|
+
});
|
|
82
|
+
}); };
|
|
83
|
+
export var waitUntilReplicationGroupAvailable = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
+
var serviceDefaults, result;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
switch (_a.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
89
|
+
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
90
|
+
case 1:
|
|
91
|
+
result = _a.sent();
|
|
92
|
+
return [2, checkExceptions(result)];
|
|
38
93
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
catch (exception) {
|
|
42
|
-
reason = exception;
|
|
43
|
-
}
|
|
44
|
-
return { state: WaiterState.RETRY, reason };
|
|
45
|
-
};
|
|
46
|
-
export const waitForReplicationGroupAvailable = async (params, input) => {
|
|
47
|
-
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
48
|
-
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
49
|
-
};
|
|
50
|
-
export const waitUntilReplicationGroupAvailable = async (params, input) => {
|
|
51
|
-
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
52
|
-
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
53
|
-
return checkExceptions(result);
|
|
54
|
-
};
|
|
94
|
+
});
|
|
95
|
+
}); };
|
|
@@ -1,57 +1,98 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
|
|
1
2
|
import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
|
|
2
3
|
import { DescribeReplicationGroupsCommand, } from "../commands/DescribeReplicationGroupsCommand";
|
|
3
|
-
|
|
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
|
-
|
|
4
|
+
var checkState = function (client, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
|
+
var reason, result_1, returnComparator, allStringEq_5, _a, _b, element_4, returnComparator, _c, _d, anyStringEq_4, exception_1;
|
|
6
|
+
var e_1, _e, e_2, _f;
|
|
7
|
+
return __generator(this, function (_g) {
|
|
8
|
+
switch (_g.label) {
|
|
9
|
+
case 0:
|
|
10
|
+
_g.trys.push([0, 2, , 3]);
|
|
11
|
+
return [4, client.send(new DescribeReplicationGroupsCommand(input))];
|
|
12
|
+
case 1:
|
|
13
|
+
result_1 = _g.sent();
|
|
14
|
+
reason = result_1;
|
|
15
|
+
try {
|
|
16
|
+
returnComparator = function () {
|
|
17
|
+
var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.ReplicationGroups), false));
|
|
18
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
19
|
+
return element_2.Status;
|
|
20
|
+
});
|
|
21
|
+
return projection_3;
|
|
22
|
+
};
|
|
23
|
+
allStringEq_5 = returnComparator().length > 0;
|
|
24
|
+
try {
|
|
25
|
+
for (_a = __values(returnComparator()), _b = _a.next(); !_b.done; _b = _a.next()) {
|
|
26
|
+
element_4 = _b.value;
|
|
27
|
+
allStringEq_5 = allStringEq_5 && element_4 == "deleted";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
31
|
+
finally {
|
|
32
|
+
try {
|
|
33
|
+
if (_b && !_b.done && (_e = _a.return)) _e.call(_a);
|
|
34
|
+
}
|
|
35
|
+
finally { if (e_1) throw e_1.error; }
|
|
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.ReplicationGroups), false));
|
|
45
|
+
var projection_3 = flat_1.map(function (element_2) {
|
|
46
|
+
return element_2.Status;
|
|
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 == "available") {
|
|
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 && (_f = _c.return)) _f.call(_c);
|
|
62
|
+
}
|
|
63
|
+
finally { if (e_2) throw e_2.error; }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
catch (e) { }
|
|
67
|
+
return [3, 3];
|
|
68
|
+
case 2:
|
|
69
|
+
exception_1 = _g.sent();
|
|
70
|
+
reason = exception_1;
|
|
71
|
+
if (exception_1.name && exception_1.name == "ReplicationGroupNotFoundFault") {
|
|
72
|
+
return [2, { state: WaiterState.SUCCESS, reason: reason }];
|
|
36
73
|
}
|
|
37
|
-
|
|
74
|
+
return [3, 3];
|
|
75
|
+
case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
|
|
38
76
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
77
|
+
});
|
|
78
|
+
}); };
|
|
79
|
+
export var waitForReplicationGroupDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
80
|
+
var serviceDefaults;
|
|
81
|
+
return __generator(this, function (_a) {
|
|
82
|
+
serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
83
|
+
return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
84
|
+
});
|
|
85
|
+
}); };
|
|
86
|
+
export var waitUntilReplicationGroupDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
|
|
87
|
+
var serviceDefaults, result;
|
|
88
|
+
return __generator(this, function (_a) {
|
|
89
|
+
switch (_a.label) {
|
|
90
|
+
case 0:
|
|
91
|
+
serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
92
|
+
return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
|
|
93
|
+
case 1:
|
|
94
|
+
result = _a.sent();
|
|
95
|
+
return [2, checkExceptions(result)];
|
|
45
96
|
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
export const waitForReplicationGroupDeleted = async (params, input) => {
|
|
50
|
-
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
51
|
-
return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
52
|
-
};
|
|
53
|
-
export const waitUntilReplicationGroupDeleted = async (params, input) => {
|
|
54
|
-
const serviceDefaults = { minDelay: 15, maxDelay: 120 };
|
|
55
|
-
const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
|
|
56
|
-
return checkExceptions(result);
|
|
57
|
-
};
|
|
97
|
+
});
|
|
98
|
+
}); };
|