@aws-sdk/client-rds 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.
Files changed (192) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist-cjs/protocols/Aws_query.js +2 -2
  3. package/dist-es/RDS.js +557 -550
  4. package/dist-es/RDSClient.js +28 -22
  5. package/dist-es/commands/AddRoleToDBClusterCommand.js +29 -22
  6. package/dist-es/commands/AddRoleToDBInstanceCommand.js +29 -22
  7. package/dist-es/commands/AddSourceIdentifierToSubscriptionCommand.js +28 -21
  8. package/dist-es/commands/AddTagsToResourceCommand.js +29 -22
  9. package/dist-es/commands/ApplyPendingMaintenanceActionCommand.js +28 -21
  10. package/dist-es/commands/AuthorizeDBSecurityGroupIngressCommand.js +28 -21
  11. package/dist-es/commands/BacktrackDBClusterCommand.js +28 -21
  12. package/dist-es/commands/CancelExportTaskCommand.js +28 -21
  13. package/dist-es/commands/CopyDBClusterParameterGroupCommand.js +28 -21
  14. package/dist-es/commands/CopyDBClusterSnapshotCommand.js +28 -21
  15. package/dist-es/commands/CopyDBParameterGroupCommand.js +28 -21
  16. package/dist-es/commands/CopyDBSnapshotCommand.js +28 -21
  17. package/dist-es/commands/CopyOptionGroupCommand.js +28 -21
  18. package/dist-es/commands/CreateCustomDBEngineVersionCommand.js +28 -21
  19. package/dist-es/commands/CreateDBClusterCommand.js +28 -21
  20. package/dist-es/commands/CreateDBClusterEndpointCommand.js +28 -21
  21. package/dist-es/commands/CreateDBClusterParameterGroupCommand.js +28 -21
  22. package/dist-es/commands/CreateDBClusterSnapshotCommand.js +28 -21
  23. package/dist-es/commands/CreateDBInstanceCommand.js +28 -21
  24. package/dist-es/commands/CreateDBInstanceReadReplicaCommand.js +28 -21
  25. package/dist-es/commands/CreateDBParameterGroupCommand.js +28 -21
  26. package/dist-es/commands/CreateDBProxyCommand.js +28 -21
  27. package/dist-es/commands/CreateDBProxyEndpointCommand.js +28 -21
  28. package/dist-es/commands/CreateDBSecurityGroupCommand.js +28 -21
  29. package/dist-es/commands/CreateDBSnapshotCommand.js +28 -21
  30. package/dist-es/commands/CreateDBSubnetGroupCommand.js +28 -21
  31. package/dist-es/commands/CreateEventSubscriptionCommand.js +28 -21
  32. package/dist-es/commands/CreateGlobalClusterCommand.js +28 -21
  33. package/dist-es/commands/CreateOptionGroupCommand.js +28 -21
  34. package/dist-es/commands/DeleteCustomDBEngineVersionCommand.js +28 -21
  35. package/dist-es/commands/DeleteDBClusterCommand.js +28 -21
  36. package/dist-es/commands/DeleteDBClusterEndpointCommand.js +28 -21
  37. package/dist-es/commands/DeleteDBClusterParameterGroupCommand.js +29 -22
  38. package/dist-es/commands/DeleteDBClusterSnapshotCommand.js +28 -21
  39. package/dist-es/commands/DeleteDBInstanceAutomatedBackupCommand.js +28 -21
  40. package/dist-es/commands/DeleteDBInstanceCommand.js +28 -21
  41. package/dist-es/commands/DeleteDBParameterGroupCommand.js +29 -22
  42. package/dist-es/commands/DeleteDBProxyCommand.js +28 -21
  43. package/dist-es/commands/DeleteDBProxyEndpointCommand.js +28 -21
  44. package/dist-es/commands/DeleteDBSecurityGroupCommand.js +29 -22
  45. package/dist-es/commands/DeleteDBSnapshotCommand.js +28 -21
  46. package/dist-es/commands/DeleteDBSubnetGroupCommand.js +29 -22
  47. package/dist-es/commands/DeleteEventSubscriptionCommand.js +28 -21
  48. package/dist-es/commands/DeleteGlobalClusterCommand.js +28 -21
  49. package/dist-es/commands/DeleteOptionGroupCommand.js +29 -22
  50. package/dist-es/commands/DeregisterDBProxyTargetsCommand.js +28 -21
  51. package/dist-es/commands/DescribeAccountAttributesCommand.js +28 -21
  52. package/dist-es/commands/DescribeCertificatesCommand.js +28 -21
  53. package/dist-es/commands/DescribeDBClusterBacktracksCommand.js +28 -21
  54. package/dist-es/commands/DescribeDBClusterEndpointsCommand.js +28 -21
  55. package/dist-es/commands/DescribeDBClusterParameterGroupsCommand.js +28 -21
  56. package/dist-es/commands/DescribeDBClusterParametersCommand.js +28 -21
  57. package/dist-es/commands/DescribeDBClusterSnapshotAttributesCommand.js +28 -21
  58. package/dist-es/commands/DescribeDBClusterSnapshotsCommand.js +28 -21
  59. package/dist-es/commands/DescribeDBClustersCommand.js +28 -21
  60. package/dist-es/commands/DescribeDBEngineVersionsCommand.js +28 -21
  61. package/dist-es/commands/DescribeDBInstanceAutomatedBackupsCommand.js +28 -21
  62. package/dist-es/commands/DescribeDBInstancesCommand.js +28 -21
  63. package/dist-es/commands/DescribeDBLogFilesCommand.js +28 -21
  64. package/dist-es/commands/DescribeDBParameterGroupsCommand.js +28 -21
  65. package/dist-es/commands/DescribeDBParametersCommand.js +28 -21
  66. package/dist-es/commands/DescribeDBProxiesCommand.js +28 -21
  67. package/dist-es/commands/DescribeDBProxyEndpointsCommand.js +28 -21
  68. package/dist-es/commands/DescribeDBProxyTargetGroupsCommand.js +28 -21
  69. package/dist-es/commands/DescribeDBProxyTargetsCommand.js +28 -21
  70. package/dist-es/commands/DescribeDBSecurityGroupsCommand.js +28 -21
  71. package/dist-es/commands/DescribeDBSnapshotAttributesCommand.js +28 -21
  72. package/dist-es/commands/DescribeDBSnapshotsCommand.js +28 -21
  73. package/dist-es/commands/DescribeDBSubnetGroupsCommand.js +28 -21
  74. package/dist-es/commands/DescribeEngineDefaultClusterParametersCommand.js +28 -21
  75. package/dist-es/commands/DescribeEngineDefaultParametersCommand.js +28 -21
  76. package/dist-es/commands/DescribeEventCategoriesCommand.js +28 -21
  77. package/dist-es/commands/DescribeEventSubscriptionsCommand.js +28 -21
  78. package/dist-es/commands/DescribeEventsCommand.js +28 -21
  79. package/dist-es/commands/DescribeExportTasksCommand.js +28 -21
  80. package/dist-es/commands/DescribeGlobalClustersCommand.js +28 -21
  81. package/dist-es/commands/DescribeOptionGroupOptionsCommand.js +28 -21
  82. package/dist-es/commands/DescribeOptionGroupsCommand.js +28 -21
  83. package/dist-es/commands/DescribeOrderableDBInstanceOptionsCommand.js +28 -21
  84. package/dist-es/commands/DescribePendingMaintenanceActionsCommand.js +28 -21
  85. package/dist-es/commands/DescribeReservedDBInstancesCommand.js +28 -21
  86. package/dist-es/commands/DescribeReservedDBInstancesOfferingsCommand.js +28 -21
  87. package/dist-es/commands/DescribeSourceRegionsCommand.js +28 -21
  88. package/dist-es/commands/DescribeValidDBInstanceModificationsCommand.js +28 -21
  89. package/dist-es/commands/DownloadDBLogFilePortionCommand.js +28 -21
  90. package/dist-es/commands/FailoverDBClusterCommand.js +28 -21
  91. package/dist-es/commands/FailoverGlobalClusterCommand.js +28 -21
  92. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  93. package/dist-es/commands/ModifyActivityStreamCommand.js +28 -21
  94. package/dist-es/commands/ModifyCertificatesCommand.js +28 -21
  95. package/dist-es/commands/ModifyCurrentDBClusterCapacityCommand.js +28 -21
  96. package/dist-es/commands/ModifyCustomDBEngineVersionCommand.js +28 -21
  97. package/dist-es/commands/ModifyDBClusterCommand.js +28 -21
  98. package/dist-es/commands/ModifyDBClusterEndpointCommand.js +28 -21
  99. package/dist-es/commands/ModifyDBClusterParameterGroupCommand.js +28 -21
  100. package/dist-es/commands/ModifyDBClusterSnapshotAttributeCommand.js +28 -21
  101. package/dist-es/commands/ModifyDBInstanceCommand.js +28 -21
  102. package/dist-es/commands/ModifyDBParameterGroupCommand.js +28 -21
  103. package/dist-es/commands/ModifyDBProxyCommand.js +28 -21
  104. package/dist-es/commands/ModifyDBProxyEndpointCommand.js +28 -21
  105. package/dist-es/commands/ModifyDBProxyTargetGroupCommand.js +28 -21
  106. package/dist-es/commands/ModifyDBSnapshotAttributeCommand.js +28 -21
  107. package/dist-es/commands/ModifyDBSnapshotCommand.js +28 -21
  108. package/dist-es/commands/ModifyDBSubnetGroupCommand.js +28 -21
  109. package/dist-es/commands/ModifyEventSubscriptionCommand.js +28 -21
  110. package/dist-es/commands/ModifyGlobalClusterCommand.js +28 -21
  111. package/dist-es/commands/ModifyOptionGroupCommand.js +28 -21
  112. package/dist-es/commands/PromoteReadReplicaCommand.js +28 -21
  113. package/dist-es/commands/PromoteReadReplicaDBClusterCommand.js +28 -21
  114. package/dist-es/commands/PurchaseReservedDBInstancesOfferingCommand.js +28 -21
  115. package/dist-es/commands/RebootDBClusterCommand.js +28 -21
  116. package/dist-es/commands/RebootDBInstanceCommand.js +28 -21
  117. package/dist-es/commands/RegisterDBProxyTargetsCommand.js +28 -21
  118. package/dist-es/commands/RemoveFromGlobalClusterCommand.js +28 -21
  119. package/dist-es/commands/RemoveRoleFromDBClusterCommand.js +29 -22
  120. package/dist-es/commands/RemoveRoleFromDBInstanceCommand.js +29 -22
  121. package/dist-es/commands/RemoveSourceIdentifierFromSubscriptionCommand.js +28 -21
  122. package/dist-es/commands/RemoveTagsFromResourceCommand.js +29 -22
  123. package/dist-es/commands/ResetDBClusterParameterGroupCommand.js +28 -21
  124. package/dist-es/commands/ResetDBParameterGroupCommand.js +28 -21
  125. package/dist-es/commands/RestoreDBClusterFromS3Command.js +28 -21
  126. package/dist-es/commands/RestoreDBClusterFromSnapshotCommand.js +28 -21
  127. package/dist-es/commands/RestoreDBClusterToPointInTimeCommand.js +28 -21
  128. package/dist-es/commands/RestoreDBInstanceFromDBSnapshotCommand.js +28 -21
  129. package/dist-es/commands/RestoreDBInstanceFromS3Command.js +28 -21
  130. package/dist-es/commands/RestoreDBInstanceToPointInTimeCommand.js +28 -21
  131. package/dist-es/commands/RevokeDBSecurityGroupIngressCommand.js +28 -21
  132. package/dist-es/commands/StartActivityStreamCommand.js +28 -21
  133. package/dist-es/commands/StartDBClusterCommand.js +28 -21
  134. package/dist-es/commands/StartDBInstanceAutomatedBackupsReplicationCommand.js +28 -21
  135. package/dist-es/commands/StartDBInstanceCommand.js +28 -21
  136. package/dist-es/commands/StartExportTaskCommand.js +28 -21
  137. package/dist-es/commands/StopActivityStreamCommand.js +28 -21
  138. package/dist-es/commands/StopDBClusterCommand.js +28 -21
  139. package/dist-es/commands/StopDBInstanceAutomatedBackupsReplicationCommand.js +28 -21
  140. package/dist-es/commands/StopDBInstanceCommand.js +28 -21
  141. package/dist-es/commands/SwitchoverReadReplicaCommand.js +28 -21
  142. package/dist-es/endpoints.js +8 -8
  143. package/dist-es/models/RDSServiceException.js +10 -5
  144. package/dist-es/models/models_0.js +1339 -1710
  145. package/dist-es/models/models_1.js +398 -707
  146. package/dist-es/pagination/DescribeCertificatesPaginator.js +68 -25
  147. package/dist-es/pagination/DescribeDBClusterBacktracksPaginator.js +68 -25
  148. package/dist-es/pagination/DescribeDBClusterEndpointsPaginator.js +68 -25
  149. package/dist-es/pagination/DescribeDBClusterParameterGroupsPaginator.js +68 -25
  150. package/dist-es/pagination/DescribeDBClusterParametersPaginator.js +68 -25
  151. package/dist-es/pagination/DescribeDBClusterSnapshotsPaginator.js +68 -25
  152. package/dist-es/pagination/DescribeDBClustersPaginator.js +68 -25
  153. package/dist-es/pagination/DescribeDBEngineVersionsPaginator.js +68 -25
  154. package/dist-es/pagination/DescribeDBInstanceAutomatedBackupsPaginator.js +68 -25
  155. package/dist-es/pagination/DescribeDBInstancesPaginator.js +68 -25
  156. package/dist-es/pagination/DescribeDBLogFilesPaginator.js +68 -25
  157. package/dist-es/pagination/DescribeDBParameterGroupsPaginator.js +68 -25
  158. package/dist-es/pagination/DescribeDBParametersPaginator.js +68 -25
  159. package/dist-es/pagination/DescribeDBProxiesPaginator.js +68 -25
  160. package/dist-es/pagination/DescribeDBProxyEndpointsPaginator.js +68 -25
  161. package/dist-es/pagination/DescribeDBProxyTargetGroupsPaginator.js +68 -25
  162. package/dist-es/pagination/DescribeDBProxyTargetsPaginator.js +68 -25
  163. package/dist-es/pagination/DescribeDBSecurityGroupsPaginator.js +68 -25
  164. package/dist-es/pagination/DescribeDBSnapshotsPaginator.js +68 -25
  165. package/dist-es/pagination/DescribeDBSubnetGroupsPaginator.js +68 -25
  166. package/dist-es/pagination/DescribeEngineDefaultParametersPaginator.js +68 -25
  167. package/dist-es/pagination/DescribeEventSubscriptionsPaginator.js +68 -25
  168. package/dist-es/pagination/DescribeEventsPaginator.js +68 -25
  169. package/dist-es/pagination/DescribeExportTasksPaginator.js +68 -25
  170. package/dist-es/pagination/DescribeGlobalClustersPaginator.js +68 -25
  171. package/dist-es/pagination/DescribeOptionGroupOptionsPaginator.js +68 -25
  172. package/dist-es/pagination/DescribeOptionGroupsPaginator.js +68 -25
  173. package/dist-es/pagination/DescribeOrderableDBInstanceOptionsPaginator.js +68 -25
  174. package/dist-es/pagination/DescribePendingMaintenanceActionsPaginator.js +68 -25
  175. package/dist-es/pagination/DescribeReservedDBInstancesOfferingsPaginator.js +68 -25
  176. package/dist-es/pagination/DescribeReservedDBInstancesPaginator.js +68 -25
  177. package/dist-es/pagination/DescribeSourceRegionsPaginator.js +68 -25
  178. package/dist-es/pagination/DownloadDBLogFilePortionPaginator.js +68 -25
  179. package/dist-es/protocols/Aws_query.js +13117 -10109
  180. package/dist-es/runtimeConfig.browser.js +12 -26
  181. package/dist-es/runtimeConfig.js +12 -30
  182. package/dist-es/runtimeConfig.native.js +5 -8
  183. package/dist-es/runtimeConfig.shared.js +11 -8
  184. package/dist-es/waiters/waitForDBClusterAvailable.js +187 -106
  185. package/dist-es/waiters/waitForDBClusterDeleted.js +147 -86
  186. package/dist-es/waiters/waitForDBClusterSnapshotAvailable.js +187 -106
  187. package/dist-es/waiters/waitForDBClusterSnapshotDeleted.js +147 -86
  188. package/dist-es/waiters/waitForDBInstanceAvailable.js +187 -106
  189. package/dist-es/waiters/waitForDBInstanceDeleted.js +147 -86
  190. package/dist-es/waiters/waitForDBSnapshotAvailable.js +187 -106
  191. package/dist-es/waiters/waitForDBSnapshotDeleted.js +147 -86
  192. package/package.json +5 -5
@@ -1,94 +1,155 @@
1
+ import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
1
2
  import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
2
3
  import { DescribeDBClusterSnapshotsCommand, } from "../commands/DescribeDBClusterSnapshotsCommand";
3
- const checkState = async (client, input) => {
4
- let reason;
5
- try {
6
- const result = await client.send(new DescribeDBClusterSnapshotsCommand(input));
7
- reason = result;
8
- try {
9
- const returnComparator = () => {
10
- return result.DBClusterSnapshots.length == 0.0;
11
- };
12
- if (returnComparator() == true) {
13
- return { state: WaiterState.SUCCESS, reason };
14
- }
15
- }
16
- catch (e) { }
17
- try {
18
- const returnComparator = () => {
19
- const flat_1 = [].concat(...result.DBClusterSnapshots);
20
- const projection_3 = flat_1.map((element_2) => {
21
- return element_2.Status;
22
- });
23
- return projection_3;
24
- };
25
- for (const anyStringEq_4 of returnComparator()) {
26
- if (anyStringEq_4 == "creating") {
27
- return { state: WaiterState.FAILURE, reason };
4
+ var checkState = function (client, input) { return __awaiter(void 0, void 0, void 0, function () {
5
+ var reason, result_1, returnComparator, returnComparator, _a, _b, anyStringEq_4, returnComparator, _c, _d, anyStringEq_4, returnComparator, _e, _f, anyStringEq_4, returnComparator, _g, _h, anyStringEq_4, exception_1;
6
+ var e_1, _j, e_2, _k, e_3, _l, e_4, _m;
7
+ return __generator(this, function (_o) {
8
+ switch (_o.label) {
9
+ case 0:
10
+ _o.trys.push([0, 2, , 3]);
11
+ return [4, client.send(new DescribeDBClusterSnapshotsCommand(input))];
12
+ case 1:
13
+ result_1 = _o.sent();
14
+ reason = result_1;
15
+ try {
16
+ returnComparator = function () {
17
+ return result_1.DBClusterSnapshots.length == 0.0;
18
+ };
19
+ if (returnComparator() == true) {
20
+ return [2, { state: WaiterState.SUCCESS, reason: reason }];
21
+ }
28
22
  }
29
- }
30
- }
31
- catch (e) { }
32
- try {
33
- const returnComparator = () => {
34
- const flat_1 = [].concat(...result.DBClusterSnapshots);
35
- const projection_3 = flat_1.map((element_2) => {
36
- return element_2.Status;
37
- });
38
- return projection_3;
39
- };
40
- for (const anyStringEq_4 of returnComparator()) {
41
- if (anyStringEq_4 == "modifying") {
42
- return { state: WaiterState.FAILURE, reason };
23
+ catch (e) { }
24
+ try {
25
+ returnComparator = function () {
26
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBClusterSnapshots), false));
27
+ var projection_3 = flat_1.map(function (element_2) {
28
+ return element_2.Status;
29
+ });
30
+ return projection_3;
31
+ };
32
+ try {
33
+ for (_a = __values(returnComparator()), _b = _a.next(); !_b.done; _b = _a.next()) {
34
+ anyStringEq_4 = _b.value;
35
+ if (anyStringEq_4 == "creating") {
36
+ return [2, { state: WaiterState.FAILURE, reason: reason }];
37
+ }
38
+ }
39
+ }
40
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
41
+ finally {
42
+ try {
43
+ if (_b && !_b.done && (_j = _a.return)) _j.call(_a);
44
+ }
45
+ finally { if (e_1) throw e_1.error; }
46
+ }
43
47
  }
44
- }
45
- }
46
- catch (e) { }
47
- try {
48
- const returnComparator = () => {
49
- const flat_1 = [].concat(...result.DBClusterSnapshots);
50
- const projection_3 = flat_1.map((element_2) => {
51
- return element_2.Status;
52
- });
53
- return projection_3;
54
- };
55
- for (const anyStringEq_4 of returnComparator()) {
56
- if (anyStringEq_4 == "rebooting") {
57
- return { state: WaiterState.FAILURE, reason };
48
+ catch (e) { }
49
+ try {
50
+ returnComparator = function () {
51
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBClusterSnapshots), false));
52
+ var projection_3 = flat_1.map(function (element_2) {
53
+ return element_2.Status;
54
+ });
55
+ return projection_3;
56
+ };
57
+ try {
58
+ for (_c = __values(returnComparator()), _d = _c.next(); !_d.done; _d = _c.next()) {
59
+ anyStringEq_4 = _d.value;
60
+ if (anyStringEq_4 == "modifying") {
61
+ return [2, { state: WaiterState.FAILURE, reason: reason }];
62
+ }
63
+ }
64
+ }
65
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
66
+ finally {
67
+ try {
68
+ if (_d && !_d.done && (_k = _c.return)) _k.call(_c);
69
+ }
70
+ finally { if (e_2) throw e_2.error; }
71
+ }
58
72
  }
59
- }
60
- }
61
- catch (e) { }
62
- try {
63
- const returnComparator = () => {
64
- const flat_1 = [].concat(...result.DBClusterSnapshots);
65
- const projection_3 = flat_1.map((element_2) => {
66
- return element_2.Status;
67
- });
68
- return projection_3;
69
- };
70
- for (const anyStringEq_4 of returnComparator()) {
71
- if (anyStringEq_4 == "resetting-master-credentials") {
72
- return { state: WaiterState.FAILURE, reason };
73
+ catch (e) { }
74
+ try {
75
+ returnComparator = function () {
76
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBClusterSnapshots), false));
77
+ var projection_3 = flat_1.map(function (element_2) {
78
+ return element_2.Status;
79
+ });
80
+ return projection_3;
81
+ };
82
+ try {
83
+ for (_e = __values(returnComparator()), _f = _e.next(); !_f.done; _f = _e.next()) {
84
+ anyStringEq_4 = _f.value;
85
+ if (anyStringEq_4 == "rebooting") {
86
+ return [2, { state: WaiterState.FAILURE, reason: reason }];
87
+ }
88
+ }
89
+ }
90
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
91
+ finally {
92
+ try {
93
+ if (_f && !_f.done && (_l = _e.return)) _l.call(_e);
94
+ }
95
+ finally { if (e_3) throw e_3.error; }
96
+ }
97
+ }
98
+ catch (e) { }
99
+ try {
100
+ returnComparator = function () {
101
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBClusterSnapshots), false));
102
+ var projection_3 = flat_1.map(function (element_2) {
103
+ return element_2.Status;
104
+ });
105
+ return projection_3;
106
+ };
107
+ try {
108
+ for (_g = __values(returnComparator()), _h = _g.next(); !_h.done; _h = _g.next()) {
109
+ anyStringEq_4 = _h.value;
110
+ if (anyStringEq_4 == "resetting-master-credentials") {
111
+ return [2, { state: WaiterState.FAILURE, reason: reason }];
112
+ }
113
+ }
114
+ }
115
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
116
+ finally {
117
+ try {
118
+ if (_h && !_h.done && (_m = _g.return)) _m.call(_g);
119
+ }
120
+ finally { if (e_4) throw e_4.error; }
121
+ }
122
+ }
123
+ catch (e) { }
124
+ return [3, 3];
125
+ case 2:
126
+ exception_1 = _o.sent();
127
+ reason = exception_1;
128
+ if (exception_1.name && exception_1.name == "DBClusterSnapshotNotFoundFault") {
129
+ return [2, { state: WaiterState.SUCCESS, reason: reason }];
73
130
  }
74
- }
131
+ return [3, 3];
132
+ case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
75
133
  }
76
- catch (e) { }
77
- }
78
- catch (exception) {
79
- reason = exception;
80
- if (exception.name && exception.name == "DBClusterSnapshotNotFoundFault") {
81
- return { state: WaiterState.SUCCESS, reason };
134
+ });
135
+ }); };
136
+ export var waitForDBClusterSnapshotDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
137
+ var serviceDefaults;
138
+ return __generator(this, function (_a) {
139
+ serviceDefaults = { minDelay: 30, maxDelay: 120 };
140
+ return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
141
+ });
142
+ }); };
143
+ export var waitUntilDBClusterSnapshotDeleted = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
144
+ var serviceDefaults, result;
145
+ return __generator(this, function (_a) {
146
+ switch (_a.label) {
147
+ case 0:
148
+ serviceDefaults = { minDelay: 30, maxDelay: 120 };
149
+ return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
150
+ case 1:
151
+ result = _a.sent();
152
+ return [2, checkExceptions(result)];
82
153
  }
83
- }
84
- return { state: WaiterState.RETRY, reason };
85
- };
86
- export const waitForDBClusterSnapshotDeleted = async (params, input) => {
87
- const serviceDefaults = { minDelay: 30, maxDelay: 120 };
88
- return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
89
- };
90
- export const waitUntilDBClusterSnapshotDeleted = async (params, input) => {
91
- const serviceDefaults = { minDelay: 30, maxDelay: 120 };
92
- const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
93
- return checkExceptions(result);
94
- };
154
+ });
155
+ }); };
@@ -1,114 +1,195 @@
1
+ import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
1
2
  import { checkExceptions, createWaiter, WaiterState } from "@aws-sdk/util-waiter";
2
3
  import { DescribeDBInstancesCommand } from "../commands/DescribeDBInstancesCommand";
3
- const checkState = async (client, input) => {
4
- let reason;
5
- try {
6
- const result = await client.send(new DescribeDBInstancesCommand(input));
7
- reason = result;
8
- try {
9
- const returnComparator = () => {
10
- const flat_1 = [].concat(...result.DBInstances);
11
- const projection_3 = flat_1.map((element_2) => {
12
- return element_2.DBInstanceStatus;
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.DBInstances);
28
- const projection_3 = flat_1.map((element_2) => {
29
- return element_2.DBInstanceStatus;
30
- });
31
- return projection_3;
32
- };
33
- for (const anyStringEq_4 of returnComparator()) {
34
- if (anyStringEq_4 == "deleted") {
35
- return { state: WaiterState.FAILURE, reason };
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, exception_1;
6
+ var e_1, _o, e_2, _p, e_3, _q, e_4, _r, e_5, _s, e_6, _t;
7
+ return __generator(this, function (_u) {
8
+ switch (_u.label) {
9
+ case 0:
10
+ _u.trys.push([0, 2, , 3]);
11
+ return [4, client.send(new DescribeDBInstancesCommand(input))];
12
+ case 1:
13
+ result_1 = _u.sent();
14
+ reason = result_1;
15
+ try {
16
+ returnComparator = function () {
17
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBInstances), false));
18
+ var projection_3 = flat_1.map(function (element_2) {
19
+ return element_2.DBInstanceStatus;
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 && (_o = _a.return)) _o.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
- catch (e) { }
40
- try {
41
- const returnComparator = () => {
42
- const flat_1 = [].concat(...result.DBInstances);
43
- const projection_3 = flat_1.map((element_2) => {
44
- return element_2.DBInstanceStatus;
45
- });
46
- return projection_3;
47
- };
48
- for (const anyStringEq_4 of returnComparator()) {
49
- if (anyStringEq_4 == "deleting") {
50
- return { state: WaiterState.FAILURE, reason };
41
+ catch (e) { }
42
+ try {
43
+ returnComparator = function () {
44
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBInstances), false));
45
+ var projection_3 = flat_1.map(function (element_2) {
46
+ return element_2.DBInstanceStatus;
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 && (_p = _c.return)) _p.call(_c);
62
+ }
63
+ finally { if (e_2) throw e_2.error; }
64
+ }
51
65
  }
52
- }
53
- }
54
- catch (e) { }
55
- try {
56
- const returnComparator = () => {
57
- const flat_1 = [].concat(...result.DBInstances);
58
- const projection_3 = flat_1.map((element_2) => {
59
- return element_2.DBInstanceStatus;
60
- });
61
- return projection_3;
62
- };
63
- for (const anyStringEq_4 of returnComparator()) {
64
- if (anyStringEq_4 == "failed") {
65
- return { state: WaiterState.FAILURE, reason };
66
+ catch (e) { }
67
+ try {
68
+ returnComparator = function () {
69
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBInstances), false));
70
+ var projection_3 = flat_1.map(function (element_2) {
71
+ return element_2.DBInstanceStatus;
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 == "deleting") {
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 && (_q = _e.return)) _q.call(_e);
87
+ }
88
+ finally { if (e_3) throw e_3.error; }
89
+ }
66
90
  }
67
- }
68
- }
69
- catch (e) { }
70
- try {
71
- const returnComparator = () => {
72
- const flat_1 = [].concat(...result.DBInstances);
73
- const projection_3 = flat_1.map((element_2) => {
74
- return element_2.DBInstanceStatus;
75
- });
76
- return projection_3;
77
- };
78
- for (const anyStringEq_4 of returnComparator()) {
79
- if (anyStringEq_4 == "incompatible-restore") {
80
- return { state: WaiterState.FAILURE, reason };
91
+ catch (e) { }
92
+ try {
93
+ returnComparator = function () {
94
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBInstances), false));
95
+ var projection_3 = flat_1.map(function (element_2) {
96
+ return element_2.DBInstanceStatus;
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 == "failed") {
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 && (_r = _g.return)) _r.call(_g);
112
+ }
113
+ finally { if (e_4) throw e_4.error; }
114
+ }
81
115
  }
82
- }
83
- }
84
- catch (e) { }
85
- try {
86
- const returnComparator = () => {
87
- const flat_1 = [].concat(...result.DBInstances);
88
- const projection_3 = flat_1.map((element_2) => {
89
- return element_2.DBInstanceStatus;
90
- });
91
- return projection_3;
92
- };
93
- for (const anyStringEq_4 of returnComparator()) {
94
- if (anyStringEq_4 == "incompatible-parameters") {
95
- return { state: WaiterState.FAILURE, reason };
116
+ catch (e) { }
117
+ try {
118
+ returnComparator = function () {
119
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBInstances), false));
120
+ var projection_3 = flat_1.map(function (element_2) {
121
+ return element_2.DBInstanceStatus;
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 == "incompatible-restore") {
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 && (_s = _j.return)) _s.call(_j);
137
+ }
138
+ finally { if (e_5) throw e_5.error; }
139
+ }
140
+ }
141
+ catch (e) { }
142
+ try {
143
+ returnComparator = function () {
144
+ var flat_1 = [].concat.apply([], __spreadArray([], __read(result_1.DBInstances), false));
145
+ var projection_3 = flat_1.map(function (element_2) {
146
+ return element_2.DBInstanceStatus;
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 == "incompatible-parameters") {
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 && (_t = _l.return)) _t.call(_l);
162
+ }
163
+ finally { if (e_6) throw e_6.error; }
164
+ }
96
165
  }
97
- }
166
+ catch (e) { }
167
+ return [3, 3];
168
+ case 2:
169
+ exception_1 = _u.sent();
170
+ reason = exception_1;
171
+ return [3, 3];
172
+ case 3: return [2, { state: WaiterState.RETRY, reason: reason }];
173
+ }
174
+ });
175
+ }); };
176
+ export var waitForDBInstanceAvailable = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
177
+ var serviceDefaults;
178
+ return __generator(this, function (_a) {
179
+ serviceDefaults = { minDelay: 30, maxDelay: 120 };
180
+ return [2, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
181
+ });
182
+ }); };
183
+ export var waitUntilDBInstanceAvailable = function (params, input) { return __awaiter(void 0, void 0, void 0, function () {
184
+ var serviceDefaults, result;
185
+ return __generator(this, function (_a) {
186
+ switch (_a.label) {
187
+ case 0:
188
+ serviceDefaults = { minDelay: 30, maxDelay: 120 };
189
+ return [4, createWaiter(__assign(__assign({}, serviceDefaults), params), input, checkState)];
190
+ case 1:
191
+ result = _a.sent();
192
+ return [2, checkExceptions(result)];
98
193
  }
99
- catch (e) { }
100
- }
101
- catch (exception) {
102
- reason = exception;
103
- }
104
- return { state: WaiterState.RETRY, reason };
105
- };
106
- export const waitForDBInstanceAvailable = async (params, input) => {
107
- const serviceDefaults = { minDelay: 30, maxDelay: 120 };
108
- return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
109
- };
110
- export const waitUntilDBInstanceAvailable = async (params, input) => {
111
- const serviceDefaults = { minDelay: 30, maxDelay: 120 };
112
- const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
113
- return checkExceptions(result);
114
- };
194
+ });
195
+ }); };