@aws-sdk/client-mediaconnect 3.934.0 → 3.935.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 (170) hide show
  1. package/README.md +240 -0
  2. package/dist-cjs/index.js +6833 -1636
  3. package/dist-es/MediaConnect.js +60 -0
  4. package/dist-es/commands/BatchGetRouterInputCommand.js +16 -0
  5. package/dist-es/commands/BatchGetRouterNetworkInterfaceCommand.js +16 -0
  6. package/dist-es/commands/BatchGetRouterOutputCommand.js +16 -0
  7. package/dist-es/commands/CreateRouterInputCommand.js +16 -0
  8. package/dist-es/commands/CreateRouterNetworkInterfaceCommand.js +16 -0
  9. package/dist-es/commands/CreateRouterOutputCommand.js +16 -0
  10. package/dist-es/commands/DeleteRouterInputCommand.js +16 -0
  11. package/dist-es/commands/DeleteRouterNetworkInterfaceCommand.js +16 -0
  12. package/dist-es/commands/DeleteRouterOutputCommand.js +16 -0
  13. package/dist-es/commands/GetRouterInputCommand.js +16 -0
  14. package/dist-es/commands/GetRouterInputSourceMetadataCommand.js +16 -0
  15. package/dist-es/commands/GetRouterInputThumbnailCommand.js +16 -0
  16. package/dist-es/commands/GetRouterNetworkInterfaceCommand.js +16 -0
  17. package/dist-es/commands/GetRouterOutputCommand.js +16 -0
  18. package/dist-es/commands/ListRouterInputsCommand.js +16 -0
  19. package/dist-es/commands/ListRouterNetworkInterfacesCommand.js +16 -0
  20. package/dist-es/commands/ListRouterOutputsCommand.js +16 -0
  21. package/dist-es/commands/ListTagsForGlobalResourceCommand.js +16 -0
  22. package/dist-es/commands/RestartRouterInputCommand.js +16 -0
  23. package/dist-es/commands/RestartRouterOutputCommand.js +16 -0
  24. package/dist-es/commands/StartRouterInputCommand.js +16 -0
  25. package/dist-es/commands/StartRouterOutputCommand.js +16 -0
  26. package/dist-es/commands/StopRouterInputCommand.js +16 -0
  27. package/dist-es/commands/StopRouterOutputCommand.js +16 -0
  28. package/dist-es/commands/TagGlobalResourceCommand.js +16 -0
  29. package/dist-es/commands/TakeRouterInputCommand.js +16 -0
  30. package/dist-es/commands/UntagGlobalResourceCommand.js +16 -0
  31. package/dist-es/commands/UpdateRouterInputCommand.js +16 -0
  32. package/dist-es/commands/UpdateRouterNetworkInterfaceCommand.js +16 -0
  33. package/dist-es/commands/UpdateRouterOutputCommand.js +16 -0
  34. package/dist-es/commands/index.js +30 -0
  35. package/dist-es/index.js +2 -1
  36. package/dist-es/models/enums.js +303 -0
  37. package/dist-es/models/errors.js +215 -0
  38. package/dist-es/models/models_0.js +1 -358
  39. package/dist-es/models/models_1.js +1 -0
  40. package/dist-es/pagination/ListRouterInputsPaginator.js +4 -0
  41. package/dist-es/pagination/ListRouterNetworkInterfacesPaginator.js +4 -0
  42. package/dist-es/pagination/ListRouterOutputsPaginator.js +4 -0
  43. package/dist-es/pagination/index.js +3 -0
  44. package/dist-es/schemas/schemas_0.js +5554 -1351
  45. package/dist-es/waiters/index.js +7 -0
  46. package/dist-es/waiters/waitForInputActive.js +64 -0
  47. package/dist-es/waiters/waitForInputDeleted.js +49 -0
  48. package/dist-es/waiters/waitForInputStandby.js +55 -0
  49. package/dist-es/waiters/waitForOutputActive.js +64 -0
  50. package/dist-es/waiters/waitForOutputDeleted.js +49 -0
  51. package/dist-es/waiters/waitForOutputRouted.js +46 -0
  52. package/dist-es/waiters/waitForOutputStandby.js +55 -0
  53. package/dist-types/MediaConnect.d.ts +213 -0
  54. package/dist-types/MediaConnectClient.d.ts +32 -2
  55. package/dist-types/commands/AddFlowOutputsCommand.d.ts +23 -0
  56. package/dist-types/commands/AddFlowSourcesCommand.d.ts +23 -0
  57. package/dist-types/commands/BatchGetRouterInputCommand.d.ts +278 -0
  58. package/dist-types/commands/BatchGetRouterNetworkInterfaceCommand.d.ts +129 -0
  59. package/dist-types/commands/BatchGetRouterOutputCommand.d.ts +215 -0
  60. package/dist-types/commands/CreateFlowCommand.d.ts +69 -0
  61. package/dist-types/commands/CreateRouterInputCommand.d.ts +400 -0
  62. package/dist-types/commands/CreateRouterNetworkInterfaceCommand.d.ts +144 -0
  63. package/dist-types/commands/CreateRouterOutputCommand.d.ts +293 -0
  64. package/dist-types/commands/DeleteRouterInputCommand.d.ts +97 -0
  65. package/dist-types/commands/DeleteRouterNetworkInterfaceCommand.d.ts +97 -0
  66. package/dist-types/commands/DeleteRouterOutputCommand.d.ts +97 -0
  67. package/dist-types/commands/DescribeFlowCommand.d.ts +36 -0
  68. package/dist-types/commands/GetRouterInputCommand.d.ts +273 -0
  69. package/dist-types/commands/GetRouterInputSourceMetadataCommand.d.ts +129 -0
  70. package/dist-types/commands/GetRouterInputThumbnailCommand.d.ts +104 -0
  71. package/dist-types/commands/GetRouterNetworkInterfaceCommand.d.ts +124 -0
  72. package/dist-types/commands/GetRouterOutputCommand.d.ts +210 -0
  73. package/dist-types/commands/ListRouterInputsCommand.d.ts +135 -0
  74. package/dist-types/commands/ListRouterNetworkInterfacesCommand.d.ts +117 -0
  75. package/dist-types/commands/ListRouterOutputsCommand.d.ts +139 -0
  76. package/dist-types/commands/ListTagsForGlobalResourceCommand.d.ts +85 -0
  77. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  78. package/dist-types/commands/RestartRouterInputCommand.d.ts +97 -0
  79. package/dist-types/commands/RestartRouterOutputCommand.d.ts +97 -0
  80. package/dist-types/commands/StartRouterInputCommand.d.ts +105 -0
  81. package/dist-types/commands/StartRouterOutputCommand.d.ts +105 -0
  82. package/dist-types/commands/StopRouterInputCommand.d.ts +97 -0
  83. package/dist-types/commands/StopRouterOutputCommand.d.ts +97 -0
  84. package/dist-types/commands/TagGlobalResourceCommand.d.ts +84 -0
  85. package/dist-types/commands/TagResourceCommand.d.ts +2 -2
  86. package/dist-types/commands/TakeRouterInputCommand.d.ts +100 -0
  87. package/dist-types/commands/UntagGlobalResourceCommand.d.ts +84 -0
  88. package/dist-types/commands/UntagResourceCommand.d.ts +2 -2
  89. package/dist-types/commands/UpdateFlowCommand.d.ts +36 -0
  90. package/dist-types/commands/UpdateFlowOutputCommand.d.ts +23 -0
  91. package/dist-types/commands/UpdateFlowSourceCommand.d.ts +23 -0
  92. package/dist-types/commands/UpdateRouterInputCommand.d.ts +395 -0
  93. package/dist-types/commands/UpdateRouterNetworkInterfaceCommand.d.ts +137 -0
  94. package/dist-types/commands/UpdateRouterOutputCommand.d.ts +288 -0
  95. package/dist-types/commands/index.d.ts +30 -0
  96. package/dist-types/index.d.ts +4 -1
  97. package/dist-types/models/enums.d.ts +727 -0
  98. package/dist-types/models/errors.d.ts +201 -0
  99. package/dist-types/models/models_0.d.ts +4082 -1520
  100. package/dist-types/models/models_1.d.ts +287 -0
  101. package/dist-types/pagination/ListRouterInputsPaginator.d.ts +7 -0
  102. package/dist-types/pagination/ListRouterNetworkInterfacesPaginator.d.ts +7 -0
  103. package/dist-types/pagination/ListRouterOutputsPaginator.d.ts +7 -0
  104. package/dist-types/pagination/index.d.ts +3 -0
  105. package/dist-types/schemas/schemas_0.d.ts +185 -0
  106. package/dist-types/ts3.4/MediaConnect.d.ts +513 -0
  107. package/dist-types/ts3.4/MediaConnectClient.d.ts +182 -2
  108. package/dist-types/ts3.4/commands/BatchGetRouterInputCommand.d.ts +51 -0
  109. package/dist-types/ts3.4/commands/BatchGetRouterNetworkInterfaceCommand.d.ts +51 -0
  110. package/dist-types/ts3.4/commands/BatchGetRouterOutputCommand.d.ts +51 -0
  111. package/dist-types/ts3.4/commands/CreateRouterInputCommand.d.ts +51 -0
  112. package/dist-types/ts3.4/commands/CreateRouterNetworkInterfaceCommand.d.ts +51 -0
  113. package/dist-types/ts3.4/commands/CreateRouterOutputCommand.d.ts +51 -0
  114. package/dist-types/ts3.4/commands/DeleteRouterInputCommand.d.ts +51 -0
  115. package/dist-types/ts3.4/commands/DeleteRouterNetworkInterfaceCommand.d.ts +51 -0
  116. package/dist-types/ts3.4/commands/DeleteRouterOutputCommand.d.ts +51 -0
  117. package/dist-types/ts3.4/commands/GetRouterInputCommand.d.ts +50 -0
  118. package/dist-types/ts3.4/commands/GetRouterInputSourceMetadataCommand.d.ts +51 -0
  119. package/dist-types/ts3.4/commands/GetRouterInputThumbnailCommand.d.ts +51 -0
  120. package/dist-types/ts3.4/commands/GetRouterNetworkInterfaceCommand.d.ts +51 -0
  121. package/dist-types/ts3.4/commands/GetRouterOutputCommand.d.ts +50 -0
  122. package/dist-types/ts3.4/commands/ListRouterInputsCommand.d.ts +50 -0
  123. package/dist-types/ts3.4/commands/ListRouterNetworkInterfacesCommand.d.ts +51 -0
  124. package/dist-types/ts3.4/commands/ListRouterOutputsCommand.d.ts +51 -0
  125. package/dist-types/ts3.4/commands/ListTagsForGlobalResourceCommand.d.ts +51 -0
  126. package/dist-types/ts3.4/commands/RestartRouterInputCommand.d.ts +51 -0
  127. package/dist-types/ts3.4/commands/RestartRouterOutputCommand.d.ts +51 -0
  128. package/dist-types/ts3.4/commands/StartRouterInputCommand.d.ts +50 -0
  129. package/dist-types/ts3.4/commands/StartRouterOutputCommand.d.ts +51 -0
  130. package/dist-types/ts3.4/commands/StopRouterInputCommand.d.ts +50 -0
  131. package/dist-types/ts3.4/commands/StopRouterOutputCommand.d.ts +50 -0
  132. package/dist-types/ts3.4/commands/TagGlobalResourceCommand.d.ts +46 -0
  133. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
  134. package/dist-types/ts3.4/commands/TakeRouterInputCommand.d.ts +50 -0
  135. package/dist-types/ts3.4/commands/UntagGlobalResourceCommand.d.ts +46 -0
  136. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +1 -1
  137. package/dist-types/ts3.4/commands/UpdateRouterInputCommand.d.ts +51 -0
  138. package/dist-types/ts3.4/commands/UpdateRouterNetworkInterfaceCommand.d.ts +51 -0
  139. package/dist-types/ts3.4/commands/UpdateRouterOutputCommand.d.ts +51 -0
  140. package/dist-types/ts3.4/commands/index.d.ts +30 -0
  141. package/dist-types/ts3.4/index.d.ts +4 -1
  142. package/dist-types/ts3.4/models/enums.d.ts +385 -0
  143. package/dist-types/ts3.4/models/errors.d.ts +132 -0
  144. package/dist-types/ts3.4/models/models_0.d.ts +1262 -332
  145. package/dist-types/ts3.4/models/models_1.d.ts +88 -0
  146. package/dist-types/ts3.4/pagination/ListRouterInputsPaginator.d.ts +11 -0
  147. package/dist-types/ts3.4/pagination/ListRouterNetworkInterfacesPaginator.d.ts +11 -0
  148. package/dist-types/ts3.4/pagination/ListRouterOutputsPaginator.d.ts +11 -0
  149. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  150. package/dist-types/ts3.4/schemas/schemas_0.d.ts +185 -0
  151. package/dist-types/ts3.4/waiters/index.d.ts +7 -0
  152. package/dist-types/ts3.4/waiters/waitForInputActive.d.ts +11 -0
  153. package/dist-types/ts3.4/waiters/waitForInputDeleted.d.ts +11 -0
  154. package/dist-types/ts3.4/waiters/waitForInputStandby.d.ts +11 -0
  155. package/dist-types/ts3.4/waiters/waitForOutputActive.d.ts +11 -0
  156. package/dist-types/ts3.4/waiters/waitForOutputDeleted.d.ts +11 -0
  157. package/dist-types/ts3.4/waiters/waitForOutputRouted.d.ts +11 -0
  158. package/dist-types/ts3.4/waiters/waitForOutputStandby.d.ts +11 -0
  159. package/dist-types/waiters/index.d.ts +7 -0
  160. package/dist-types/waiters/waitForInputActive.d.ts +14 -0
  161. package/dist-types/waiters/waitForInputDeleted.d.ts +14 -0
  162. package/dist-types/waiters/waitForInputStandby.d.ts +14 -0
  163. package/dist-types/waiters/waitForOutputActive.d.ts +14 -0
  164. package/dist-types/waiters/waitForOutputDeleted.d.ts +14 -0
  165. package/dist-types/waiters/waitForOutputRouted.d.ts +14 -0
  166. package/dist-types/waiters/waitForOutputStandby.d.ts +14 -0
  167. package/package.json +12 -12
  168. package/dist-es/models/index.js +0 -1
  169. package/dist-types/models/index.d.ts +0 -1
  170. package/dist-types/ts3.4/models/index.d.ts +0 -1
@@ -1,3 +1,10 @@
1
1
  export * from "./waitForFlowActive";
2
2
  export * from "./waitForFlowDeleted";
3
3
  export * from "./waitForFlowStandby";
4
+ export * from "./waitForInputActive";
5
+ export * from "./waitForInputDeleted";
6
+ export * from "./waitForInputStandby";
7
+ export * from "./waitForOutputActive";
8
+ export * from "./waitForOutputDeleted";
9
+ export * from "./waitForOutputRouted";
10
+ export * from "./waitForOutputStandby";
@@ -0,0 +1,64 @@
1
+ import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
2
+ import { GetRouterInputCommand } from "../commands/GetRouterInputCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetRouterInputCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.RouterInput.State;
11
+ };
12
+ if (returnComparator() === "ACTIVE") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.RouterInput.State;
20
+ };
21
+ if (returnComparator() === "STARTING") {
22
+ return { state: WaiterState.RETRY, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ try {
27
+ const returnComparator = () => {
28
+ return result.RouterInput.State;
29
+ };
30
+ if (returnComparator() === "UPDATING") {
31
+ return { state: WaiterState.RETRY, reason };
32
+ }
33
+ }
34
+ catch (e) { }
35
+ try {
36
+ const returnComparator = () => {
37
+ return result.RouterInput.State;
38
+ };
39
+ if (returnComparator() === "ERROR") {
40
+ return { state: WaiterState.FAILURE, reason };
41
+ }
42
+ }
43
+ catch (e) { }
44
+ }
45
+ catch (exception) {
46
+ reason = exception;
47
+ if (exception.name && exception.name == "InternalServerErrorException") {
48
+ return { state: WaiterState.RETRY, reason };
49
+ }
50
+ if (exception.name && exception.name == "ServiceUnavailableException") {
51
+ return { state: WaiterState.RETRY, reason };
52
+ }
53
+ }
54
+ return { state: WaiterState.RETRY, reason };
55
+ };
56
+ export const waitForInputActive = async (params, input) => {
57
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
58
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
59
+ };
60
+ export const waitUntilInputActive = async (params, input) => {
61
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
62
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
63
+ return checkExceptions(result);
64
+ };
@@ -0,0 +1,49 @@
1
+ import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
2
+ import { GetRouterInputCommand } from "../commands/GetRouterInputCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetRouterInputCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.RouterInput.State;
11
+ };
12
+ if (returnComparator() === "DELETING") {
13
+ return { state: WaiterState.RETRY, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.RouterInput.State;
20
+ };
21
+ if (returnComparator() === "ERROR") {
22
+ return { state: WaiterState.FAILURE, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ }
27
+ catch (exception) {
28
+ reason = exception;
29
+ if (exception.name && exception.name == "InternalServerErrorException") {
30
+ return { state: WaiterState.RETRY, reason };
31
+ }
32
+ if (exception.name && exception.name == "ServiceUnavailableException") {
33
+ return { state: WaiterState.RETRY, reason };
34
+ }
35
+ if (exception.name && exception.name == "NotFoundException") {
36
+ return { state: WaiterState.SUCCESS, reason };
37
+ }
38
+ }
39
+ return { state: WaiterState.RETRY, reason };
40
+ };
41
+ export const waitForInputDeleted = async (params, input) => {
42
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
43
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
44
+ };
45
+ export const waitUntilInputDeleted = async (params, input) => {
46
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
47
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
48
+ return checkExceptions(result);
49
+ };
@@ -0,0 +1,55 @@
1
+ import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
2
+ import { GetRouterInputCommand } from "../commands/GetRouterInputCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetRouterInputCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.RouterInput.State;
11
+ };
12
+ if (returnComparator() === "STANDBY") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.RouterInput.State;
20
+ };
21
+ if (returnComparator() === "STOPPING") {
22
+ return { state: WaiterState.RETRY, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ try {
27
+ const returnComparator = () => {
28
+ return result.RouterInput.State;
29
+ };
30
+ if (returnComparator() === "ERROR") {
31
+ return { state: WaiterState.FAILURE, reason };
32
+ }
33
+ }
34
+ catch (e) { }
35
+ }
36
+ catch (exception) {
37
+ reason = exception;
38
+ if (exception.name && exception.name == "InternalServerErrorException") {
39
+ return { state: WaiterState.RETRY, reason };
40
+ }
41
+ if (exception.name && exception.name == "ServiceUnavailableException") {
42
+ return { state: WaiterState.RETRY, reason };
43
+ }
44
+ }
45
+ return { state: WaiterState.RETRY, reason };
46
+ };
47
+ export const waitForInputStandby = async (params, input) => {
48
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
49
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
50
+ };
51
+ export const waitUntilInputStandby = async (params, input) => {
52
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
53
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
54
+ return checkExceptions(result);
55
+ };
@@ -0,0 +1,64 @@
1
+ import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
2
+ import { GetRouterOutputCommand } from "../commands/GetRouterOutputCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetRouterOutputCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.RouterOutput.State;
11
+ };
12
+ if (returnComparator() === "ACTIVE") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.RouterOutput.State;
20
+ };
21
+ if (returnComparator() === "STARTING") {
22
+ return { state: WaiterState.RETRY, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ try {
27
+ const returnComparator = () => {
28
+ return result.RouterOutput.State;
29
+ };
30
+ if (returnComparator() === "UPDATING") {
31
+ return { state: WaiterState.RETRY, reason };
32
+ }
33
+ }
34
+ catch (e) { }
35
+ try {
36
+ const returnComparator = () => {
37
+ return result.RouterOutput.State;
38
+ };
39
+ if (returnComparator() === "ERROR") {
40
+ return { state: WaiterState.FAILURE, reason };
41
+ }
42
+ }
43
+ catch (e) { }
44
+ }
45
+ catch (exception) {
46
+ reason = exception;
47
+ if (exception.name && exception.name == "InternalServerErrorException") {
48
+ return { state: WaiterState.RETRY, reason };
49
+ }
50
+ if (exception.name && exception.name == "ServiceUnavailableException") {
51
+ return { state: WaiterState.RETRY, reason };
52
+ }
53
+ }
54
+ return { state: WaiterState.RETRY, reason };
55
+ };
56
+ export const waitForOutputActive = async (params, input) => {
57
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
58
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
59
+ };
60
+ export const waitUntilOutputActive = async (params, input) => {
61
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
62
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
63
+ return checkExceptions(result);
64
+ };
@@ -0,0 +1,49 @@
1
+ import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
2
+ import { GetRouterOutputCommand } from "../commands/GetRouterOutputCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetRouterOutputCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.RouterOutput.State;
11
+ };
12
+ if (returnComparator() === "DELETING") {
13
+ return { state: WaiterState.RETRY, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.RouterOutput.State;
20
+ };
21
+ if (returnComparator() === "ERROR") {
22
+ return { state: WaiterState.FAILURE, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ }
27
+ catch (exception) {
28
+ reason = exception;
29
+ if (exception.name && exception.name == "InternalServerErrorException") {
30
+ return { state: WaiterState.RETRY, reason };
31
+ }
32
+ if (exception.name && exception.name == "ServiceUnavailableException") {
33
+ return { state: WaiterState.RETRY, reason };
34
+ }
35
+ if (exception.name && exception.name == "NotFoundException") {
36
+ return { state: WaiterState.SUCCESS, reason };
37
+ }
38
+ }
39
+ return { state: WaiterState.RETRY, reason };
40
+ };
41
+ export const waitForOutputDeleted = async (params, input) => {
42
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
43
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
44
+ };
45
+ export const waitUntilOutputDeleted = async (params, input) => {
46
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
47
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
48
+ return checkExceptions(result);
49
+ };
@@ -0,0 +1,46 @@
1
+ import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
2
+ import { GetRouterOutputCommand } from "../commands/GetRouterOutputCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetRouterOutputCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.RouterOutput.RoutedState;
11
+ };
12
+ if (returnComparator() === "ROUTED") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.RouterOutput.RoutedState;
20
+ };
21
+ if (returnComparator() === "ROUTING") {
22
+ return { state: WaiterState.RETRY, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ }
27
+ catch (exception) {
28
+ reason = exception;
29
+ if (exception.name && exception.name == "InternalServerErrorException") {
30
+ return { state: WaiterState.RETRY, reason };
31
+ }
32
+ if (exception.name && exception.name == "ServiceUnavailableException") {
33
+ return { state: WaiterState.RETRY, reason };
34
+ }
35
+ }
36
+ return { state: WaiterState.RETRY, reason };
37
+ };
38
+ export const waitForOutputRouted = async (params, input) => {
39
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
40
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
41
+ };
42
+ export const waitUntilOutputRouted = async (params, input) => {
43
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
44
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
45
+ return checkExceptions(result);
46
+ };
@@ -0,0 +1,55 @@
1
+ import { checkExceptions, createWaiter, WaiterState } from "@smithy/util-waiter";
2
+ import { GetRouterOutputCommand } from "../commands/GetRouterOutputCommand";
3
+ const checkState = async (client, input) => {
4
+ let reason;
5
+ try {
6
+ const result = await client.send(new GetRouterOutputCommand(input));
7
+ reason = result;
8
+ try {
9
+ const returnComparator = () => {
10
+ return result.RouterOutput.State;
11
+ };
12
+ if (returnComparator() === "STANDBY") {
13
+ return { state: WaiterState.SUCCESS, reason };
14
+ }
15
+ }
16
+ catch (e) { }
17
+ try {
18
+ const returnComparator = () => {
19
+ return result.RouterOutput.State;
20
+ };
21
+ if (returnComparator() === "STOPPING") {
22
+ return { state: WaiterState.RETRY, reason };
23
+ }
24
+ }
25
+ catch (e) { }
26
+ try {
27
+ const returnComparator = () => {
28
+ return result.RouterOutput.State;
29
+ };
30
+ if (returnComparator() === "ERROR") {
31
+ return { state: WaiterState.FAILURE, reason };
32
+ }
33
+ }
34
+ catch (e) { }
35
+ }
36
+ catch (exception) {
37
+ reason = exception;
38
+ if (exception.name && exception.name == "InternalServerErrorException") {
39
+ return { state: WaiterState.RETRY, reason };
40
+ }
41
+ if (exception.name && exception.name == "ServiceUnavailableException") {
42
+ return { state: WaiterState.RETRY, reason };
43
+ }
44
+ }
45
+ return { state: WaiterState.RETRY, reason };
46
+ };
47
+ export const waitForOutputStandby = async (params, input) => {
48
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
49
+ return createWaiter({ ...serviceDefaults, ...params }, input, checkState);
50
+ };
51
+ export const waitUntilOutputStandby = async (params, input) => {
52
+ const serviceDefaults = { minDelay: 3, maxDelay: 120 };
53
+ const result = await createWaiter({ ...serviceDefaults, ...params }, input, checkState);
54
+ return checkExceptions(result);
55
+ };