@aws-sdk/client-dsql 3.893.0 → 3.895.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.
package/dist-cjs/index.js CHANGED
@@ -1,12 +1,1130 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DSQLServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./DSQLClient"), exports);
6
- tslib_1.__exportStar(require("./DSQL"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./pagination"), exports);
9
- tslib_1.__exportStar(require("./waiters"), exports);
10
- tslib_1.__exportStar(require("./models"), exports);
11
- var DSQLServiceException_1 = require("./models/DSQLServiceException");
12
- Object.defineProperty(exports, "DSQLServiceException", { enumerable: true, get: function () { return DSQLServiceException_1.DSQLServiceException; } });
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ AccessDeniedException: () => AccessDeniedException,
25
+ ClusterStatus: () => ClusterStatus,
26
+ ConflictException: () => ConflictException,
27
+ CreateClusterCommand: () => CreateClusterCommand,
28
+ DSQL: () => DSQL,
29
+ DSQLClient: () => DSQLClient,
30
+ DSQLServiceException: () => DSQLServiceException,
31
+ DeleteClusterCommand: () => DeleteClusterCommand,
32
+ EncryptionStatus: () => EncryptionStatus,
33
+ EncryptionType: () => EncryptionType,
34
+ GetClusterCommand: () => GetClusterCommand,
35
+ GetVpcEndpointServiceNameCommand: () => GetVpcEndpointServiceNameCommand,
36
+ InternalServerException: () => InternalServerException,
37
+ ListClustersCommand: () => ListClustersCommand,
38
+ ListTagsForResourceCommand: () => ListTagsForResourceCommand,
39
+ ResourceNotFoundException: () => ResourceNotFoundException,
40
+ ServiceQuotaExceededException: () => ServiceQuotaExceededException,
41
+ TagResourceCommand: () => TagResourceCommand,
42
+ ThrottlingException: () => ThrottlingException,
43
+ UntagResourceCommand: () => UntagResourceCommand,
44
+ UpdateClusterCommand: () => UpdateClusterCommand,
45
+ ValidationException: () => ValidationException,
46
+ ValidationExceptionReason: () => ValidationExceptionReason,
47
+ __Client: () => import_smithy_client.Client,
48
+ paginateListClusters: () => paginateListClusters,
49
+ waitForClusterActive: () => waitForClusterActive,
50
+ waitForClusterNotExists: () => waitForClusterNotExists,
51
+ waitUntilClusterActive: () => waitUntilClusterActive,
52
+ waitUntilClusterNotExists: () => waitUntilClusterNotExists
53
+ });
54
+ module.exports = __toCommonJS(index_exports);
55
+
56
+ // src/DSQLClient.ts
57
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
58
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
59
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
60
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
61
+ var import_config_resolver = require("@smithy/config-resolver");
62
+ var import_core = require("@smithy/core");
63
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
64
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
65
+ var import_middleware_retry = require("@smithy/middleware-retry");
66
+
67
+ var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
68
+
69
+ // src/endpoint/EndpointParameters.ts
70
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
71
+ return Object.assign(options, {
72
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
73
+ defaultSigningName: "dsql"
74
+ });
75
+ }, "resolveClientEndpointParameters");
76
+ var commonParams = {
77
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
78
+ Endpoint: { type: "builtInParams", name: "endpoint" },
79
+ Region: { type: "builtInParams", name: "region" }
80
+ };
81
+
82
+ // src/DSQLClient.ts
83
+ var import_runtimeConfig = require("././runtimeConfig");
84
+
85
+ // src/runtimeExtensions.ts
86
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
87
+ var import_protocol_http = require("@smithy/protocol-http");
88
+ var import_smithy_client = require("@smithy/smithy-client");
89
+
90
+ // src/auth/httpAuthExtensionConfiguration.ts
91
+ var getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
92
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
93
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
94
+ let _credentials = runtimeConfig.credentials;
95
+ return {
96
+ setHttpAuthScheme(httpAuthScheme) {
97
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
98
+ if (index === -1) {
99
+ _httpAuthSchemes.push(httpAuthScheme);
100
+ } else {
101
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
102
+ }
103
+ },
104
+ httpAuthSchemes() {
105
+ return _httpAuthSchemes;
106
+ },
107
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
108
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
109
+ },
110
+ httpAuthSchemeProvider() {
111
+ return _httpAuthSchemeProvider;
112
+ },
113
+ setCredentials(credentials) {
114
+ _credentials = credentials;
115
+ },
116
+ credentials() {
117
+ return _credentials;
118
+ }
119
+ };
120
+ }, "getHttpAuthExtensionConfiguration");
121
+ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
122
+ return {
123
+ httpAuthSchemes: config.httpAuthSchemes(),
124
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
125
+ credentials: config.credentials()
126
+ };
127
+ }, "resolveHttpAuthRuntimeConfig");
128
+
129
+ // src/runtimeExtensions.ts
130
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
131
+ const extensionConfiguration = Object.assign(
132
+ (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
133
+ (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
134
+ (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
135
+ getHttpAuthExtensionConfiguration(runtimeConfig)
136
+ );
137
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
138
+ return Object.assign(
139
+ runtimeConfig,
140
+ (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
141
+ (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
142
+ (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
143
+ resolveHttpAuthRuntimeConfig(extensionConfiguration)
144
+ );
145
+ }, "resolveRuntimeExtensions");
146
+
147
+ // src/DSQLClient.ts
148
+ var DSQLClient = class extends import_smithy_client.Client {
149
+ static {
150
+ __name(this, "DSQLClient");
151
+ }
152
+ /**
153
+ * The resolved configuration of DSQLClient class. This is resolved and normalized from the {@link DSQLClientConfig | constructor configuration interface}.
154
+ */
155
+ config;
156
+ constructor(...[configuration]) {
157
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
158
+ super(_config_0);
159
+ this.initConfig = _config_0;
160
+ const _config_1 = resolveClientEndpointParameters(_config_0);
161
+ const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
162
+ const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
163
+ const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);
164
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
165
+ const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
166
+ const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
167
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
168
+ this.config = _config_8;
169
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
170
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
171
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
172
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
173
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
174
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
175
+ this.middlewareStack.use(
176
+ (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
177
+ httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultDSQLHttpAuthSchemeParametersProvider,
178
+ identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
179
+ "aws.auth#sigv4": config.credentials
180
+ }), "identityProviderConfigProvider")
181
+ })
182
+ );
183
+ this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
184
+ }
185
+ /**
186
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
187
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
188
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
189
+ */
190
+ destroy() {
191
+ super.destroy();
192
+ }
193
+ };
194
+
195
+ // src/DSQL.ts
196
+
197
+
198
+ // src/commands/CreateClusterCommand.ts
199
+
200
+ var import_middleware_serde = require("@smithy/middleware-serde");
201
+
202
+
203
+ // src/protocols/Aws_restJson1.ts
204
+ var import_core2 = require("@aws-sdk/core");
205
+
206
+
207
+ var import_uuid = require("uuid");
208
+
209
+ // src/models/DSQLServiceException.ts
210
+
211
+ var DSQLServiceException = class _DSQLServiceException extends import_smithy_client.ServiceException {
212
+ static {
213
+ __name(this, "DSQLServiceException");
214
+ }
215
+ /**
216
+ * @internal
217
+ */
218
+ constructor(options) {
219
+ super(options);
220
+ Object.setPrototypeOf(this, _DSQLServiceException.prototype);
221
+ }
222
+ };
223
+
224
+ // src/models/models_0.ts
225
+ var AccessDeniedException = class _AccessDeniedException extends DSQLServiceException {
226
+ static {
227
+ __name(this, "AccessDeniedException");
228
+ }
229
+ name = "AccessDeniedException";
230
+ $fault = "client";
231
+ /**
232
+ * @internal
233
+ */
234
+ constructor(opts) {
235
+ super({
236
+ name: "AccessDeniedException",
237
+ $fault: "client",
238
+ ...opts
239
+ });
240
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
241
+ }
242
+ };
243
+ var ClusterStatus = {
244
+ ACTIVE: "ACTIVE",
245
+ CREATING: "CREATING",
246
+ DELETED: "DELETED",
247
+ DELETING: "DELETING",
248
+ FAILED: "FAILED",
249
+ IDLE: "IDLE",
250
+ INACTIVE: "INACTIVE",
251
+ PENDING_DELETE: "PENDING_DELETE",
252
+ PENDING_SETUP: "PENDING_SETUP",
253
+ UPDATING: "UPDATING"
254
+ };
255
+ var ConflictException = class _ConflictException extends DSQLServiceException {
256
+ static {
257
+ __name(this, "ConflictException");
258
+ }
259
+ name = "ConflictException";
260
+ $fault = "client";
261
+ /**
262
+ * <p>Resource Id</p>
263
+ * @public
264
+ */
265
+ resourceId;
266
+ /**
267
+ * <p>Resource Type</p>
268
+ * @public
269
+ */
270
+ resourceType;
271
+ /**
272
+ * @internal
273
+ */
274
+ constructor(opts) {
275
+ super({
276
+ name: "ConflictException",
277
+ $fault: "client",
278
+ ...opts
279
+ });
280
+ Object.setPrototypeOf(this, _ConflictException.prototype);
281
+ this.resourceId = opts.resourceId;
282
+ this.resourceType = opts.resourceType;
283
+ }
284
+ };
285
+ var EncryptionStatus = {
286
+ ENABLED: "ENABLED",
287
+ ENABLING: "ENABLING",
288
+ KMS_KEY_INACCESSIBLE: "KMS_KEY_INACCESSIBLE",
289
+ UPDATING: "UPDATING"
290
+ };
291
+ var EncryptionType = {
292
+ AWS_OWNED_KMS_KEY: "AWS_OWNED_KMS_KEY",
293
+ CUSTOMER_MANAGED_KMS_KEY: "CUSTOMER_MANAGED_KMS_KEY"
294
+ };
295
+ var InternalServerException = class _InternalServerException extends DSQLServiceException {
296
+ static {
297
+ __name(this, "InternalServerException");
298
+ }
299
+ name = "InternalServerException";
300
+ $fault = "server";
301
+ $retryable = {};
302
+ /**
303
+ * <p>Retry after seconds.</p>
304
+ * @public
305
+ */
306
+ retryAfterSeconds;
307
+ /**
308
+ * @internal
309
+ */
310
+ constructor(opts) {
311
+ super({
312
+ name: "InternalServerException",
313
+ $fault: "server",
314
+ ...opts
315
+ });
316
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
317
+ this.retryAfterSeconds = opts.retryAfterSeconds;
318
+ }
319
+ };
320
+ var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends DSQLServiceException {
321
+ static {
322
+ __name(this, "ServiceQuotaExceededException");
323
+ }
324
+ name = "ServiceQuotaExceededException";
325
+ $fault = "client";
326
+ /**
327
+ * <p>The resource ID exceeds a quota.</p>
328
+ * @public
329
+ */
330
+ resourceId;
331
+ /**
332
+ * <p>The resource type exceeds a quota.</p>
333
+ * @public
334
+ */
335
+ resourceType;
336
+ /**
337
+ * <p>The request exceeds a service quota.</p>
338
+ * @public
339
+ */
340
+ serviceCode;
341
+ /**
342
+ * <p>The service exceeds a quota.</p>
343
+ * @public
344
+ */
345
+ quotaCode;
346
+ /**
347
+ * @internal
348
+ */
349
+ constructor(opts) {
350
+ super({
351
+ name: "ServiceQuotaExceededException",
352
+ $fault: "client",
353
+ ...opts
354
+ });
355
+ Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
356
+ this.resourceId = opts.resourceId;
357
+ this.resourceType = opts.resourceType;
358
+ this.serviceCode = opts.serviceCode;
359
+ this.quotaCode = opts.quotaCode;
360
+ }
361
+ };
362
+ var ThrottlingException = class _ThrottlingException extends DSQLServiceException {
363
+ static {
364
+ __name(this, "ThrottlingException");
365
+ }
366
+ name = "ThrottlingException";
367
+ $fault = "client";
368
+ $retryable = {
369
+ throttling: true
370
+ };
371
+ /**
372
+ * <p>The request exceeds a service quota.</p>
373
+ * @public
374
+ */
375
+ serviceCode;
376
+ /**
377
+ * <p>The request exceeds a request rate quota.</p>
378
+ * @public
379
+ */
380
+ quotaCode;
381
+ /**
382
+ * <p>The request exceeds a request rate quota. Retry after seconds.</p>
383
+ * @public
384
+ */
385
+ retryAfterSeconds;
386
+ /**
387
+ * @internal
388
+ */
389
+ constructor(opts) {
390
+ super({
391
+ name: "ThrottlingException",
392
+ $fault: "client",
393
+ ...opts
394
+ });
395
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
396
+ this.serviceCode = opts.serviceCode;
397
+ this.quotaCode = opts.quotaCode;
398
+ this.retryAfterSeconds = opts.retryAfterSeconds;
399
+ }
400
+ };
401
+ var ValidationExceptionReason = {
402
+ CANNOT_PARSE: "cannotParse",
403
+ DELETION_PROTECTION_ENABLED: "deletionProtectionEnabled",
404
+ FIELD_VALIDATION_FAILED: "fieldValidationFailed",
405
+ OTHER: "other",
406
+ UNKNOWN_OPERATION: "unknownOperation"
407
+ };
408
+ var ValidationException = class _ValidationException extends DSQLServiceException {
409
+ static {
410
+ __name(this, "ValidationException");
411
+ }
412
+ name = "ValidationException";
413
+ $fault = "client";
414
+ /**
415
+ * <p>The reason for the validation exception.</p>
416
+ * @public
417
+ */
418
+ reason;
419
+ /**
420
+ * <p>A list of fields that didn't validate.</p>
421
+ * @public
422
+ */
423
+ fieldList;
424
+ /**
425
+ * @internal
426
+ */
427
+ constructor(opts) {
428
+ super({
429
+ name: "ValidationException",
430
+ $fault: "client",
431
+ ...opts
432
+ });
433
+ Object.setPrototypeOf(this, _ValidationException.prototype);
434
+ this.reason = opts.reason;
435
+ this.fieldList = opts.fieldList;
436
+ }
437
+ };
438
+ var ResourceNotFoundException = class _ResourceNotFoundException extends DSQLServiceException {
439
+ static {
440
+ __name(this, "ResourceNotFoundException");
441
+ }
442
+ name = "ResourceNotFoundException";
443
+ $fault = "client";
444
+ /**
445
+ * <p>The resource ID could not be found.</p>
446
+ * @public
447
+ */
448
+ resourceId;
449
+ /**
450
+ * <p>The resource type could not be found.</p>
451
+ * @public
452
+ */
453
+ resourceType;
454
+ /**
455
+ * @internal
456
+ */
457
+ constructor(opts) {
458
+ super({
459
+ name: "ResourceNotFoundException",
460
+ $fault: "client",
461
+ ...opts
462
+ });
463
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
464
+ this.resourceId = opts.resourceId;
465
+ this.resourceType = opts.resourceType;
466
+ }
467
+ };
468
+
469
+ // src/protocols/Aws_restJson1.ts
470
+ var se_CreateClusterCommand = /* @__PURE__ */ __name(async (input, context) => {
471
+ const b = (0, import_core.requestBuilder)(input, context);
472
+ const headers = {
473
+ "content-type": "application/json"
474
+ };
475
+ b.bp("/cluster");
476
+ let body;
477
+ body = JSON.stringify(
478
+ (0, import_smithy_client.take)(input, {
479
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
480
+ deletionProtectionEnabled: [],
481
+ kmsEncryptionKey: [],
482
+ multiRegionProperties: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "multiRegionProperties"),
483
+ tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")
484
+ })
485
+ );
486
+ b.m("POST").h(headers).b(body);
487
+ return b.build();
488
+ }, "se_CreateClusterCommand");
489
+ var se_DeleteClusterCommand = /* @__PURE__ */ __name(async (input, context) => {
490
+ const b = (0, import_core.requestBuilder)(input, context);
491
+ const headers = {};
492
+ b.bp("/cluster/{identifier}");
493
+ b.p("identifier", () => input.identifier, "{identifier}", false);
494
+ const query = (0, import_smithy_client.map)({
495
+ [_ct]: [, input[_cT] ?? (0, import_uuid.v4)()]
496
+ });
497
+ let body;
498
+ b.m("DELETE").h(headers).q(query).b(body);
499
+ return b.build();
500
+ }, "se_DeleteClusterCommand");
501
+ var se_GetClusterCommand = /* @__PURE__ */ __name(async (input, context) => {
502
+ const b = (0, import_core.requestBuilder)(input, context);
503
+ const headers = {};
504
+ b.bp("/cluster/{identifier}");
505
+ b.p("identifier", () => input.identifier, "{identifier}", false);
506
+ let body;
507
+ b.m("GET").h(headers).b(body);
508
+ return b.build();
509
+ }, "se_GetClusterCommand");
510
+ var se_GetVpcEndpointServiceNameCommand = /* @__PURE__ */ __name(async (input, context) => {
511
+ const b = (0, import_core.requestBuilder)(input, context);
512
+ const headers = {};
513
+ b.bp("/clusters/{identifier}/vpc-endpoint-service-name");
514
+ b.p("identifier", () => input.identifier, "{identifier}", false);
515
+ let body;
516
+ b.m("GET").h(headers).b(body);
517
+ return b.build();
518
+ }, "se_GetVpcEndpointServiceNameCommand");
519
+ var se_ListClustersCommand = /* @__PURE__ */ __name(async (input, context) => {
520
+ const b = (0, import_core.requestBuilder)(input, context);
521
+ const headers = {};
522
+ b.bp("/cluster");
523
+ const query = (0, import_smithy_client.map)({
524
+ [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
525
+ [_nt]: [, input[_nT]]
526
+ });
527
+ let body;
528
+ b.m("GET").h(headers).q(query).b(body);
529
+ return b.build();
530
+ }, "se_ListClustersCommand");
531
+ var se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
532
+ const b = (0, import_core.requestBuilder)(input, context);
533
+ const headers = {};
534
+ b.bp("/tags/{resourceArn}");
535
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
536
+ let body;
537
+ b.m("GET").h(headers).b(body);
538
+ return b.build();
539
+ }, "se_ListTagsForResourceCommand");
540
+ var se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
541
+ const b = (0, import_core.requestBuilder)(input, context);
542
+ const headers = {
543
+ "content-type": "application/json"
544
+ };
545
+ b.bp("/tags/{resourceArn}");
546
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
547
+ let body;
548
+ body = JSON.stringify(
549
+ (0, import_smithy_client.take)(input, {
550
+ tags: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "tags")
551
+ })
552
+ );
553
+ b.m("POST").h(headers).b(body);
554
+ return b.build();
555
+ }, "se_TagResourceCommand");
556
+ var se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {
557
+ const b = (0, import_core.requestBuilder)(input, context);
558
+ const headers = {};
559
+ b.bp("/tags/{resourceArn}");
560
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
561
+ const query = (0, import_smithy_client.map)({
562
+ [_tK]: [(0, import_smithy_client.expectNonNull)(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []]
563
+ });
564
+ let body;
565
+ b.m("DELETE").h(headers).q(query).b(body);
566
+ return b.build();
567
+ }, "se_UntagResourceCommand");
568
+ var se_UpdateClusterCommand = /* @__PURE__ */ __name(async (input, context) => {
569
+ const b = (0, import_core.requestBuilder)(input, context);
570
+ const headers = {
571
+ "content-type": "application/json"
572
+ };
573
+ b.bp("/cluster/{identifier}");
574
+ b.p("identifier", () => input.identifier, "{identifier}", false);
575
+ let body;
576
+ body = JSON.stringify(
577
+ (0, import_smithy_client.take)(input, {
578
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
579
+ deletionProtectionEnabled: [],
580
+ kmsEncryptionKey: [],
581
+ multiRegionProperties: /* @__PURE__ */ __name((_) => (0, import_smithy_client._json)(_), "multiRegionProperties")
582
+ })
583
+ );
584
+ b.m("POST").h(headers).b(body);
585
+ return b.build();
586
+ }, "se_UpdateClusterCommand");
587
+ var de_CreateClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
588
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
589
+ return de_CommandError(output, context);
590
+ }
591
+ const contents = (0, import_smithy_client.map)({
592
+ $metadata: deserializeMetadata(output)
593
+ });
594
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
595
+ const doc = (0, import_smithy_client.take)(data, {
596
+ arn: import_smithy_client.expectString,
597
+ creationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "creationTime"),
598
+ deletionProtectionEnabled: import_smithy_client.expectBoolean,
599
+ encryptionDetails: import_smithy_client._json,
600
+ identifier: import_smithy_client.expectString,
601
+ multiRegionProperties: import_smithy_client._json,
602
+ status: import_smithy_client.expectString
603
+ });
604
+ Object.assign(contents, doc);
605
+ return contents;
606
+ }, "de_CreateClusterCommand");
607
+ var de_DeleteClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
608
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
609
+ return de_CommandError(output, context);
610
+ }
611
+ const contents = (0, import_smithy_client.map)({
612
+ $metadata: deserializeMetadata(output)
613
+ });
614
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
615
+ const doc = (0, import_smithy_client.take)(data, {
616
+ arn: import_smithy_client.expectString,
617
+ creationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "creationTime"),
618
+ identifier: import_smithy_client.expectString,
619
+ status: import_smithy_client.expectString
620
+ });
621
+ Object.assign(contents, doc);
622
+ return contents;
623
+ }, "de_DeleteClusterCommand");
624
+ var de_GetClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
625
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
626
+ return de_CommandError(output, context);
627
+ }
628
+ const contents = (0, import_smithy_client.map)({
629
+ $metadata: deserializeMetadata(output)
630
+ });
631
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
632
+ const doc = (0, import_smithy_client.take)(data, {
633
+ arn: import_smithy_client.expectString,
634
+ creationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "creationTime"),
635
+ deletionProtectionEnabled: import_smithy_client.expectBoolean,
636
+ encryptionDetails: import_smithy_client._json,
637
+ identifier: import_smithy_client.expectString,
638
+ multiRegionProperties: import_smithy_client._json,
639
+ status: import_smithy_client.expectString,
640
+ tags: import_smithy_client._json
641
+ });
642
+ Object.assign(contents, doc);
643
+ return contents;
644
+ }, "de_GetClusterCommand");
645
+ var de_GetVpcEndpointServiceNameCommand = /* @__PURE__ */ __name(async (output, context) => {
646
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
647
+ return de_CommandError(output, context);
648
+ }
649
+ const contents = (0, import_smithy_client.map)({
650
+ $metadata: deserializeMetadata(output)
651
+ });
652
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
653
+ const doc = (0, import_smithy_client.take)(data, {
654
+ serviceName: import_smithy_client.expectString
655
+ });
656
+ Object.assign(contents, doc);
657
+ return contents;
658
+ }, "de_GetVpcEndpointServiceNameCommand");
659
+ var de_ListClustersCommand = /* @__PURE__ */ __name(async (output, context) => {
660
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
661
+ return de_CommandError(output, context);
662
+ }
663
+ const contents = (0, import_smithy_client.map)({
664
+ $metadata: deserializeMetadata(output)
665
+ });
666
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
667
+ const doc = (0, import_smithy_client.take)(data, {
668
+ clusters: import_smithy_client._json,
669
+ nextToken: import_smithy_client.expectString
670
+ });
671
+ Object.assign(contents, doc);
672
+ return contents;
673
+ }, "de_ListClustersCommand");
674
+ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
675
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
676
+ return de_CommandError(output, context);
677
+ }
678
+ const contents = (0, import_smithy_client.map)({
679
+ $metadata: deserializeMetadata(output)
680
+ });
681
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
682
+ const doc = (0, import_smithy_client.take)(data, {
683
+ tags: import_smithy_client._json
684
+ });
685
+ Object.assign(contents, doc);
686
+ return contents;
687
+ }, "de_ListTagsForResourceCommand");
688
+ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
689
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
690
+ return de_CommandError(output, context);
691
+ }
692
+ const contents = (0, import_smithy_client.map)({
693
+ $metadata: deserializeMetadata(output)
694
+ });
695
+ await (0, import_smithy_client.collectBody)(output.body, context);
696
+ return contents;
697
+ }, "de_TagResourceCommand");
698
+ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
699
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
700
+ return de_CommandError(output, context);
701
+ }
702
+ const contents = (0, import_smithy_client.map)({
703
+ $metadata: deserializeMetadata(output)
704
+ });
705
+ await (0, import_smithy_client.collectBody)(output.body, context);
706
+ return contents;
707
+ }, "de_UntagResourceCommand");
708
+ var de_UpdateClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
709
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
710
+ return de_CommandError(output, context);
711
+ }
712
+ const contents = (0, import_smithy_client.map)({
713
+ $metadata: deserializeMetadata(output)
714
+ });
715
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), "body");
716
+ const doc = (0, import_smithy_client.take)(data, {
717
+ arn: import_smithy_client.expectString,
718
+ creationTime: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), "creationTime"),
719
+ identifier: import_smithy_client.expectString,
720
+ status: import_smithy_client.expectString
721
+ });
722
+ Object.assign(contents, doc);
723
+ return contents;
724
+ }, "de_UpdateClusterCommand");
725
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
726
+ const parsedOutput = {
727
+ ...output,
728
+ body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
729
+ };
730
+ const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
731
+ switch (errorCode) {
732
+ case "AccessDeniedException":
733
+ case "com.amazonaws.dsql#AccessDeniedException":
734
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
735
+ case "ConflictException":
736
+ case "com.amazonaws.dsql#ConflictException":
737
+ throw await de_ConflictExceptionRes(parsedOutput, context);
738
+ case "InternalServerException":
739
+ case "com.amazonaws.dsql#InternalServerException":
740
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
741
+ case "ServiceQuotaExceededException":
742
+ case "com.amazonaws.dsql#ServiceQuotaExceededException":
743
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
744
+ case "ThrottlingException":
745
+ case "com.amazonaws.dsql#ThrottlingException":
746
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
747
+ case "ValidationException":
748
+ case "com.amazonaws.dsql#ValidationException":
749
+ throw await de_ValidationExceptionRes(parsedOutput, context);
750
+ case "ResourceNotFoundException":
751
+ case "com.amazonaws.dsql#ResourceNotFoundException":
752
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
753
+ default:
754
+ const parsedBody = parsedOutput.body;
755
+ return throwDefaultError({
756
+ output,
757
+ parsedBody,
758
+ errorCode
759
+ });
760
+ }
761
+ }, "de_CommandError");
762
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(DSQLServiceException);
763
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
764
+ const contents = (0, import_smithy_client.map)({});
765
+ const data = parsedOutput.body;
766
+ const doc = (0, import_smithy_client.take)(data, {
767
+ message: import_smithy_client.expectString
768
+ });
769
+ Object.assign(contents, doc);
770
+ const exception = new AccessDeniedException({
771
+ $metadata: deserializeMetadata(parsedOutput),
772
+ ...contents
773
+ });
774
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
775
+ }, "de_AccessDeniedExceptionRes");
776
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
777
+ const contents = (0, import_smithy_client.map)({});
778
+ const data = parsedOutput.body;
779
+ const doc = (0, import_smithy_client.take)(data, {
780
+ message: import_smithy_client.expectString,
781
+ resourceId: import_smithy_client.expectString,
782
+ resourceType: import_smithy_client.expectString
783
+ });
784
+ Object.assign(contents, doc);
785
+ const exception = new ConflictException({
786
+ $metadata: deserializeMetadata(parsedOutput),
787
+ ...contents
788
+ });
789
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
790
+ }, "de_ConflictExceptionRes");
791
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
792
+ const contents = (0, import_smithy_client.map)({
793
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
794
+ });
795
+ const data = parsedOutput.body;
796
+ const doc = (0, import_smithy_client.take)(data, {
797
+ message: import_smithy_client.expectString
798
+ });
799
+ Object.assign(contents, doc);
800
+ const exception = new InternalServerException({
801
+ $metadata: deserializeMetadata(parsedOutput),
802
+ ...contents
803
+ });
804
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
805
+ }, "de_InternalServerExceptionRes");
806
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
807
+ const contents = (0, import_smithy_client.map)({});
808
+ const data = parsedOutput.body;
809
+ const doc = (0, import_smithy_client.take)(data, {
810
+ message: import_smithy_client.expectString,
811
+ resourceId: import_smithy_client.expectString,
812
+ resourceType: import_smithy_client.expectString
813
+ });
814
+ Object.assign(contents, doc);
815
+ const exception = new ResourceNotFoundException({
816
+ $metadata: deserializeMetadata(parsedOutput),
817
+ ...contents
818
+ });
819
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
820
+ }, "de_ResourceNotFoundExceptionRes");
821
+ var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
822
+ const contents = (0, import_smithy_client.map)({});
823
+ const data = parsedOutput.body;
824
+ const doc = (0, import_smithy_client.take)(data, {
825
+ message: import_smithy_client.expectString,
826
+ quotaCode: import_smithy_client.expectString,
827
+ resourceId: import_smithy_client.expectString,
828
+ resourceType: import_smithy_client.expectString,
829
+ serviceCode: import_smithy_client.expectString
830
+ });
831
+ Object.assign(contents, doc);
832
+ const exception = new ServiceQuotaExceededException({
833
+ $metadata: deserializeMetadata(parsedOutput),
834
+ ...contents
835
+ });
836
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
837
+ }, "de_ServiceQuotaExceededExceptionRes");
838
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
839
+ const contents = (0, import_smithy_client.map)({
840
+ [_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, import_smithy_client.strictParseInt32)(parsedOutput.headers[_ra])]
841
+ });
842
+ const data = parsedOutput.body;
843
+ const doc = (0, import_smithy_client.take)(data, {
844
+ message: import_smithy_client.expectString,
845
+ quotaCode: import_smithy_client.expectString,
846
+ serviceCode: import_smithy_client.expectString
847
+ });
848
+ Object.assign(contents, doc);
849
+ const exception = new ThrottlingException({
850
+ $metadata: deserializeMetadata(parsedOutput),
851
+ ...contents
852
+ });
853
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
854
+ }, "de_ThrottlingExceptionRes");
855
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
856
+ const contents = (0, import_smithy_client.map)({});
857
+ const data = parsedOutput.body;
858
+ const doc = (0, import_smithy_client.take)(data, {
859
+ fieldList: import_smithy_client._json,
860
+ message: import_smithy_client.expectString,
861
+ reason: import_smithy_client.expectString
862
+ });
863
+ Object.assign(contents, doc);
864
+ const exception = new ValidationException({
865
+ $metadata: deserializeMetadata(parsedOutput),
866
+ ...contents
867
+ });
868
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
869
+ }, "de_ValidationExceptionRes");
870
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
871
+ httpStatusCode: output.statusCode,
872
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
873
+ extendedRequestId: output.headers["x-amz-id-2"],
874
+ cfId: output.headers["x-amz-cf-id"]
875
+ }), "deserializeMetadata");
876
+ var _cT = "clientToken";
877
+ var _ct = "client-token";
878
+ var _mR = "maxResults";
879
+ var _mr = "max-results";
880
+ var _nT = "nextToken";
881
+ var _nt = "next-token";
882
+ var _rAS = "retryAfterSeconds";
883
+ var _ra = "retry-after";
884
+ var _tK = "tagKeys";
885
+
886
+ // src/commands/CreateClusterCommand.ts
887
+ var CreateClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
888
+ return [
889
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
890
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
891
+ ];
892
+ }).s("DSQL", "CreateCluster", {}).n("DSQLClient", "CreateClusterCommand").f(void 0, void 0).ser(se_CreateClusterCommand).de(de_CreateClusterCommand).build() {
893
+ static {
894
+ __name(this, "CreateClusterCommand");
895
+ }
896
+ };
897
+
898
+ // src/commands/DeleteClusterCommand.ts
899
+
900
+
901
+
902
+ var DeleteClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
903
+ return [
904
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
905
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
906
+ ];
907
+ }).s("DSQL", "DeleteCluster", {}).n("DSQLClient", "DeleteClusterCommand").f(void 0, void 0).ser(se_DeleteClusterCommand).de(de_DeleteClusterCommand).build() {
908
+ static {
909
+ __name(this, "DeleteClusterCommand");
910
+ }
911
+ };
912
+
913
+ // src/commands/GetClusterCommand.ts
914
+
915
+
916
+
917
+ var GetClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
918
+ return [
919
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
920
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
921
+ ];
922
+ }).s("DSQL", "GetCluster", {}).n("DSQLClient", "GetClusterCommand").f(void 0, void 0).ser(se_GetClusterCommand).de(de_GetClusterCommand).build() {
923
+ static {
924
+ __name(this, "GetClusterCommand");
925
+ }
926
+ };
927
+
928
+ // src/commands/GetVpcEndpointServiceNameCommand.ts
929
+
930
+
931
+
932
+ var GetVpcEndpointServiceNameCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
933
+ return [
934
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
935
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
936
+ ];
937
+ }).s("DSQL", "GetVpcEndpointServiceName", {}).n("DSQLClient", "GetVpcEndpointServiceNameCommand").f(void 0, void 0).ser(se_GetVpcEndpointServiceNameCommand).de(de_GetVpcEndpointServiceNameCommand).build() {
938
+ static {
939
+ __name(this, "GetVpcEndpointServiceNameCommand");
940
+ }
941
+ };
942
+
943
+ // src/commands/ListClustersCommand.ts
944
+
945
+
946
+
947
+ var ListClustersCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
948
+ return [
949
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
950
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
951
+ ];
952
+ }).s("DSQL", "ListClusters", {}).n("DSQLClient", "ListClustersCommand").f(void 0, void 0).ser(se_ListClustersCommand).de(de_ListClustersCommand).build() {
953
+ static {
954
+ __name(this, "ListClustersCommand");
955
+ }
956
+ };
957
+
958
+ // src/commands/ListTagsForResourceCommand.ts
959
+
960
+
961
+
962
+ var ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
963
+ return [
964
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
965
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
966
+ ];
967
+ }).s("DSQL", "ListTagsForResource", {}).n("DSQLClient", "ListTagsForResourceCommand").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {
968
+ static {
969
+ __name(this, "ListTagsForResourceCommand");
970
+ }
971
+ };
972
+
973
+ // src/commands/TagResourceCommand.ts
974
+
975
+
976
+
977
+ var TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
978
+ return [
979
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
980
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
981
+ ];
982
+ }).s("DSQL", "TagResource", {}).n("DSQLClient", "TagResourceCommand").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {
983
+ static {
984
+ __name(this, "TagResourceCommand");
985
+ }
986
+ };
987
+
988
+ // src/commands/UntagResourceCommand.ts
989
+
990
+
991
+
992
+ var UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
993
+ return [
994
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
995
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
996
+ ];
997
+ }).s("DSQL", "UntagResource", {}).n("DSQLClient", "UntagResourceCommand").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {
998
+ static {
999
+ __name(this, "UntagResourceCommand");
1000
+ }
1001
+ };
1002
+
1003
+ // src/commands/UpdateClusterCommand.ts
1004
+
1005
+
1006
+
1007
+ var UpdateClusterCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
1008
+ return [
1009
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
1010
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
1011
+ ];
1012
+ }).s("DSQL", "UpdateCluster", {}).n("DSQLClient", "UpdateClusterCommand").f(void 0, void 0).ser(se_UpdateClusterCommand).de(de_UpdateClusterCommand).build() {
1013
+ static {
1014
+ __name(this, "UpdateClusterCommand");
1015
+ }
1016
+ };
1017
+
1018
+ // src/DSQL.ts
1019
+ var commands = {
1020
+ CreateClusterCommand,
1021
+ DeleteClusterCommand,
1022
+ GetClusterCommand,
1023
+ GetVpcEndpointServiceNameCommand,
1024
+ ListClustersCommand,
1025
+ ListTagsForResourceCommand,
1026
+ TagResourceCommand,
1027
+ UntagResourceCommand,
1028
+ UpdateClusterCommand
1029
+ };
1030
+ var DSQL = class extends DSQLClient {
1031
+ static {
1032
+ __name(this, "DSQL");
1033
+ }
1034
+ };
1035
+ (0, import_smithy_client.createAggregatedClient)(commands, DSQL);
1036
+
1037
+ // src/pagination/ListClustersPaginator.ts
1038
+
1039
+ var paginateListClusters = (0, import_core.createPaginator)(DSQLClient, ListClustersCommand, "nextToken", "nextToken", "maxResults");
1040
+
1041
+ // src/waiters/waitForClusterActive.ts
1042
+ var import_util_waiter = require("@smithy/util-waiter");
1043
+ var checkState = /* @__PURE__ */ __name(async (client, input) => {
1044
+ let reason;
1045
+ try {
1046
+ const result = await client.send(new GetClusterCommand(input));
1047
+ reason = result;
1048
+ try {
1049
+ const returnComparator = /* @__PURE__ */ __name(() => {
1050
+ return result.status;
1051
+ }, "returnComparator");
1052
+ if (returnComparator() === "ACTIVE") {
1053
+ return { state: import_util_waiter.WaiterState.SUCCESS, reason };
1054
+ }
1055
+ } catch (e) {
1056
+ }
1057
+ } catch (exception) {
1058
+ reason = exception;
1059
+ }
1060
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
1061
+ }, "checkState");
1062
+ var waitForClusterActive = /* @__PURE__ */ __name(async (params, input) => {
1063
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
1064
+ return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
1065
+ }, "waitForClusterActive");
1066
+ var waitUntilClusterActive = /* @__PURE__ */ __name(async (params, input) => {
1067
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
1068
+ const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);
1069
+ return (0, import_util_waiter.checkExceptions)(result);
1070
+ }, "waitUntilClusterActive");
1071
+
1072
+ // src/waiters/waitForClusterNotExists.ts
1073
+
1074
+ var checkState2 = /* @__PURE__ */ __name(async (client, input) => {
1075
+ let reason;
1076
+ try {
1077
+ const result = await client.send(new GetClusterCommand(input));
1078
+ reason = result;
1079
+ } catch (exception) {
1080
+ reason = exception;
1081
+ if (exception.name && exception.name == "ResourceNotFoundException") {
1082
+ return { state: import_util_waiter.WaiterState.SUCCESS, reason };
1083
+ }
1084
+ }
1085
+ return { state: import_util_waiter.WaiterState.RETRY, reason };
1086
+ }, "checkState");
1087
+ var waitForClusterNotExists = /* @__PURE__ */ __name(async (params, input) => {
1088
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
1089
+ return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
1090
+ }, "waitForClusterNotExists");
1091
+ var waitUntilClusterNotExists = /* @__PURE__ */ __name(async (params, input) => {
1092
+ const serviceDefaults = { minDelay: 2, maxDelay: 120 };
1093
+ const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);
1094
+ return (0, import_util_waiter.checkExceptions)(result);
1095
+ }, "waitUntilClusterNotExists");
1096
+ // Annotate the CommonJS export names for ESM import in node:
1097
+
1098
+ 0 && (module.exports = {
1099
+ DSQLServiceException,
1100
+ __Client,
1101
+ DSQLClient,
1102
+ DSQL,
1103
+ $Command,
1104
+ CreateClusterCommand,
1105
+ DeleteClusterCommand,
1106
+ GetClusterCommand,
1107
+ GetVpcEndpointServiceNameCommand,
1108
+ ListClustersCommand,
1109
+ ListTagsForResourceCommand,
1110
+ TagResourceCommand,
1111
+ UntagResourceCommand,
1112
+ UpdateClusterCommand,
1113
+ paginateListClusters,
1114
+ waitForClusterActive,
1115
+ waitUntilClusterActive,
1116
+ waitForClusterNotExists,
1117
+ waitUntilClusterNotExists,
1118
+ AccessDeniedException,
1119
+ ClusterStatus,
1120
+ ConflictException,
1121
+ EncryptionStatus,
1122
+ EncryptionType,
1123
+ InternalServerException,
1124
+ ServiceQuotaExceededException,
1125
+ ThrottlingException,
1126
+ ValidationExceptionReason,
1127
+ ValidationException,
1128
+ ResourceNotFoundException
1129
+ });
1130
+