@effect-aws/client-kafkaconnect 1.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Errors/package.json +6 -0
- package/KafkaConnectClientInstance/package.json +6 -0
- package/KafkaConnectService/package.json +6 -0
- package/KafkaConnectServiceConfig/package.json +6 -0
- package/LICENSE +19 -0
- package/README.md +58 -0
- package/dist/cjs/Errors.d.ts +15 -0
- package/dist/cjs/Errors.d.ts.map +1 -0
- package/dist/cjs/Errors.js +14 -0
- package/dist/cjs/Errors.js.map +1 -0
- package/dist/cjs/KafkaConnectClientInstance.d.ts +24 -0
- package/dist/cjs/KafkaConnectClientInstance.d.ts.map +1 -0
- package/dist/cjs/KafkaConnectClientInstance.js +50 -0
- package/dist/cjs/KafkaConnectClientInstance.js.map +1 -0
- package/dist/cjs/KafkaConnectService.d.ts +118 -0
- package/dist/cjs/KafkaConnectService.d.ts.map +1 -0
- package/dist/cjs/KafkaConnectService.js +77 -0
- package/dist/cjs/KafkaConnectService.js.map +1 -0
- package/dist/cjs/KafkaConnectServiceConfig.d.ts +25 -0
- package/dist/cjs/KafkaConnectServiceConfig.d.ts.map +1 -0
- package/dist/cjs/KafkaConnectServiceConfig.js +35 -0
- package/dist/cjs/KafkaConnectServiceConfig.js.map +1 -0
- package/dist/cjs/index.d.ts +44 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +56 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/dts/Errors.d.ts +15 -0
- package/dist/dts/Errors.d.ts.map +1 -0
- package/dist/dts/KafkaConnectClientInstance.d.ts +24 -0
- package/dist/dts/KafkaConnectClientInstance.d.ts.map +1 -0
- package/dist/dts/KafkaConnectService.d.ts +118 -0
- package/dist/dts/KafkaConnectService.d.ts.map +1 -0
- package/dist/dts/KafkaConnectServiceConfig.d.ts +25 -0
- package/dist/dts/KafkaConnectServiceConfig.d.ts.map +1 -0
- package/dist/dts/index.d.ts +44 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/esm/Errors.js +11 -0
- package/dist/esm/Errors.js.map +1 -0
- package/dist/esm/KafkaConnectClientInstance.js +23 -0
- package/dist/esm/KafkaConnectClientInstance.js.map +1 -0
- package/dist/esm/KafkaConnectService.js +50 -0
- package/dist/esm/KafkaConnectService.js.map +1 -0
- package/dist/esm/KafkaConnectServiceConfig.js +31 -0
- package/dist/esm/KafkaConnectServiceConfig.js.map +1 -0
- package/dist/esm/index.js +27 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +4 -0
- package/package.json +71 -0
- package/src/Errors.ts +32 -0
- package/src/KafkaConnectClientInstance.ts +33 -0
- package/src/KafkaConnectService.ts +511 -0
- package/src/KafkaConnectServiceConfig.ts +52 -0
- package/src/index.ts +50 -0
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
CreateConnectorCommand,
|
|
6
|
+
type CreateConnectorCommandInput,
|
|
7
|
+
type CreateConnectorCommandOutput,
|
|
8
|
+
CreateCustomPluginCommand,
|
|
9
|
+
type CreateCustomPluginCommandInput,
|
|
10
|
+
type CreateCustomPluginCommandOutput,
|
|
11
|
+
CreateWorkerConfigurationCommand,
|
|
12
|
+
type CreateWorkerConfigurationCommandInput,
|
|
13
|
+
type CreateWorkerConfigurationCommandOutput,
|
|
14
|
+
DeleteConnectorCommand,
|
|
15
|
+
type DeleteConnectorCommandInput,
|
|
16
|
+
type DeleteConnectorCommandOutput,
|
|
17
|
+
DeleteCustomPluginCommand,
|
|
18
|
+
type DeleteCustomPluginCommandInput,
|
|
19
|
+
type DeleteCustomPluginCommandOutput,
|
|
20
|
+
DeleteWorkerConfigurationCommand,
|
|
21
|
+
type DeleteWorkerConfigurationCommandInput,
|
|
22
|
+
type DeleteWorkerConfigurationCommandOutput,
|
|
23
|
+
DescribeConnectorCommand,
|
|
24
|
+
type DescribeConnectorCommandInput,
|
|
25
|
+
type DescribeConnectorCommandOutput,
|
|
26
|
+
DescribeConnectorOperationCommand,
|
|
27
|
+
type DescribeConnectorOperationCommandInput,
|
|
28
|
+
type DescribeConnectorOperationCommandOutput,
|
|
29
|
+
DescribeCustomPluginCommand,
|
|
30
|
+
type DescribeCustomPluginCommandInput,
|
|
31
|
+
type DescribeCustomPluginCommandOutput,
|
|
32
|
+
DescribeWorkerConfigurationCommand,
|
|
33
|
+
type DescribeWorkerConfigurationCommandInput,
|
|
34
|
+
type DescribeWorkerConfigurationCommandOutput,
|
|
35
|
+
type KafkaConnectClient,
|
|
36
|
+
type KafkaConnectClientConfig,
|
|
37
|
+
ListConnectorOperationsCommand,
|
|
38
|
+
type ListConnectorOperationsCommandInput,
|
|
39
|
+
type ListConnectorOperationsCommandOutput,
|
|
40
|
+
ListConnectorsCommand,
|
|
41
|
+
type ListConnectorsCommandInput,
|
|
42
|
+
type ListConnectorsCommandOutput,
|
|
43
|
+
ListCustomPluginsCommand,
|
|
44
|
+
type ListCustomPluginsCommandInput,
|
|
45
|
+
type ListCustomPluginsCommandOutput,
|
|
46
|
+
ListTagsForResourceCommand,
|
|
47
|
+
type ListTagsForResourceCommandInput,
|
|
48
|
+
type ListTagsForResourceCommandOutput,
|
|
49
|
+
ListWorkerConfigurationsCommand,
|
|
50
|
+
type ListWorkerConfigurationsCommandInput,
|
|
51
|
+
type ListWorkerConfigurationsCommandOutput,
|
|
52
|
+
TagResourceCommand,
|
|
53
|
+
type TagResourceCommandInput,
|
|
54
|
+
type TagResourceCommandOutput,
|
|
55
|
+
UntagResourceCommand,
|
|
56
|
+
type UntagResourceCommandInput,
|
|
57
|
+
type UntagResourceCommandOutput,
|
|
58
|
+
UpdateConnectorCommand,
|
|
59
|
+
type UpdateConnectorCommandInput,
|
|
60
|
+
type UpdateConnectorCommandOutput,
|
|
61
|
+
} from "@aws-sdk/client-kafkaconnect";
|
|
62
|
+
import type { HttpHandlerOptions, ServiceLogger } from "@effect-aws/commons";
|
|
63
|
+
import { Service } from "@effect-aws/commons";
|
|
64
|
+
import type { Cause } from "effect";
|
|
65
|
+
import { Effect, Layer } from "effect";
|
|
66
|
+
import type {
|
|
67
|
+
BadRequestError,
|
|
68
|
+
ConflictError,
|
|
69
|
+
ForbiddenError,
|
|
70
|
+
InternalServerError,
|
|
71
|
+
NotFoundError,
|
|
72
|
+
SdkError,
|
|
73
|
+
ServiceUnavailableError,
|
|
74
|
+
TooManyRequestsError,
|
|
75
|
+
UnauthorizedError,
|
|
76
|
+
} from "./Errors.js";
|
|
77
|
+
import { AllServiceErrors } from "./Errors.js";
|
|
78
|
+
import * as Instance from "./KafkaConnectClientInstance.js";
|
|
79
|
+
import * as KafkaConnectServiceConfig from "./KafkaConnectServiceConfig.js";
|
|
80
|
+
|
|
81
|
+
const commands = {
|
|
82
|
+
CreateConnectorCommand,
|
|
83
|
+
CreateCustomPluginCommand,
|
|
84
|
+
CreateWorkerConfigurationCommand,
|
|
85
|
+
DeleteConnectorCommand,
|
|
86
|
+
DeleteCustomPluginCommand,
|
|
87
|
+
DeleteWorkerConfigurationCommand,
|
|
88
|
+
DescribeConnectorCommand,
|
|
89
|
+
DescribeConnectorOperationCommand,
|
|
90
|
+
DescribeCustomPluginCommand,
|
|
91
|
+
DescribeWorkerConfigurationCommand,
|
|
92
|
+
ListConnectorOperationsCommand,
|
|
93
|
+
ListConnectorsCommand,
|
|
94
|
+
ListCustomPluginsCommand,
|
|
95
|
+
ListTagsForResourceCommand,
|
|
96
|
+
ListWorkerConfigurationsCommand,
|
|
97
|
+
TagResourceCommand,
|
|
98
|
+
UntagResourceCommand,
|
|
99
|
+
UpdateConnectorCommand,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
interface KafkaConnectService$ {
|
|
103
|
+
readonly _: unique symbol;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* @see {@link CreateConnectorCommand}
|
|
107
|
+
*/
|
|
108
|
+
createConnector(
|
|
109
|
+
args: CreateConnectorCommandInput,
|
|
110
|
+
options?: HttpHandlerOptions,
|
|
111
|
+
): Effect.Effect<
|
|
112
|
+
CreateConnectorCommandOutput,
|
|
113
|
+
| Cause.TimeoutException
|
|
114
|
+
| SdkError
|
|
115
|
+
| BadRequestError
|
|
116
|
+
| ConflictError
|
|
117
|
+
| ForbiddenError
|
|
118
|
+
| InternalServerError
|
|
119
|
+
| NotFoundError
|
|
120
|
+
| ServiceUnavailableError
|
|
121
|
+
| TooManyRequestsError
|
|
122
|
+
| UnauthorizedError
|
|
123
|
+
>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @see {@link CreateCustomPluginCommand}
|
|
127
|
+
*/
|
|
128
|
+
createCustomPlugin(
|
|
129
|
+
args: CreateCustomPluginCommandInput,
|
|
130
|
+
options?: HttpHandlerOptions,
|
|
131
|
+
): Effect.Effect<
|
|
132
|
+
CreateCustomPluginCommandOutput,
|
|
133
|
+
| Cause.TimeoutException
|
|
134
|
+
| SdkError
|
|
135
|
+
| BadRequestError
|
|
136
|
+
| ConflictError
|
|
137
|
+
| ForbiddenError
|
|
138
|
+
| InternalServerError
|
|
139
|
+
| NotFoundError
|
|
140
|
+
| ServiceUnavailableError
|
|
141
|
+
| TooManyRequestsError
|
|
142
|
+
| UnauthorizedError
|
|
143
|
+
>;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @see {@link CreateWorkerConfigurationCommand}
|
|
147
|
+
*/
|
|
148
|
+
createWorkerConfiguration(
|
|
149
|
+
args: CreateWorkerConfigurationCommandInput,
|
|
150
|
+
options?: HttpHandlerOptions,
|
|
151
|
+
): Effect.Effect<
|
|
152
|
+
CreateWorkerConfigurationCommandOutput,
|
|
153
|
+
| Cause.TimeoutException
|
|
154
|
+
| SdkError
|
|
155
|
+
| BadRequestError
|
|
156
|
+
| ConflictError
|
|
157
|
+
| ForbiddenError
|
|
158
|
+
| InternalServerError
|
|
159
|
+
| NotFoundError
|
|
160
|
+
| ServiceUnavailableError
|
|
161
|
+
| TooManyRequestsError
|
|
162
|
+
| UnauthorizedError
|
|
163
|
+
>;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @see {@link DeleteConnectorCommand}
|
|
167
|
+
*/
|
|
168
|
+
deleteConnector(
|
|
169
|
+
args: DeleteConnectorCommandInput,
|
|
170
|
+
options?: HttpHandlerOptions,
|
|
171
|
+
): Effect.Effect<
|
|
172
|
+
DeleteConnectorCommandOutput,
|
|
173
|
+
| Cause.TimeoutException
|
|
174
|
+
| SdkError
|
|
175
|
+
| BadRequestError
|
|
176
|
+
| ForbiddenError
|
|
177
|
+
| InternalServerError
|
|
178
|
+
| NotFoundError
|
|
179
|
+
| ServiceUnavailableError
|
|
180
|
+
| TooManyRequestsError
|
|
181
|
+
| UnauthorizedError
|
|
182
|
+
>;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @see {@link DeleteCustomPluginCommand}
|
|
186
|
+
*/
|
|
187
|
+
deleteCustomPlugin(
|
|
188
|
+
args: DeleteCustomPluginCommandInput,
|
|
189
|
+
options?: HttpHandlerOptions,
|
|
190
|
+
): Effect.Effect<
|
|
191
|
+
DeleteCustomPluginCommandOutput,
|
|
192
|
+
| Cause.TimeoutException
|
|
193
|
+
| SdkError
|
|
194
|
+
| BadRequestError
|
|
195
|
+
| ForbiddenError
|
|
196
|
+
| InternalServerError
|
|
197
|
+
| NotFoundError
|
|
198
|
+
| ServiceUnavailableError
|
|
199
|
+
| TooManyRequestsError
|
|
200
|
+
| UnauthorizedError
|
|
201
|
+
>;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* @see {@link DeleteWorkerConfigurationCommand}
|
|
205
|
+
*/
|
|
206
|
+
deleteWorkerConfiguration(
|
|
207
|
+
args: DeleteWorkerConfigurationCommandInput,
|
|
208
|
+
options?: HttpHandlerOptions,
|
|
209
|
+
): Effect.Effect<
|
|
210
|
+
DeleteWorkerConfigurationCommandOutput,
|
|
211
|
+
| Cause.TimeoutException
|
|
212
|
+
| SdkError
|
|
213
|
+
| BadRequestError
|
|
214
|
+
| ForbiddenError
|
|
215
|
+
| InternalServerError
|
|
216
|
+
| NotFoundError
|
|
217
|
+
| ServiceUnavailableError
|
|
218
|
+
| TooManyRequestsError
|
|
219
|
+
| UnauthorizedError
|
|
220
|
+
>;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @see {@link DescribeConnectorCommand}
|
|
224
|
+
*/
|
|
225
|
+
describeConnector(
|
|
226
|
+
args: DescribeConnectorCommandInput,
|
|
227
|
+
options?: HttpHandlerOptions,
|
|
228
|
+
): Effect.Effect<
|
|
229
|
+
DescribeConnectorCommandOutput,
|
|
230
|
+
| Cause.TimeoutException
|
|
231
|
+
| SdkError
|
|
232
|
+
| BadRequestError
|
|
233
|
+
| ForbiddenError
|
|
234
|
+
| InternalServerError
|
|
235
|
+
| NotFoundError
|
|
236
|
+
| ServiceUnavailableError
|
|
237
|
+
| TooManyRequestsError
|
|
238
|
+
| UnauthorizedError
|
|
239
|
+
>;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @see {@link DescribeConnectorOperationCommand}
|
|
243
|
+
*/
|
|
244
|
+
describeConnectorOperation(
|
|
245
|
+
args: DescribeConnectorOperationCommandInput,
|
|
246
|
+
options?: HttpHandlerOptions,
|
|
247
|
+
): Effect.Effect<
|
|
248
|
+
DescribeConnectorOperationCommandOutput,
|
|
249
|
+
| Cause.TimeoutException
|
|
250
|
+
| SdkError
|
|
251
|
+
| BadRequestError
|
|
252
|
+
| ForbiddenError
|
|
253
|
+
| InternalServerError
|
|
254
|
+
| NotFoundError
|
|
255
|
+
| ServiceUnavailableError
|
|
256
|
+
| TooManyRequestsError
|
|
257
|
+
| UnauthorizedError
|
|
258
|
+
>;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* @see {@link DescribeCustomPluginCommand}
|
|
262
|
+
*/
|
|
263
|
+
describeCustomPlugin(
|
|
264
|
+
args: DescribeCustomPluginCommandInput,
|
|
265
|
+
options?: HttpHandlerOptions,
|
|
266
|
+
): Effect.Effect<
|
|
267
|
+
DescribeCustomPluginCommandOutput,
|
|
268
|
+
| Cause.TimeoutException
|
|
269
|
+
| SdkError
|
|
270
|
+
| BadRequestError
|
|
271
|
+
| ForbiddenError
|
|
272
|
+
| InternalServerError
|
|
273
|
+
| NotFoundError
|
|
274
|
+
| ServiceUnavailableError
|
|
275
|
+
| TooManyRequestsError
|
|
276
|
+
| UnauthorizedError
|
|
277
|
+
>;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* @see {@link DescribeWorkerConfigurationCommand}
|
|
281
|
+
*/
|
|
282
|
+
describeWorkerConfiguration(
|
|
283
|
+
args: DescribeWorkerConfigurationCommandInput,
|
|
284
|
+
options?: HttpHandlerOptions,
|
|
285
|
+
): Effect.Effect<
|
|
286
|
+
DescribeWorkerConfigurationCommandOutput,
|
|
287
|
+
| Cause.TimeoutException
|
|
288
|
+
| SdkError
|
|
289
|
+
| BadRequestError
|
|
290
|
+
| ForbiddenError
|
|
291
|
+
| InternalServerError
|
|
292
|
+
| NotFoundError
|
|
293
|
+
| ServiceUnavailableError
|
|
294
|
+
| TooManyRequestsError
|
|
295
|
+
| UnauthorizedError
|
|
296
|
+
>;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @see {@link ListConnectorOperationsCommand}
|
|
300
|
+
*/
|
|
301
|
+
listConnectorOperations(
|
|
302
|
+
args: ListConnectorOperationsCommandInput,
|
|
303
|
+
options?: HttpHandlerOptions,
|
|
304
|
+
): Effect.Effect<
|
|
305
|
+
ListConnectorOperationsCommandOutput,
|
|
306
|
+
| Cause.TimeoutException
|
|
307
|
+
| SdkError
|
|
308
|
+
| BadRequestError
|
|
309
|
+
| ForbiddenError
|
|
310
|
+
| InternalServerError
|
|
311
|
+
| NotFoundError
|
|
312
|
+
| ServiceUnavailableError
|
|
313
|
+
| TooManyRequestsError
|
|
314
|
+
| UnauthorizedError
|
|
315
|
+
>;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @see {@link ListConnectorsCommand}
|
|
319
|
+
*/
|
|
320
|
+
listConnectors(
|
|
321
|
+
args: ListConnectorsCommandInput,
|
|
322
|
+
options?: HttpHandlerOptions,
|
|
323
|
+
): Effect.Effect<
|
|
324
|
+
ListConnectorsCommandOutput,
|
|
325
|
+
| Cause.TimeoutException
|
|
326
|
+
| SdkError
|
|
327
|
+
| BadRequestError
|
|
328
|
+
| ForbiddenError
|
|
329
|
+
| InternalServerError
|
|
330
|
+
| NotFoundError
|
|
331
|
+
| ServiceUnavailableError
|
|
332
|
+
| TooManyRequestsError
|
|
333
|
+
| UnauthorizedError
|
|
334
|
+
>;
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @see {@link ListCustomPluginsCommand}
|
|
338
|
+
*/
|
|
339
|
+
listCustomPlugins(
|
|
340
|
+
args: ListCustomPluginsCommandInput,
|
|
341
|
+
options?: HttpHandlerOptions,
|
|
342
|
+
): Effect.Effect<
|
|
343
|
+
ListCustomPluginsCommandOutput,
|
|
344
|
+
| Cause.TimeoutException
|
|
345
|
+
| SdkError
|
|
346
|
+
| BadRequestError
|
|
347
|
+
| ForbiddenError
|
|
348
|
+
| InternalServerError
|
|
349
|
+
| NotFoundError
|
|
350
|
+
| ServiceUnavailableError
|
|
351
|
+
| TooManyRequestsError
|
|
352
|
+
| UnauthorizedError
|
|
353
|
+
>;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* @see {@link ListTagsForResourceCommand}
|
|
357
|
+
*/
|
|
358
|
+
listTagsForResource(
|
|
359
|
+
args: ListTagsForResourceCommandInput,
|
|
360
|
+
options?: HttpHandlerOptions,
|
|
361
|
+
): Effect.Effect<
|
|
362
|
+
ListTagsForResourceCommandOutput,
|
|
363
|
+
| Cause.TimeoutException
|
|
364
|
+
| SdkError
|
|
365
|
+
| BadRequestError
|
|
366
|
+
| ForbiddenError
|
|
367
|
+
| InternalServerError
|
|
368
|
+
| NotFoundError
|
|
369
|
+
| ServiceUnavailableError
|
|
370
|
+
| TooManyRequestsError
|
|
371
|
+
| UnauthorizedError
|
|
372
|
+
>;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* @see {@link ListWorkerConfigurationsCommand}
|
|
376
|
+
*/
|
|
377
|
+
listWorkerConfigurations(
|
|
378
|
+
args: ListWorkerConfigurationsCommandInput,
|
|
379
|
+
options?: HttpHandlerOptions,
|
|
380
|
+
): Effect.Effect<
|
|
381
|
+
ListWorkerConfigurationsCommandOutput,
|
|
382
|
+
| Cause.TimeoutException
|
|
383
|
+
| SdkError
|
|
384
|
+
| BadRequestError
|
|
385
|
+
| ForbiddenError
|
|
386
|
+
| InternalServerError
|
|
387
|
+
| NotFoundError
|
|
388
|
+
| ServiceUnavailableError
|
|
389
|
+
| TooManyRequestsError
|
|
390
|
+
| UnauthorizedError
|
|
391
|
+
>;
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @see {@link TagResourceCommand}
|
|
395
|
+
*/
|
|
396
|
+
tagResource(
|
|
397
|
+
args: TagResourceCommandInput,
|
|
398
|
+
options?: HttpHandlerOptions,
|
|
399
|
+
): Effect.Effect<
|
|
400
|
+
TagResourceCommandOutput,
|
|
401
|
+
| Cause.TimeoutException
|
|
402
|
+
| SdkError
|
|
403
|
+
| BadRequestError
|
|
404
|
+
| ConflictError
|
|
405
|
+
| ForbiddenError
|
|
406
|
+
| InternalServerError
|
|
407
|
+
| NotFoundError
|
|
408
|
+
| ServiceUnavailableError
|
|
409
|
+
| TooManyRequestsError
|
|
410
|
+
| UnauthorizedError
|
|
411
|
+
>;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* @see {@link UntagResourceCommand}
|
|
415
|
+
*/
|
|
416
|
+
untagResource(
|
|
417
|
+
args: UntagResourceCommandInput,
|
|
418
|
+
options?: HttpHandlerOptions,
|
|
419
|
+
): Effect.Effect<
|
|
420
|
+
UntagResourceCommandOutput,
|
|
421
|
+
| Cause.TimeoutException
|
|
422
|
+
| SdkError
|
|
423
|
+
| BadRequestError
|
|
424
|
+
| ForbiddenError
|
|
425
|
+
| InternalServerError
|
|
426
|
+
| NotFoundError
|
|
427
|
+
| ServiceUnavailableError
|
|
428
|
+
| TooManyRequestsError
|
|
429
|
+
| UnauthorizedError
|
|
430
|
+
>;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* @see {@link UpdateConnectorCommand}
|
|
434
|
+
*/
|
|
435
|
+
updateConnector(
|
|
436
|
+
args: UpdateConnectorCommandInput,
|
|
437
|
+
options?: HttpHandlerOptions,
|
|
438
|
+
): Effect.Effect<
|
|
439
|
+
UpdateConnectorCommandOutput,
|
|
440
|
+
| Cause.TimeoutException
|
|
441
|
+
| SdkError
|
|
442
|
+
| BadRequestError
|
|
443
|
+
| ForbiddenError
|
|
444
|
+
| InternalServerError
|
|
445
|
+
| NotFoundError
|
|
446
|
+
| ServiceUnavailableError
|
|
447
|
+
| TooManyRequestsError
|
|
448
|
+
| UnauthorizedError
|
|
449
|
+
>;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* @since 1.0.0
|
|
454
|
+
* @category constructors
|
|
455
|
+
*/
|
|
456
|
+
export const makeKafkaConnectService = Effect.gen(function*() {
|
|
457
|
+
const client = yield* Instance.KafkaConnectClientInstance;
|
|
458
|
+
|
|
459
|
+
return yield* Service.fromClientAndCommands<KafkaConnectService$>(
|
|
460
|
+
client,
|
|
461
|
+
commands,
|
|
462
|
+
{
|
|
463
|
+
errorTags: AllServiceErrors,
|
|
464
|
+
resolveClientConfig: KafkaConnectServiceConfig.toKafkaConnectClientConfig,
|
|
465
|
+
},
|
|
466
|
+
);
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* @since 1.0.0
|
|
471
|
+
* @category models
|
|
472
|
+
*/
|
|
473
|
+
export class KafkaConnectService extends Effect.Tag("@effect-aws/client-kafkaconnect/KafkaConnectService")<
|
|
474
|
+
KafkaConnectService,
|
|
475
|
+
KafkaConnectService$
|
|
476
|
+
>() {
|
|
477
|
+
static readonly defaultLayer = Layer.effect(this, makeKafkaConnectService).pipe(Layer.provide(Instance.layer));
|
|
478
|
+
static readonly layer = (config: KafkaConnectService.Config) =>
|
|
479
|
+
Layer.effect(this, makeKafkaConnectService).pipe(
|
|
480
|
+
Layer.provide(Instance.layer),
|
|
481
|
+
Layer.provide(KafkaConnectServiceConfig.setKafkaConnectServiceConfig(config)),
|
|
482
|
+
);
|
|
483
|
+
static readonly baseLayer = (
|
|
484
|
+
evaluate: (defaultConfig: KafkaConnectClientConfig) => KafkaConnectClient,
|
|
485
|
+
) =>
|
|
486
|
+
Layer.effect(this, makeKafkaConnectService).pipe(
|
|
487
|
+
Layer.provide(
|
|
488
|
+
Layer.effect(
|
|
489
|
+
Instance.KafkaConnectClientInstance,
|
|
490
|
+
Effect.map(KafkaConnectServiceConfig.toKafkaConnectClientConfig, evaluate),
|
|
491
|
+
),
|
|
492
|
+
),
|
|
493
|
+
);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* @since 1.0.0
|
|
498
|
+
*/
|
|
499
|
+
export declare namespace KafkaConnectService {
|
|
500
|
+
/**
|
|
501
|
+
* @since 1.0.0
|
|
502
|
+
*/
|
|
503
|
+
export interface Config extends Omit<KafkaConnectClientConfig, "logger"> {
|
|
504
|
+
readonly logger?: ServiceLogger.ServiceLoggerConstructorProps | true;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* @since 1.0.0
|
|
509
|
+
*/
|
|
510
|
+
export type Type = KafkaConnectService$;
|
|
511
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import type { KafkaConnectClientConfig } from "@aws-sdk/client-kafkaconnect";
|
|
5
|
+
import { ServiceLogger } from "@effect-aws/commons";
|
|
6
|
+
import { Effect, FiberRef, Layer } from "effect";
|
|
7
|
+
import { dual } from "effect/Function";
|
|
8
|
+
import { globalValue } from "effect/GlobalValue";
|
|
9
|
+
import type { KafkaConnectService } from "./KafkaConnectService.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
* @category kafkaconnect service config
|
|
14
|
+
*/
|
|
15
|
+
const currentKafkaConnectServiceConfig = globalValue(
|
|
16
|
+
"@effect-aws/client-kafkaconnect/currentKafkaConnectServiceConfig",
|
|
17
|
+
() => FiberRef.unsafeMake<KafkaConnectService.Config>({}),
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @since 1.0.0
|
|
22
|
+
* @category kafkaconnect service config
|
|
23
|
+
*/
|
|
24
|
+
export const withKafkaConnectServiceConfig: {
|
|
25
|
+
(config: KafkaConnectService.Config): <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
26
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>, config: KafkaConnectService.Config): Effect.Effect<A, E, R>;
|
|
27
|
+
} = dual(
|
|
28
|
+
2,
|
|
29
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>, config: KafkaConnectService.Config): Effect.Effect<A, E, R> =>
|
|
30
|
+
Effect.locally(effect, currentKafkaConnectServiceConfig, config),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @since 1.0.0
|
|
35
|
+
* @category kafkaconnect service config
|
|
36
|
+
*/
|
|
37
|
+
export const setKafkaConnectServiceConfig = (config: KafkaConnectService.Config) =>
|
|
38
|
+
Layer.locallyScoped(currentKafkaConnectServiceConfig, config);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @since 1.0.0
|
|
42
|
+
* @category adapters
|
|
43
|
+
*/
|
|
44
|
+
export const toKafkaConnectClientConfig: Effect.Effect<KafkaConnectClientConfig> = Effect.gen(function*() {
|
|
45
|
+
const { logger: serviceLogger, ...config } = yield* FiberRef.get(currentKafkaConnectServiceConfig);
|
|
46
|
+
|
|
47
|
+
const logger = serviceLogger === true
|
|
48
|
+
? yield* ServiceLogger.toClientLogger(ServiceLogger.defaultServiceLogger)
|
|
49
|
+
: (serviceLogger ? yield* ServiceLogger.toClientLogger(ServiceLogger.make(serviceLogger)) : undefined);
|
|
50
|
+
|
|
51
|
+
return { logger, ...config };
|
|
52
|
+
});
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import { KafkaConnectService } from "./KafkaConnectService.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from "./Errors.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @since 1.0.0
|
|
13
|
+
*/
|
|
14
|
+
export * as KafkaConnectClientInstance from "./KafkaConnectClientInstance.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
*/
|
|
19
|
+
export * as KafkaConnectServiceConfig from "./KafkaConnectServiceConfig.js";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
export * from "./KafkaConnectService.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @since 1.0.0
|
|
28
|
+
* @category exports
|
|
29
|
+
* @alias KafkaConnectService
|
|
30
|
+
*/
|
|
31
|
+
export declare namespace KafkaConnect {
|
|
32
|
+
/**
|
|
33
|
+
* @since 1.0.0
|
|
34
|
+
* @alias KafkaConnectService.Config
|
|
35
|
+
*/
|
|
36
|
+
export type Config = KafkaConnectService.Config;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @since 1.0.0
|
|
40
|
+
* @alias KafkaConnectService.Type
|
|
41
|
+
*/
|
|
42
|
+
export type Type = KafkaConnectService.Type;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @since 1.0.0
|
|
47
|
+
* @category exports
|
|
48
|
+
* @alias KafkaConnectService
|
|
49
|
+
*/
|
|
50
|
+
export const KafkaConnect = KafkaConnectService;
|