@aws-sdk/client-servicediscovery 3.315.0 → 3.319.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.
@@ -1,3 +1,4 @@
1
+ import { createAggregatedClient } from "@aws-sdk/smithy-client";
1
2
  import { CreateHttpNamespaceCommand, } from "./commands/CreateHttpNamespaceCommand";
2
3
  import { CreatePrivateDnsNamespaceCommand, } from "./commands/CreatePrivateDnsNamespaceCommand";
3
4
  import { CreatePublicDnsNamespaceCommand, } from "./commands/CreatePublicDnsNamespaceCommand";
@@ -25,369 +26,34 @@ import { UpdatePrivateDnsNamespaceCommand, } from "./commands/UpdatePrivateDnsNa
25
26
  import { UpdatePublicDnsNamespaceCommand, } from "./commands/UpdatePublicDnsNamespaceCommand";
26
27
  import { UpdateServiceCommand, } from "./commands/UpdateServiceCommand";
27
28
  import { ServiceDiscoveryClient } from "./ServiceDiscoveryClient";
29
+ const commands = {
30
+ CreateHttpNamespaceCommand,
31
+ CreatePrivateDnsNamespaceCommand,
32
+ CreatePublicDnsNamespaceCommand,
33
+ CreateServiceCommand,
34
+ DeleteNamespaceCommand,
35
+ DeleteServiceCommand,
36
+ DeregisterInstanceCommand,
37
+ DiscoverInstancesCommand,
38
+ GetInstanceCommand,
39
+ GetInstancesHealthStatusCommand,
40
+ GetNamespaceCommand,
41
+ GetOperationCommand,
42
+ GetServiceCommand,
43
+ ListInstancesCommand,
44
+ ListNamespacesCommand,
45
+ ListOperationsCommand,
46
+ ListServicesCommand,
47
+ ListTagsForResourceCommand,
48
+ RegisterInstanceCommand,
49
+ TagResourceCommand,
50
+ UntagResourceCommand,
51
+ UpdateHttpNamespaceCommand,
52
+ UpdateInstanceCustomHealthStatusCommand,
53
+ UpdatePrivateDnsNamespaceCommand,
54
+ UpdatePublicDnsNamespaceCommand,
55
+ UpdateServiceCommand,
56
+ };
28
57
  export class ServiceDiscovery extends ServiceDiscoveryClient {
29
- createHttpNamespace(args, optionsOrCb, cb) {
30
- const command = new CreateHttpNamespaceCommand(args);
31
- if (typeof optionsOrCb === "function") {
32
- this.send(command, optionsOrCb);
33
- }
34
- else if (typeof cb === "function") {
35
- if (typeof optionsOrCb !== "object")
36
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
37
- this.send(command, optionsOrCb || {}, cb);
38
- }
39
- else {
40
- return this.send(command, optionsOrCb);
41
- }
42
- }
43
- createPrivateDnsNamespace(args, optionsOrCb, cb) {
44
- const command = new CreatePrivateDnsNamespaceCommand(args);
45
- if (typeof optionsOrCb === "function") {
46
- this.send(command, optionsOrCb);
47
- }
48
- else if (typeof cb === "function") {
49
- if (typeof optionsOrCb !== "object")
50
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
51
- this.send(command, optionsOrCb || {}, cb);
52
- }
53
- else {
54
- return this.send(command, optionsOrCb);
55
- }
56
- }
57
- createPublicDnsNamespace(args, optionsOrCb, cb) {
58
- const command = new CreatePublicDnsNamespaceCommand(args);
59
- if (typeof optionsOrCb === "function") {
60
- this.send(command, optionsOrCb);
61
- }
62
- else if (typeof cb === "function") {
63
- if (typeof optionsOrCb !== "object")
64
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
65
- this.send(command, optionsOrCb || {}, cb);
66
- }
67
- else {
68
- return this.send(command, optionsOrCb);
69
- }
70
- }
71
- createService(args, optionsOrCb, cb) {
72
- const command = new CreateServiceCommand(args);
73
- if (typeof optionsOrCb === "function") {
74
- this.send(command, optionsOrCb);
75
- }
76
- else if (typeof cb === "function") {
77
- if (typeof optionsOrCb !== "object")
78
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
79
- this.send(command, optionsOrCb || {}, cb);
80
- }
81
- else {
82
- return this.send(command, optionsOrCb);
83
- }
84
- }
85
- deleteNamespace(args, optionsOrCb, cb) {
86
- const command = new DeleteNamespaceCommand(args);
87
- if (typeof optionsOrCb === "function") {
88
- this.send(command, optionsOrCb);
89
- }
90
- else if (typeof cb === "function") {
91
- if (typeof optionsOrCb !== "object")
92
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
93
- this.send(command, optionsOrCb || {}, cb);
94
- }
95
- else {
96
- return this.send(command, optionsOrCb);
97
- }
98
- }
99
- deleteService(args, optionsOrCb, cb) {
100
- const command = new DeleteServiceCommand(args);
101
- if (typeof optionsOrCb === "function") {
102
- this.send(command, optionsOrCb);
103
- }
104
- else if (typeof cb === "function") {
105
- if (typeof optionsOrCb !== "object")
106
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
107
- this.send(command, optionsOrCb || {}, cb);
108
- }
109
- else {
110
- return this.send(command, optionsOrCb);
111
- }
112
- }
113
- deregisterInstance(args, optionsOrCb, cb) {
114
- const command = new DeregisterInstanceCommand(args);
115
- if (typeof optionsOrCb === "function") {
116
- this.send(command, optionsOrCb);
117
- }
118
- else if (typeof cb === "function") {
119
- if (typeof optionsOrCb !== "object")
120
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
121
- this.send(command, optionsOrCb || {}, cb);
122
- }
123
- else {
124
- return this.send(command, optionsOrCb);
125
- }
126
- }
127
- discoverInstances(args, optionsOrCb, cb) {
128
- const command = new DiscoverInstancesCommand(args);
129
- if (typeof optionsOrCb === "function") {
130
- this.send(command, optionsOrCb);
131
- }
132
- else if (typeof cb === "function") {
133
- if (typeof optionsOrCb !== "object")
134
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
135
- this.send(command, optionsOrCb || {}, cb);
136
- }
137
- else {
138
- return this.send(command, optionsOrCb);
139
- }
140
- }
141
- getInstance(args, optionsOrCb, cb) {
142
- const command = new GetInstanceCommand(args);
143
- if (typeof optionsOrCb === "function") {
144
- this.send(command, optionsOrCb);
145
- }
146
- else if (typeof cb === "function") {
147
- if (typeof optionsOrCb !== "object")
148
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
149
- this.send(command, optionsOrCb || {}, cb);
150
- }
151
- else {
152
- return this.send(command, optionsOrCb);
153
- }
154
- }
155
- getInstancesHealthStatus(args, optionsOrCb, cb) {
156
- const command = new GetInstancesHealthStatusCommand(args);
157
- if (typeof optionsOrCb === "function") {
158
- this.send(command, optionsOrCb);
159
- }
160
- else if (typeof cb === "function") {
161
- if (typeof optionsOrCb !== "object")
162
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
163
- this.send(command, optionsOrCb || {}, cb);
164
- }
165
- else {
166
- return this.send(command, optionsOrCb);
167
- }
168
- }
169
- getNamespace(args, optionsOrCb, cb) {
170
- const command = new GetNamespaceCommand(args);
171
- if (typeof optionsOrCb === "function") {
172
- this.send(command, optionsOrCb);
173
- }
174
- else if (typeof cb === "function") {
175
- if (typeof optionsOrCb !== "object")
176
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
177
- this.send(command, optionsOrCb || {}, cb);
178
- }
179
- else {
180
- return this.send(command, optionsOrCb);
181
- }
182
- }
183
- getOperation(args, optionsOrCb, cb) {
184
- const command = new GetOperationCommand(args);
185
- if (typeof optionsOrCb === "function") {
186
- this.send(command, optionsOrCb);
187
- }
188
- else if (typeof cb === "function") {
189
- if (typeof optionsOrCb !== "object")
190
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
191
- this.send(command, optionsOrCb || {}, cb);
192
- }
193
- else {
194
- return this.send(command, optionsOrCb);
195
- }
196
- }
197
- getService(args, optionsOrCb, cb) {
198
- const command = new GetServiceCommand(args);
199
- if (typeof optionsOrCb === "function") {
200
- this.send(command, optionsOrCb);
201
- }
202
- else if (typeof cb === "function") {
203
- if (typeof optionsOrCb !== "object")
204
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
205
- this.send(command, optionsOrCb || {}, cb);
206
- }
207
- else {
208
- return this.send(command, optionsOrCb);
209
- }
210
- }
211
- listInstances(args, optionsOrCb, cb) {
212
- const command = new ListInstancesCommand(args);
213
- if (typeof optionsOrCb === "function") {
214
- this.send(command, optionsOrCb);
215
- }
216
- else if (typeof cb === "function") {
217
- if (typeof optionsOrCb !== "object")
218
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
219
- this.send(command, optionsOrCb || {}, cb);
220
- }
221
- else {
222
- return this.send(command, optionsOrCb);
223
- }
224
- }
225
- listNamespaces(args, optionsOrCb, cb) {
226
- const command = new ListNamespacesCommand(args);
227
- if (typeof optionsOrCb === "function") {
228
- this.send(command, optionsOrCb);
229
- }
230
- else if (typeof cb === "function") {
231
- if (typeof optionsOrCb !== "object")
232
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
233
- this.send(command, optionsOrCb || {}, cb);
234
- }
235
- else {
236
- return this.send(command, optionsOrCb);
237
- }
238
- }
239
- listOperations(args, optionsOrCb, cb) {
240
- const command = new ListOperationsCommand(args);
241
- if (typeof optionsOrCb === "function") {
242
- this.send(command, optionsOrCb);
243
- }
244
- else if (typeof cb === "function") {
245
- if (typeof optionsOrCb !== "object")
246
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
247
- this.send(command, optionsOrCb || {}, cb);
248
- }
249
- else {
250
- return this.send(command, optionsOrCb);
251
- }
252
- }
253
- listServices(args, optionsOrCb, cb) {
254
- const command = new ListServicesCommand(args);
255
- if (typeof optionsOrCb === "function") {
256
- this.send(command, optionsOrCb);
257
- }
258
- else if (typeof cb === "function") {
259
- if (typeof optionsOrCb !== "object")
260
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
261
- this.send(command, optionsOrCb || {}, cb);
262
- }
263
- else {
264
- return this.send(command, optionsOrCb);
265
- }
266
- }
267
- listTagsForResource(args, optionsOrCb, cb) {
268
- const command = new ListTagsForResourceCommand(args);
269
- if (typeof optionsOrCb === "function") {
270
- this.send(command, optionsOrCb);
271
- }
272
- else if (typeof cb === "function") {
273
- if (typeof optionsOrCb !== "object")
274
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
275
- this.send(command, optionsOrCb || {}, cb);
276
- }
277
- else {
278
- return this.send(command, optionsOrCb);
279
- }
280
- }
281
- registerInstance(args, optionsOrCb, cb) {
282
- const command = new RegisterInstanceCommand(args);
283
- if (typeof optionsOrCb === "function") {
284
- this.send(command, optionsOrCb);
285
- }
286
- else if (typeof cb === "function") {
287
- if (typeof optionsOrCb !== "object")
288
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
289
- this.send(command, optionsOrCb || {}, cb);
290
- }
291
- else {
292
- return this.send(command, optionsOrCb);
293
- }
294
- }
295
- tagResource(args, optionsOrCb, cb) {
296
- const command = new TagResourceCommand(args);
297
- if (typeof optionsOrCb === "function") {
298
- this.send(command, optionsOrCb);
299
- }
300
- else if (typeof cb === "function") {
301
- if (typeof optionsOrCb !== "object")
302
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
303
- this.send(command, optionsOrCb || {}, cb);
304
- }
305
- else {
306
- return this.send(command, optionsOrCb);
307
- }
308
- }
309
- untagResource(args, optionsOrCb, cb) {
310
- const command = new UntagResourceCommand(args);
311
- if (typeof optionsOrCb === "function") {
312
- this.send(command, optionsOrCb);
313
- }
314
- else if (typeof cb === "function") {
315
- if (typeof optionsOrCb !== "object")
316
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
317
- this.send(command, optionsOrCb || {}, cb);
318
- }
319
- else {
320
- return this.send(command, optionsOrCb);
321
- }
322
- }
323
- updateHttpNamespace(args, optionsOrCb, cb) {
324
- const command = new UpdateHttpNamespaceCommand(args);
325
- if (typeof optionsOrCb === "function") {
326
- this.send(command, optionsOrCb);
327
- }
328
- else if (typeof cb === "function") {
329
- if (typeof optionsOrCb !== "object")
330
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
331
- this.send(command, optionsOrCb || {}, cb);
332
- }
333
- else {
334
- return this.send(command, optionsOrCb);
335
- }
336
- }
337
- updateInstanceCustomHealthStatus(args, optionsOrCb, cb) {
338
- const command = new UpdateInstanceCustomHealthStatusCommand(args);
339
- if (typeof optionsOrCb === "function") {
340
- this.send(command, optionsOrCb);
341
- }
342
- else if (typeof cb === "function") {
343
- if (typeof optionsOrCb !== "object")
344
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
345
- this.send(command, optionsOrCb || {}, cb);
346
- }
347
- else {
348
- return this.send(command, optionsOrCb);
349
- }
350
- }
351
- updatePrivateDnsNamespace(args, optionsOrCb, cb) {
352
- const command = new UpdatePrivateDnsNamespaceCommand(args);
353
- if (typeof optionsOrCb === "function") {
354
- this.send(command, optionsOrCb);
355
- }
356
- else if (typeof cb === "function") {
357
- if (typeof optionsOrCb !== "object")
358
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
359
- this.send(command, optionsOrCb || {}, cb);
360
- }
361
- else {
362
- return this.send(command, optionsOrCb);
363
- }
364
- }
365
- updatePublicDnsNamespace(args, optionsOrCb, cb) {
366
- const command = new UpdatePublicDnsNamespaceCommand(args);
367
- if (typeof optionsOrCb === "function") {
368
- this.send(command, optionsOrCb);
369
- }
370
- else if (typeof cb === "function") {
371
- if (typeof optionsOrCb !== "object")
372
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
373
- this.send(command, optionsOrCb || {}, cb);
374
- }
375
- else {
376
- return this.send(command, optionsOrCb);
377
- }
378
- }
379
- updateService(args, optionsOrCb, cb) {
380
- const command = new UpdateServiceCommand(args);
381
- if (typeof optionsOrCb === "function") {
382
- this.send(command, optionsOrCb);
383
- }
384
- else if (typeof cb === "function") {
385
- if (typeof optionsOrCb !== "object")
386
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
387
- this.send(command, optionsOrCb || {}, cb);
388
- }
389
- else {
390
- return this.send(command, optionsOrCb);
391
- }
392
- }
393
58
  }
59
+ createAggregatedClient(commands, ServiceDiscovery);
@@ -1297,7 +1297,7 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1297
1297
  };
1298
1298
  const se_CreateHttpNamespaceRequest = (input, context) => {
1299
1299
  return take(input, {
1300
- CreatorRequestId: (_) => _ ?? generateIdempotencyToken(),
1300
+ CreatorRequestId: [true, (_) => _ ?? generateIdempotencyToken()],
1301
1301
  Description: [],
1302
1302
  Name: [],
1303
1303
  Tags: _json,
@@ -1305,7 +1305,7 @@ const se_CreateHttpNamespaceRequest = (input, context) => {
1305
1305
  };
1306
1306
  const se_CreatePrivateDnsNamespaceRequest = (input, context) => {
1307
1307
  return take(input, {
1308
- CreatorRequestId: (_) => _ ?? generateIdempotencyToken(),
1308
+ CreatorRequestId: [true, (_) => _ ?? generateIdempotencyToken()],
1309
1309
  Description: [],
1310
1310
  Name: [],
1311
1311
  Properties: _json,
@@ -1315,7 +1315,7 @@ const se_CreatePrivateDnsNamespaceRequest = (input, context) => {
1315
1315
  };
1316
1316
  const se_CreatePublicDnsNamespaceRequest = (input, context) => {
1317
1317
  return take(input, {
1318
- CreatorRequestId: (_) => _ ?? generateIdempotencyToken(),
1318
+ CreatorRequestId: [true, (_) => _ ?? generateIdempotencyToken()],
1319
1319
  Description: [],
1320
1320
  Name: [],
1321
1321
  Properties: _json,
@@ -1324,7 +1324,7 @@ const se_CreatePublicDnsNamespaceRequest = (input, context) => {
1324
1324
  };
1325
1325
  const se_CreateServiceRequest = (input, context) => {
1326
1326
  return take(input, {
1327
- CreatorRequestId: (_) => _ ?? generateIdempotencyToken(),
1327
+ CreatorRequestId: [true, (_) => _ ?? generateIdempotencyToken()],
1328
1328
  Description: [],
1329
1329
  DnsConfig: _json,
1330
1330
  HealthCheckConfig: _json,
@@ -1338,7 +1338,7 @@ const se_CreateServiceRequest = (input, context) => {
1338
1338
  const se_RegisterInstanceRequest = (input, context) => {
1339
1339
  return take(input, {
1340
1340
  Attributes: _json,
1341
- CreatorRequestId: (_) => _ ?? generateIdempotencyToken(),
1341
+ CreatorRequestId: [true, (_) => _ ?? generateIdempotencyToken()],
1342
1342
  InstanceId: [],
1343
1343
  ServiceId: [],
1344
1344
  });
@@ -1347,21 +1347,21 @@ const se_UpdateHttpNamespaceRequest = (input, context) => {
1347
1347
  return take(input, {
1348
1348
  Id: [],
1349
1349
  Namespace: _json,
1350
- UpdaterRequestId: (_) => _ ?? generateIdempotencyToken(),
1350
+ UpdaterRequestId: [true, (_) => _ ?? generateIdempotencyToken()],
1351
1351
  });
1352
1352
  };
1353
1353
  const se_UpdatePrivateDnsNamespaceRequest = (input, context) => {
1354
1354
  return take(input, {
1355
1355
  Id: [],
1356
1356
  Namespace: _json,
1357
- UpdaterRequestId: (_) => _ ?? generateIdempotencyToken(),
1357
+ UpdaterRequestId: [true, (_) => _ ?? generateIdempotencyToken()],
1358
1358
  });
1359
1359
  };
1360
1360
  const se_UpdatePublicDnsNamespaceRequest = (input, context) => {
1361
1361
  return take(input, {
1362
1362
  Id: [],
1363
1363
  Namespace: _json,
1364
- UpdaterRequestId: (_) => _ ?? generateIdempotencyToken(),
1364
+ UpdaterRequestId: [true, (_) => _ ?? generateIdempotencyToken()],
1365
1365
  });
1366
1366
  };
1367
1367
  const de_CreateServiceResponse = (output, context) => {