@aws-sdk/client-interconnect 3.1030.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 (137) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +311 -0
  3. package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
  4. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  5. package/dist-cjs/endpoint/ruleset.js +7 -0
  6. package/dist-cjs/index.js +454 -0
  7. package/dist-cjs/models/InterconnectServiceException.js +12 -0
  8. package/dist-cjs/models/errors.js +95 -0
  9. package/dist-cjs/runtimeConfig.browser.js +38 -0
  10. package/dist-cjs/runtimeConfig.js +54 -0
  11. package/dist-cjs/runtimeConfig.native.js +15 -0
  12. package/dist-cjs/runtimeConfig.shared.js +43 -0
  13. package/dist-cjs/schemas/schemas_0.js +379 -0
  14. package/dist-es/Interconnect.js +47 -0
  15. package/dist-es/InterconnectClient.js +50 -0
  16. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  17. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  18. package/dist-es/commands/AcceptConnectionProposalCommand.js +16 -0
  19. package/dist-es/commands/CreateConnectionCommand.js +16 -0
  20. package/dist-es/commands/DeleteConnectionCommand.js +16 -0
  21. package/dist-es/commands/DescribeConnectionProposalCommand.js +16 -0
  22. package/dist-es/commands/GetConnectionCommand.js +16 -0
  23. package/dist-es/commands/GetEnvironmentCommand.js +16 -0
  24. package/dist-es/commands/ListAttachPointsCommand.js +16 -0
  25. package/dist-es/commands/ListConnectionsCommand.js +16 -0
  26. package/dist-es/commands/ListEnvironmentsCommand.js +16 -0
  27. package/dist-es/commands/ListTagsForResourceCommand.js +16 -0
  28. package/dist-es/commands/TagResourceCommand.js +16 -0
  29. package/dist-es/commands/UntagResourceCommand.js +16 -0
  30. package/dist-es/commands/UpdateConnectionCommand.js +16 -0
  31. package/dist-es/commands/index.js +13 -0
  32. package/dist-es/endpoint/EndpointParameters.js +11 -0
  33. package/dist-es/endpoint/endpointResolver.js +14 -0
  34. package/dist-es/endpoint/ruleset.js +4 -0
  35. package/dist-es/extensionConfiguration.js +1 -0
  36. package/dist-es/index.js +10 -0
  37. package/dist-es/models/InterconnectServiceException.js +8 -0
  38. package/dist-es/models/enums.js +22 -0
  39. package/dist-es/models/errors.js +85 -0
  40. package/dist-es/models/models_0.js +1 -0
  41. package/dist-es/pagination/Interfaces.js +1 -0
  42. package/dist-es/pagination/ListAttachPointsPaginator.js +4 -0
  43. package/dist-es/pagination/ListConnectionsPaginator.js +4 -0
  44. package/dist-es/pagination/ListEnvironmentsPaginator.js +4 -0
  45. package/dist-es/pagination/index.js +4 -0
  46. package/dist-es/runtimeConfig.browser.js +33 -0
  47. package/dist-es/runtimeConfig.js +49 -0
  48. package/dist-es/runtimeConfig.native.js +11 -0
  49. package/dist-es/runtimeConfig.shared.js +39 -0
  50. package/dist-es/runtimeExtensions.js +9 -0
  51. package/dist-es/schemas/schemas_0.js +375 -0
  52. package/dist-es/waiters/index.js +2 -0
  53. package/dist-es/waiters/waitForConnectionAvailable.js +49 -0
  54. package/dist-es/waiters/waitForConnectionDeleted.js +31 -0
  55. package/dist-types/Interconnect.d.ts +137 -0
  56. package/dist-types/InterconnectClient.d.ts +200 -0
  57. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  58. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  59. package/dist-types/commands/AcceptConnectionProposalCommand.d.ts +164 -0
  60. package/dist-types/commands/CreateConnectionCommand.d.ts +172 -0
  61. package/dist-types/commands/DeleteConnectionCommand.d.ts +153 -0
  62. package/dist-types/commands/DescribeConnectionProposalCommand.d.ts +121 -0
  63. package/dist-types/commands/GetConnectionCommand.d.ts +152 -0
  64. package/dist-types/commands/GetEnvironmentCommand.d.ts +146 -0
  65. package/dist-types/commands/ListAttachPointsCommand.d.ts +125 -0
  66. package/dist-types/commands/ListConnectionsCommand.d.ts +242 -0
  67. package/dist-types/commands/ListEnvironmentsCommand.d.ts +173 -0
  68. package/dist-types/commands/ListTagsForResourceCommand.d.ts +115 -0
  69. package/dist-types/commands/TagResourceCommand.d.ts +113 -0
  70. package/dist-types/commands/UntagResourceCommand.d.ts +113 -0
  71. package/dist-types/commands/UpdateConnectionCommand.d.ts +190 -0
  72. package/dist-types/commands/index.d.ts +13 -0
  73. package/dist-types/endpoint/EndpointParameters.d.ts +44 -0
  74. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  75. package/dist-types/endpoint/ruleset.d.ts +2 -0
  76. package/dist-types/extensionConfiguration.d.ts +9 -0
  77. package/dist-types/index.d.ts +18 -0
  78. package/dist-types/models/InterconnectServiceException.d.ts +14 -0
  79. package/dist-types/models/enums.d.ts +54 -0
  80. package/dist-types/models/errors.d.ts +86 -0
  81. package/dist-types/models/models_0.d.ts +764 -0
  82. package/dist-types/pagination/Interfaces.d.ts +8 -0
  83. package/dist-types/pagination/ListAttachPointsPaginator.d.ts +7 -0
  84. package/dist-types/pagination/ListConnectionsPaginator.d.ts +7 -0
  85. package/dist-types/pagination/ListEnvironmentsPaginator.d.ts +7 -0
  86. package/dist-types/pagination/index.d.ts +4 -0
  87. package/dist-types/runtimeConfig.browser.d.ts +55 -0
  88. package/dist-types/runtimeConfig.d.ts +55 -0
  89. package/dist-types/runtimeConfig.native.d.ts +54 -0
  90. package/dist-types/runtimeConfig.shared.d.ts +27 -0
  91. package/dist-types/runtimeExtensions.d.ts +17 -0
  92. package/dist-types/schemas/schemas_0.d.ts +63 -0
  93. package/dist-types/ts3.4/Interconnect.d.ts +275 -0
  94. package/dist-types/ts3.4/InterconnectClient.d.ts +197 -0
  95. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  96. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
  97. package/dist-types/ts3.4/commands/AcceptConnectionProposalCommand.d.ts +51 -0
  98. package/dist-types/ts3.4/commands/CreateConnectionCommand.d.ts +50 -0
  99. package/dist-types/ts3.4/commands/DeleteConnectionCommand.d.ts +50 -0
  100. package/dist-types/ts3.4/commands/DescribeConnectionProposalCommand.d.ts +51 -0
  101. package/dist-types/ts3.4/commands/GetConnectionCommand.d.ts +50 -0
  102. package/dist-types/ts3.4/commands/GetEnvironmentCommand.d.ts +50 -0
  103. package/dist-types/ts3.4/commands/ListAttachPointsCommand.d.ts +50 -0
  104. package/dist-types/ts3.4/commands/ListConnectionsCommand.d.ts +50 -0
  105. package/dist-types/ts3.4/commands/ListEnvironmentsCommand.d.ts +50 -0
  106. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
  107. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +47 -0
  108. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
  109. package/dist-types/ts3.4/commands/UpdateConnectionCommand.d.ts +50 -0
  110. package/dist-types/ts3.4/commands/index.d.ts +13 -0
  111. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +45 -0
  112. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  113. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  114. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  115. package/dist-types/ts3.4/index.d.ts +13 -0
  116. package/dist-types/ts3.4/models/InterconnectServiceException.d.ts +9 -0
  117. package/dist-types/ts3.4/models/enums.d.ts +30 -0
  118. package/dist-types/ts3.4/models/errors.d.ts +54 -0
  119. package/dist-types/ts3.4/models/models_0.d.ts +231 -0
  120. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  121. package/dist-types/ts3.4/pagination/ListAttachPointsPaginator.d.ts +11 -0
  122. package/dist-types/ts3.4/pagination/ListConnectionsPaginator.d.ts +11 -0
  123. package/dist-types/ts3.4/pagination/ListEnvironmentsPaginator.d.ts +11 -0
  124. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  125. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
  126. package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
  127. package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
  128. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
  129. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  130. package/dist-types/ts3.4/schemas/schemas_0.d.ts +63 -0
  131. package/dist-types/ts3.4/waiters/index.d.ts +2 -0
  132. package/dist-types/ts3.4/waiters/waitForConnectionAvailable.d.ts +11 -0
  133. package/dist-types/ts3.4/waiters/waitForConnectionDeleted.d.ts +11 -0
  134. package/dist-types/waiters/index.d.ts +2 -0
  135. package/dist-types/waiters/waitForConnectionAvailable.d.ts +14 -0
  136. package/dist-types/waiters/waitForConnectionDeleted.d.ts +14 -0
  137. package/package.json +101 -0
@@ -0,0 +1,454 @@
1
+ 'use strict';
2
+
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var configResolver = require('@smithy/config-resolver');
8
+ var core = require('@smithy/core');
9
+ var schema = require('@smithy/core/schema');
10
+ var middlewareContentLength = require('@smithy/middleware-content-length');
11
+ var middlewareEndpoint = require('@smithy/middleware-endpoint');
12
+ var middlewareRetry = require('@smithy/middleware-retry');
13
+ var smithyClient = require('@smithy/smithy-client');
14
+ var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
15
+ var runtimeConfig = require('./runtimeConfig');
16
+ var regionConfigResolver = require('@aws-sdk/region-config-resolver');
17
+ var protocolHttp = require('@smithy/protocol-http');
18
+ var schemas_0 = require('./schemas/schemas_0');
19
+ var utilWaiter = require('@smithy/util-waiter');
20
+ var errors = require('./models/errors');
21
+ var InterconnectServiceException = require('./models/InterconnectServiceException');
22
+
23
+ const resolveClientEndpointParameters = (options) => {
24
+ return Object.assign(options, {
25
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
26
+ defaultSigningName: "interconnect",
27
+ });
28
+ };
29
+ const commonParams = {
30
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
31
+ Endpoint: { type: "builtInParams", name: "endpoint" },
32
+ Region: { type: "builtInParams", name: "region" },
33
+ };
34
+
35
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
36
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
37
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
38
+ let _credentials = runtimeConfig.credentials;
39
+ return {
40
+ setHttpAuthScheme(httpAuthScheme) {
41
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
42
+ if (index === -1) {
43
+ _httpAuthSchemes.push(httpAuthScheme);
44
+ }
45
+ else {
46
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
47
+ }
48
+ },
49
+ httpAuthSchemes() {
50
+ return _httpAuthSchemes;
51
+ },
52
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
53
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
54
+ },
55
+ httpAuthSchemeProvider() {
56
+ return _httpAuthSchemeProvider;
57
+ },
58
+ setCredentials(credentials) {
59
+ _credentials = credentials;
60
+ },
61
+ credentials() {
62
+ return _credentials;
63
+ },
64
+ };
65
+ };
66
+ const resolveHttpAuthRuntimeConfig = (config) => {
67
+ return {
68
+ httpAuthSchemes: config.httpAuthSchemes(),
69
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
70
+ credentials: config.credentials(),
71
+ };
72
+ };
73
+
74
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
75
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
76
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
77
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
78
+ };
79
+
80
+ class InterconnectClient extends smithyClient.Client {
81
+ config;
82
+ constructor(...[configuration]) {
83
+ const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
84
+ super(_config_0);
85
+ this.initConfig = _config_0;
86
+ const _config_1 = resolveClientEndpointParameters(_config_0);
87
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
88
+ const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
89
+ const _config_4 = configResolver.resolveRegionConfig(_config_3);
90
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
91
+ const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
92
+ const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6);
93
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
94
+ this.config = _config_8;
95
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
96
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
97
+ this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
98
+ this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
99
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
100
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
101
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
102
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
103
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultInterconnectHttpAuthSchemeParametersProvider,
104
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
105
+ "aws.auth#sigv4": config.credentials,
106
+ }),
107
+ }));
108
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
109
+ }
110
+ destroy() {
111
+ super.destroy();
112
+ }
113
+ }
114
+
115
+ class AcceptConnectionProposalCommand extends smithyClient.Command
116
+ .classBuilder()
117
+ .ep(commonParams)
118
+ .m(function (Command, cs, config, o) {
119
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
120
+ })
121
+ .s("Interconnect", "AcceptConnectionProposal", {})
122
+ .n("InterconnectClient", "AcceptConnectionProposalCommand")
123
+ .sc(schemas_0.AcceptConnectionProposal$)
124
+ .build() {
125
+ }
126
+
127
+ class CreateConnectionCommand extends smithyClient.Command
128
+ .classBuilder()
129
+ .ep(commonParams)
130
+ .m(function (Command, cs, config, o) {
131
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
132
+ })
133
+ .s("Interconnect", "CreateConnection", {})
134
+ .n("InterconnectClient", "CreateConnectionCommand")
135
+ .sc(schemas_0.CreateConnection$)
136
+ .build() {
137
+ }
138
+
139
+ class DeleteConnectionCommand extends smithyClient.Command
140
+ .classBuilder()
141
+ .ep(commonParams)
142
+ .m(function (Command, cs, config, o) {
143
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
144
+ })
145
+ .s("Interconnect", "DeleteConnection", {})
146
+ .n("InterconnectClient", "DeleteConnectionCommand")
147
+ .sc(schemas_0.DeleteConnection$)
148
+ .build() {
149
+ }
150
+
151
+ class DescribeConnectionProposalCommand extends smithyClient.Command
152
+ .classBuilder()
153
+ .ep(commonParams)
154
+ .m(function (Command, cs, config, o) {
155
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
156
+ })
157
+ .s("Interconnect", "DescribeConnectionProposal", {})
158
+ .n("InterconnectClient", "DescribeConnectionProposalCommand")
159
+ .sc(schemas_0.DescribeConnectionProposal$)
160
+ .build() {
161
+ }
162
+
163
+ class GetConnectionCommand extends smithyClient.Command
164
+ .classBuilder()
165
+ .ep(commonParams)
166
+ .m(function (Command, cs, config, o) {
167
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
168
+ })
169
+ .s("Interconnect", "GetConnection", {})
170
+ .n("InterconnectClient", "GetConnectionCommand")
171
+ .sc(schemas_0.GetConnection$)
172
+ .build() {
173
+ }
174
+
175
+ class GetEnvironmentCommand extends smithyClient.Command
176
+ .classBuilder()
177
+ .ep(commonParams)
178
+ .m(function (Command, cs, config, o) {
179
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
180
+ })
181
+ .s("Interconnect", "GetEnvironment", {})
182
+ .n("InterconnectClient", "GetEnvironmentCommand")
183
+ .sc(schemas_0.GetEnvironment$)
184
+ .build() {
185
+ }
186
+
187
+ class ListAttachPointsCommand extends smithyClient.Command
188
+ .classBuilder()
189
+ .ep(commonParams)
190
+ .m(function (Command, cs, config, o) {
191
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
192
+ })
193
+ .s("Interconnect", "ListAttachPoints", {})
194
+ .n("InterconnectClient", "ListAttachPointsCommand")
195
+ .sc(schemas_0.ListAttachPoints$)
196
+ .build() {
197
+ }
198
+
199
+ class ListConnectionsCommand extends smithyClient.Command
200
+ .classBuilder()
201
+ .ep(commonParams)
202
+ .m(function (Command, cs, config, o) {
203
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
204
+ })
205
+ .s("Interconnect", "ListConnections", {})
206
+ .n("InterconnectClient", "ListConnectionsCommand")
207
+ .sc(schemas_0.ListConnections$)
208
+ .build() {
209
+ }
210
+
211
+ class ListEnvironmentsCommand extends smithyClient.Command
212
+ .classBuilder()
213
+ .ep(commonParams)
214
+ .m(function (Command, cs, config, o) {
215
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
216
+ })
217
+ .s("Interconnect", "ListEnvironments", {})
218
+ .n("InterconnectClient", "ListEnvironmentsCommand")
219
+ .sc(schemas_0.ListEnvironments$)
220
+ .build() {
221
+ }
222
+
223
+ class ListTagsForResourceCommand extends smithyClient.Command
224
+ .classBuilder()
225
+ .ep(commonParams)
226
+ .m(function (Command, cs, config, o) {
227
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
228
+ })
229
+ .s("Interconnect", "ListTagsForResource", {})
230
+ .n("InterconnectClient", "ListTagsForResourceCommand")
231
+ .sc(schemas_0.ListTagsForResource$)
232
+ .build() {
233
+ }
234
+
235
+ class TagResourceCommand extends smithyClient.Command
236
+ .classBuilder()
237
+ .ep(commonParams)
238
+ .m(function (Command, cs, config, o) {
239
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
240
+ })
241
+ .s("Interconnect", "TagResource", {})
242
+ .n("InterconnectClient", "TagResourceCommand")
243
+ .sc(schemas_0.TagResource$)
244
+ .build() {
245
+ }
246
+
247
+ class UntagResourceCommand extends smithyClient.Command
248
+ .classBuilder()
249
+ .ep(commonParams)
250
+ .m(function (Command, cs, config, o) {
251
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
252
+ })
253
+ .s("Interconnect", "UntagResource", {})
254
+ .n("InterconnectClient", "UntagResourceCommand")
255
+ .sc(schemas_0.UntagResource$)
256
+ .build() {
257
+ }
258
+
259
+ class UpdateConnectionCommand extends smithyClient.Command
260
+ .classBuilder()
261
+ .ep(commonParams)
262
+ .m(function (Command, cs, config, o) {
263
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
264
+ })
265
+ .s("Interconnect", "UpdateConnection", {})
266
+ .n("InterconnectClient", "UpdateConnectionCommand")
267
+ .sc(schemas_0.UpdateConnection$)
268
+ .build() {
269
+ }
270
+
271
+ const paginateListAttachPoints = core.createPaginator(InterconnectClient, ListAttachPointsCommand, "nextToken", "nextToken", "maxResults");
272
+
273
+ const paginateListConnections = core.createPaginator(InterconnectClient, ListConnectionsCommand, "nextToken", "nextToken", "maxResults");
274
+
275
+ const paginateListEnvironments = core.createPaginator(InterconnectClient, ListEnvironmentsCommand, "nextToken", "nextToken", "maxResults");
276
+
277
+ const checkState$1 = async (client, input) => {
278
+ let reason;
279
+ try {
280
+ let result = await client.send(new GetConnectionCommand(input));
281
+ reason = result;
282
+ try {
283
+ const returnComparator = () => {
284
+ return result.connection.state;
285
+ };
286
+ if (returnComparator() === "available") {
287
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
288
+ }
289
+ }
290
+ catch (e) { }
291
+ try {
292
+ const returnComparator = () => {
293
+ return result.connection.state;
294
+ };
295
+ if (returnComparator() === "deleted") {
296
+ return { state: utilWaiter.WaiterState.FAILURE, reason };
297
+ }
298
+ }
299
+ catch (e) { }
300
+ try {
301
+ const returnComparator = () => {
302
+ return result.connection.state;
303
+ };
304
+ if (returnComparator() === "down") {
305
+ return { state: utilWaiter.WaiterState.FAILURE, reason };
306
+ }
307
+ }
308
+ catch (e) { }
309
+ }
310
+ catch (exception) {
311
+ reason = exception;
312
+ }
313
+ return { state: utilWaiter.WaiterState.RETRY, reason };
314
+ };
315
+ const waitForConnectionAvailable = async (params, input) => {
316
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
317
+ return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
318
+ };
319
+ const waitUntilConnectionAvailable = async (params, input) => {
320
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
321
+ const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState$1);
322
+ return utilWaiter.checkExceptions(result);
323
+ };
324
+
325
+ const checkState = async (client, input) => {
326
+ let reason;
327
+ try {
328
+ let result = await client.send(new GetConnectionCommand(input));
329
+ reason = result;
330
+ try {
331
+ const returnComparator = () => {
332
+ return result.connection.state;
333
+ };
334
+ if (returnComparator() === "deleted") {
335
+ return { state: utilWaiter.WaiterState.SUCCESS, reason };
336
+ }
337
+ }
338
+ catch (e) { }
339
+ }
340
+ catch (exception) {
341
+ reason = exception;
342
+ }
343
+ return { state: utilWaiter.WaiterState.RETRY, reason };
344
+ };
345
+ const waitForConnectionDeleted = async (params, input) => {
346
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
347
+ return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
348
+ };
349
+ const waitUntilConnectionDeleted = async (params, input) => {
350
+ const serviceDefaults = { minDelay: 30, maxDelay: 120 };
351
+ const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState);
352
+ return utilWaiter.checkExceptions(result);
353
+ };
354
+
355
+ const commands = {
356
+ AcceptConnectionProposalCommand,
357
+ CreateConnectionCommand,
358
+ DeleteConnectionCommand,
359
+ DescribeConnectionProposalCommand,
360
+ GetConnectionCommand,
361
+ GetEnvironmentCommand,
362
+ ListAttachPointsCommand,
363
+ ListConnectionsCommand,
364
+ ListEnvironmentsCommand,
365
+ ListTagsForResourceCommand,
366
+ TagResourceCommand,
367
+ UntagResourceCommand,
368
+ UpdateConnectionCommand,
369
+ };
370
+ const paginators = {
371
+ paginateListAttachPoints,
372
+ paginateListConnections,
373
+ paginateListEnvironments,
374
+ };
375
+ const waiters = {
376
+ waitUntilConnectionAvailable,
377
+ waitUntilConnectionDeleted,
378
+ };
379
+ class Interconnect extends InterconnectClient {
380
+ }
381
+ smithyClient.createAggregatedClient(commands, Interconnect, { paginators, waiters });
382
+
383
+ const ConnectionState = {
384
+ AVAILABLE: "available",
385
+ DELETED: "deleted",
386
+ DELETING: "deleting",
387
+ DOWN: "down",
388
+ FAILED: "failed",
389
+ PENDING: "pending",
390
+ REQUESTED: "requested",
391
+ UPDATING: "updating",
392
+ };
393
+ const AttachPointType = {
394
+ DirectConnectGateway: "DirectConnectGateway",
395
+ };
396
+ const RemoteAccountIdentifierType = {
397
+ ACCOUNT: "account",
398
+ EMAIL: "email",
399
+ };
400
+ const EnvironmentState = {
401
+ AVAILABLE: "available",
402
+ LIMITED: "limited",
403
+ UNAVAILABLE: "unavailable",
404
+ };
405
+
406
+ exports.$Command = smithyClient.Command;
407
+ exports.__Client = smithyClient.Client;
408
+ exports.InterconnectServiceException = InterconnectServiceException.InterconnectServiceException;
409
+ exports.AcceptConnectionProposalCommand = AcceptConnectionProposalCommand;
410
+ exports.AttachPointType = AttachPointType;
411
+ exports.ConnectionState = ConnectionState;
412
+ exports.CreateConnectionCommand = CreateConnectionCommand;
413
+ exports.DeleteConnectionCommand = DeleteConnectionCommand;
414
+ exports.DescribeConnectionProposalCommand = DescribeConnectionProposalCommand;
415
+ exports.EnvironmentState = EnvironmentState;
416
+ exports.GetConnectionCommand = GetConnectionCommand;
417
+ exports.GetEnvironmentCommand = GetEnvironmentCommand;
418
+ exports.Interconnect = Interconnect;
419
+ exports.InterconnectClient = InterconnectClient;
420
+ exports.ListAttachPointsCommand = ListAttachPointsCommand;
421
+ exports.ListConnectionsCommand = ListConnectionsCommand;
422
+ exports.ListEnvironmentsCommand = ListEnvironmentsCommand;
423
+ exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
424
+ exports.RemoteAccountIdentifierType = RemoteAccountIdentifierType;
425
+ exports.TagResourceCommand = TagResourceCommand;
426
+ exports.UntagResourceCommand = UntagResourceCommand;
427
+ exports.UpdateConnectionCommand = UpdateConnectionCommand;
428
+ exports.paginateListAttachPoints = paginateListAttachPoints;
429
+ exports.paginateListConnections = paginateListConnections;
430
+ exports.paginateListEnvironments = paginateListEnvironments;
431
+ exports.waitForConnectionAvailable = waitForConnectionAvailable;
432
+ exports.waitForConnectionDeleted = waitForConnectionDeleted;
433
+ exports.waitUntilConnectionAvailable = waitUntilConnectionAvailable;
434
+ exports.waitUntilConnectionDeleted = waitUntilConnectionDeleted;
435
+ Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
436
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
437
+ Object.defineProperty(exports, '__proto__', {
438
+ enumerable: true,
439
+ value: schemas_0['__proto__']
440
+ });
441
+
442
+ Object.keys(schemas_0).forEach(function (k) {
443
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
444
+ });
445
+ Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
446
+ !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
447
+ Object.defineProperty(exports, '__proto__', {
448
+ enumerable: true,
449
+ value: errors['__proto__']
450
+ });
451
+
452
+ Object.keys(errors).forEach(function (k) {
453
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
454
+ });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InterconnectServiceException = exports.__ServiceException = void 0;
4
+ const smithy_client_1 = require("@smithy/smithy-client");
5
+ Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
+ class InterconnectServiceException extends smithy_client_1.ServiceException {
7
+ constructor(options) {
8
+ super(options);
9
+ Object.setPrototypeOf(this, InterconnectServiceException.prototype);
10
+ }
11
+ }
12
+ exports.InterconnectServiceException = InterconnectServiceException;
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InterconnectValidationException = exports.InterconnectServerException = exports.InterconnectClientException = exports.AccessDeniedException = void 0;
4
+ const InterconnectServiceException_1 = require("./InterconnectServiceException");
5
+ class AccessDeniedException extends InterconnectServiceException_1.InterconnectServiceException {
6
+ name = "AccessDeniedException";
7
+ $fault = "client";
8
+ constructor(opts) {
9
+ super({
10
+ name: "AccessDeniedException",
11
+ $fault: "client",
12
+ ...opts,
13
+ });
14
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
15
+ }
16
+ }
17
+ exports.AccessDeniedException = AccessDeniedException;
18
+ class InterconnectClientException extends InterconnectServiceException_1.InterconnectServiceException {
19
+ name = "InterconnectClientException";
20
+ $fault = "client";
21
+ constructor(opts) {
22
+ super({
23
+ name: "InterconnectClientException",
24
+ $fault: "client",
25
+ ...opts,
26
+ });
27
+ Object.setPrototypeOf(this, InterconnectClientException.prototype);
28
+ }
29
+ }
30
+ exports.InterconnectClientException = InterconnectClientException;
31
+ class InterconnectServerException extends InterconnectServiceException_1.InterconnectServiceException {
32
+ name = "InterconnectServerException";
33
+ $fault = "server";
34
+ constructor(opts) {
35
+ super({
36
+ name: "InterconnectServerException",
37
+ $fault: "server",
38
+ ...opts,
39
+ });
40
+ Object.setPrototypeOf(this, InterconnectServerException.prototype);
41
+ }
42
+ }
43
+ exports.InterconnectServerException = InterconnectServerException;
44
+ class InterconnectValidationException extends InterconnectServiceException_1.InterconnectServiceException {
45
+ name = "InterconnectValidationException";
46
+ $fault = "client";
47
+ constructor(opts) {
48
+ super({
49
+ name: "InterconnectValidationException",
50
+ $fault: "client",
51
+ ...opts,
52
+ });
53
+ Object.setPrototypeOf(this, InterconnectValidationException.prototype);
54
+ }
55
+ }
56
+ exports.InterconnectValidationException = InterconnectValidationException;
57
+ class ResourceNotFoundException extends InterconnectServiceException_1.InterconnectServiceException {
58
+ name = "ResourceNotFoundException";
59
+ $fault = "client";
60
+ constructor(opts) {
61
+ super({
62
+ name: "ResourceNotFoundException",
63
+ $fault: "client",
64
+ ...opts,
65
+ });
66
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
67
+ }
68
+ }
69
+ exports.ResourceNotFoundException = ResourceNotFoundException;
70
+ class ServiceQuotaExceededException extends InterconnectServiceException_1.InterconnectServiceException {
71
+ name = "ServiceQuotaExceededException";
72
+ $fault = "client";
73
+ constructor(opts) {
74
+ super({
75
+ name: "ServiceQuotaExceededException",
76
+ $fault: "client",
77
+ ...opts,
78
+ });
79
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
80
+ }
81
+ }
82
+ exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
83
+ class ThrottlingException extends InterconnectServiceException_1.InterconnectServiceException {
84
+ name = "ThrottlingException";
85
+ $fault = "client";
86
+ constructor(opts) {
87
+ super({
88
+ name: "ThrottlingException",
89
+ $fault: "client",
90
+ ...opts,
91
+ });
92
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
93
+ }
94
+ }
95
+ exports.ThrottlingException = ThrottlingException;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const sha256_browser_1 = require("@aws-crypto/sha256-browser");
7
+ const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
8
+ const config_resolver_1 = require("@smithy/config-resolver");
9
+ const fetch_http_handler_1 = require("@smithy/fetch-http-handler");
10
+ const invalid_dependency_1 = require("@smithy/invalid-dependency");
11
+ const smithy_client_1 = require("@smithy/smithy-client");
12
+ const util_body_length_browser_1 = require("@smithy/util-body-length-browser");
13
+ const util_defaults_mode_browser_1 = require("@smithy/util-defaults-mode-browser");
14
+ const util_retry_1 = require("@smithy/util-retry");
15
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
+ const getRuntimeConfig = (config) => {
17
+ const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
18
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
19
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
20
+ return {
21
+ ...clientSharedValues,
22
+ ...config,
23
+ runtime: "browser",
24
+ defaultsMode,
25
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
28
+ maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
29
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
30
+ requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
31
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE),
32
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
33
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
34
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
35
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
36
+ };
37
+ };
38
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
+ const client_1 = require("@aws-sdk/core/client");
7
+ const httpAuthSchemes_1 = require("@aws-sdk/core/httpAuthSchemes");
8
+ const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
9
+ const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
10
+ const config_resolver_1 = require("@smithy/config-resolver");
11
+ const hash_node_1 = require("@smithy/hash-node");
12
+ const middleware_retry_1 = require("@smithy/middleware-retry");
13
+ const node_config_provider_1 = require("@smithy/node-config-provider");
14
+ const node_http_handler_1 = require("@smithy/node-http-handler");
15
+ const smithy_client_1 = require("@smithy/smithy-client");
16
+ const util_body_length_node_1 = require("@smithy/util-body-length-node");
17
+ const util_defaults_mode_node_1 = require("@smithy/util-defaults-mode-node");
18
+ const util_retry_1 = require("@smithy/util-retry");
19
+ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
20
+ const getRuntimeConfig = (config) => {
21
+ (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
22
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
25
+ (0, client_1.emitWarningIfUnsupportedVersion)(process.version);
26
+ const loaderConfig = {
27
+ profile: config?.profile,
28
+ logger: clientSharedValues.logger,
29
+ };
30
+ return {
31
+ ...clientSharedValues,
32
+ ...config,
33
+ runtime: "node",
34
+ defaultsMode,
35
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(httpAuthSchemes_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
36
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
37
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
38
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
39
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
40
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
41
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
42
+ retryMode: config?.retryMode ??
43
+ (0, node_config_provider_1.loadConfig)({
44
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
45
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,
46
+ }, config),
47
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
48
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
49
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
50
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
51
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
52
+ };
53
+ };
54
+ exports.getRuntimeConfig = getRuntimeConfig;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRuntimeConfig = void 0;
4
+ const sha256_js_1 = require("@aws-crypto/sha256-js");
5
+ const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
+ const getRuntimeConfig = (config) => {
7
+ const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
8
+ return {
9
+ ...browserDefaults,
10
+ ...config,
11
+ runtime: "react-native",
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
13
+ };
14
+ };
15
+ exports.getRuntimeConfig = getRuntimeConfig;