@aws-sdk/client-dsql 3.914.0 → 3.916.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/README.md CHANGED
@@ -223,6 +223,14 @@ DeleteCluster
223
223
 
224
224
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dsql/command/DeleteClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/DeleteClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/DeleteClusterCommandOutput/)
225
225
 
226
+ </details>
227
+ <details>
228
+ <summary>
229
+ DeleteClusterPolicy
230
+ </summary>
231
+
232
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dsql/command/DeleteClusterPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/DeleteClusterPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/DeleteClusterPolicyCommandOutput/)
233
+
226
234
  </details>
227
235
  <details>
228
236
  <summary>
@@ -231,6 +239,14 @@ GetCluster
231
239
 
232
240
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dsql/command/GetClusterCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/GetClusterCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/GetClusterCommandOutput/)
233
241
 
242
+ </details>
243
+ <details>
244
+ <summary>
245
+ GetClusterPolicy
246
+ </summary>
247
+
248
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dsql/command/GetClusterPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/GetClusterPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/GetClusterPolicyCommandOutput/)
249
+
234
250
  </details>
235
251
  <details>
236
252
  <summary>
@@ -255,6 +271,14 @@ ListTagsForResource
255
271
 
256
272
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dsql/command/ListTagsForResourceCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/ListTagsForResourceCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/ListTagsForResourceCommandOutput/)
257
273
 
274
+ </details>
275
+ <details>
276
+ <summary>
277
+ PutClusterPolicy
278
+ </summary>
279
+
280
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dsql/command/PutClusterPolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/PutClusterPolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-dsql/Interface/PutClusterPolicyCommandOutput/)
281
+
258
282
  </details>
259
283
  <details>
260
284
  <summary>
package/dist-cjs/index.js CHANGED
@@ -271,10 +271,12 @@ const se_CreateClusterCommand = async (input, context) => {
271
271
  b.bp("/cluster");
272
272
  let body;
273
273
  body = JSON.stringify(smithyClient.take(input, {
274
+ bypassPolicyLockoutSafetyCheck: [],
274
275
  clientToken: [true, (_) => _ ?? uuid.v4()],
275
276
  deletionProtectionEnabled: [],
276
277
  kmsEncryptionKey: [],
277
278
  multiRegionProperties: (_) => smithyClient._json(_),
279
+ policy: [],
278
280
  tags: (_) => smithyClient._json(_),
279
281
  }));
280
282
  b.m("POST").h(headers).b(body);
@@ -292,6 +294,19 @@ const se_DeleteClusterCommand = async (input, context) => {
292
294
  b.m("DELETE").h(headers).q(query).b(body);
293
295
  return b.build();
294
296
  };
297
+ const se_DeleteClusterPolicyCommand = async (input, context) => {
298
+ const b = core.requestBuilder(input, context);
299
+ const headers = {};
300
+ b.bp("/cluster/{identifier}/policy");
301
+ b.p("identifier", () => input.identifier, "{identifier}", false);
302
+ const query = smithyClient.map({
303
+ [_epv]: [, input[_ePV]],
304
+ [_ct]: [, input[_cT] ?? uuid.v4()],
305
+ });
306
+ let body;
307
+ b.m("DELETE").h(headers).q(query).b(body);
308
+ return b.build();
309
+ };
295
310
  const se_GetClusterCommand = async (input, context) => {
296
311
  const b = core.requestBuilder(input, context);
297
312
  const headers = {};
@@ -301,6 +316,15 @@ const se_GetClusterCommand = async (input, context) => {
301
316
  b.m("GET").h(headers).b(body);
302
317
  return b.build();
303
318
  };
319
+ const se_GetClusterPolicyCommand = async (input, context) => {
320
+ const b = core.requestBuilder(input, context);
321
+ const headers = {};
322
+ b.bp("/cluster/{identifier}/policy");
323
+ b.p("identifier", () => input.identifier, "{identifier}", false);
324
+ let body;
325
+ b.m("GET").h(headers).b(body);
326
+ return b.build();
327
+ };
304
328
  const se_GetVpcEndpointServiceNameCommand = async (input, context) => {
305
329
  const b = core.requestBuilder(input, context);
306
330
  const headers = {};
@@ -331,6 +355,23 @@ const se_ListTagsForResourceCommand = async (input, context) => {
331
355
  b.m("GET").h(headers).b(body);
332
356
  return b.build();
333
357
  };
358
+ const se_PutClusterPolicyCommand = async (input, context) => {
359
+ const b = core.requestBuilder(input, context);
360
+ const headers = {
361
+ "content-type": "application/json",
362
+ };
363
+ b.bp("/cluster/{identifier}/policy");
364
+ b.p("identifier", () => input.identifier, "{identifier}", false);
365
+ let body;
366
+ body = JSON.stringify(smithyClient.take(input, {
367
+ bypassPolicyLockoutSafetyCheck: [],
368
+ clientToken: [true, (_) => _ ?? uuid.v4()],
369
+ expectedPolicyVersion: [],
370
+ policy: [],
371
+ }));
372
+ b.m("POST").h(headers).b(body);
373
+ return b.build();
374
+ };
334
375
  const se_TagResourceCommand = async (input, context) => {
335
376
  const b = core.requestBuilder(input, context);
336
377
  const headers = {
@@ -411,6 +452,20 @@ const de_DeleteClusterCommand = async (output, context) => {
411
452
  Object.assign(contents, doc);
412
453
  return contents;
413
454
  };
455
+ const de_DeleteClusterPolicyCommand = async (output, context) => {
456
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
457
+ return de_CommandError(output, context);
458
+ }
459
+ const contents = smithyClient.map({
460
+ $metadata: deserializeMetadata(output),
461
+ });
462
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
463
+ const doc = smithyClient.take(data, {
464
+ policyVersion: smithyClient.expectString,
465
+ });
466
+ Object.assign(contents, doc);
467
+ return contents;
468
+ };
414
469
  const de_GetClusterCommand = async (output, context) => {
415
470
  if (output.statusCode !== 200 && output.statusCode >= 300) {
416
471
  return de_CommandError(output, context);
@@ -432,6 +487,21 @@ const de_GetClusterCommand = async (output, context) => {
432
487
  Object.assign(contents, doc);
433
488
  return contents;
434
489
  };
490
+ const de_GetClusterPolicyCommand = async (output, context) => {
491
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
492
+ return de_CommandError(output, context);
493
+ }
494
+ const contents = smithyClient.map({
495
+ $metadata: deserializeMetadata(output),
496
+ });
497
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
498
+ const doc = smithyClient.take(data, {
499
+ policy: smithyClient.expectString,
500
+ policyVersion: smithyClient.expectString,
501
+ });
502
+ Object.assign(contents, doc);
503
+ return contents;
504
+ };
435
505
  const de_GetVpcEndpointServiceNameCommand = async (output, context) => {
436
506
  if (output.statusCode !== 200 && output.statusCode >= 300) {
437
507
  return de_CommandError(output, context);
@@ -475,6 +545,20 @@ const de_ListTagsForResourceCommand = async (output, context) => {
475
545
  Object.assign(contents, doc);
476
546
  return contents;
477
547
  };
548
+ const de_PutClusterPolicyCommand = async (output, context) => {
549
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
550
+ return de_CommandError(output, context);
551
+ }
552
+ const contents = smithyClient.map({
553
+ $metadata: deserializeMetadata(output),
554
+ });
555
+ const data = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
556
+ const doc = smithyClient.take(data, {
557
+ policyVersion: smithyClient.expectString,
558
+ });
559
+ Object.assign(contents, doc);
560
+ return contents;
561
+ };
478
562
  const de_TagResourceCommand = async (output, context) => {
479
563
  if (output.statusCode !== 200 && output.statusCode >= 300) {
480
564
  return de_CommandError(output, context);
@@ -665,6 +749,8 @@ const deserializeMetadata = (output) => ({
665
749
  });
666
750
  const _cT = "clientToken";
667
751
  const _ct = "client-token";
752
+ const _ePV = "expectedPolicyVersion";
753
+ const _epv = "expected-policy-version";
668
754
  const _mR = "maxResults";
669
755
  const _mr = "max-results";
670
756
  const _nT = "nextToken";
@@ -707,6 +793,23 @@ class DeleteClusterCommand extends smithyClient.Command
707
793
  .build() {
708
794
  }
709
795
 
796
+ class DeleteClusterPolicyCommand extends smithyClient.Command
797
+ .classBuilder()
798
+ .ep(commonParams)
799
+ .m(function (Command, cs, config, o) {
800
+ return [
801
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
802
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
803
+ ];
804
+ })
805
+ .s("DSQL", "DeleteClusterPolicy", {})
806
+ .n("DSQLClient", "DeleteClusterPolicyCommand")
807
+ .f(void 0, void 0)
808
+ .ser(se_DeleteClusterPolicyCommand)
809
+ .de(de_DeleteClusterPolicyCommand)
810
+ .build() {
811
+ }
812
+
710
813
  class GetClusterCommand extends smithyClient.Command
711
814
  .classBuilder()
712
815
  .ep(commonParams)
@@ -724,6 +827,23 @@ class GetClusterCommand extends smithyClient.Command
724
827
  .build() {
725
828
  }
726
829
 
830
+ class GetClusterPolicyCommand extends smithyClient.Command
831
+ .classBuilder()
832
+ .ep(commonParams)
833
+ .m(function (Command, cs, config, o) {
834
+ return [
835
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
836
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
837
+ ];
838
+ })
839
+ .s("DSQL", "GetClusterPolicy", {})
840
+ .n("DSQLClient", "GetClusterPolicyCommand")
841
+ .f(void 0, void 0)
842
+ .ser(se_GetClusterPolicyCommand)
843
+ .de(de_GetClusterPolicyCommand)
844
+ .build() {
845
+ }
846
+
727
847
  class GetVpcEndpointServiceNameCommand extends smithyClient.Command
728
848
  .classBuilder()
729
849
  .ep(commonParams)
@@ -775,6 +895,23 @@ class ListTagsForResourceCommand extends smithyClient.Command
775
895
  .build() {
776
896
  }
777
897
 
898
+ class PutClusterPolicyCommand extends smithyClient.Command
899
+ .classBuilder()
900
+ .ep(commonParams)
901
+ .m(function (Command, cs, config, o) {
902
+ return [
903
+ middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
904
+ middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
905
+ ];
906
+ })
907
+ .s("DSQL", "PutClusterPolicy", {})
908
+ .n("DSQLClient", "PutClusterPolicyCommand")
909
+ .f(void 0, void 0)
910
+ .ser(se_PutClusterPolicyCommand)
911
+ .de(de_PutClusterPolicyCommand)
912
+ .build() {
913
+ }
914
+
778
915
  class TagResourceCommand extends smithyClient.Command
779
916
  .classBuilder()
780
917
  .ep(commonParams)
@@ -829,10 +966,13 @@ class UpdateClusterCommand extends smithyClient.Command
829
966
  const commands = {
830
967
  CreateClusterCommand,
831
968
  DeleteClusterCommand,
969
+ DeleteClusterPolicyCommand,
832
970
  GetClusterCommand,
971
+ GetClusterPolicyCommand,
833
972
  GetVpcEndpointServiceNameCommand,
834
973
  ListClustersCommand,
835
974
  ListTagsForResourceCommand,
975
+ PutClusterPolicyCommand,
836
976
  TagResourceCommand,
837
977
  UntagResourceCommand,
838
978
  UpdateClusterCommand,
@@ -913,13 +1053,16 @@ exports.DSQL = DSQL;
913
1053
  exports.DSQLClient = DSQLClient;
914
1054
  exports.DSQLServiceException = DSQLServiceException;
915
1055
  exports.DeleteClusterCommand = DeleteClusterCommand;
1056
+ exports.DeleteClusterPolicyCommand = DeleteClusterPolicyCommand;
916
1057
  exports.EncryptionStatus = EncryptionStatus;
917
1058
  exports.EncryptionType = EncryptionType;
918
1059
  exports.GetClusterCommand = GetClusterCommand;
1060
+ exports.GetClusterPolicyCommand = GetClusterPolicyCommand;
919
1061
  exports.GetVpcEndpointServiceNameCommand = GetVpcEndpointServiceNameCommand;
920
1062
  exports.InternalServerException = InternalServerException;
921
1063
  exports.ListClustersCommand = ListClustersCommand;
922
1064
  exports.ListTagsForResourceCommand = ListTagsForResourceCommand;
1065
+ exports.PutClusterPolicyCommand = PutClusterPolicyCommand;
923
1066
  exports.ResourceNotFoundException = ResourceNotFoundException;
924
1067
  exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
925
1068
  exports.TagResourceCommand = TagResourceCommand;
package/dist-es/DSQL.js CHANGED
@@ -1,10 +1,13 @@
1
1
  import { createAggregatedClient } from "@smithy/smithy-client";
2
2
  import { CreateClusterCommand, } from "./commands/CreateClusterCommand";
3
3
  import { DeleteClusterCommand, } from "./commands/DeleteClusterCommand";
4
+ import { DeleteClusterPolicyCommand, } from "./commands/DeleteClusterPolicyCommand";
4
5
  import { GetClusterCommand } from "./commands/GetClusterCommand";
6
+ import { GetClusterPolicyCommand, } from "./commands/GetClusterPolicyCommand";
5
7
  import { GetVpcEndpointServiceNameCommand, } from "./commands/GetVpcEndpointServiceNameCommand";
6
8
  import { ListClustersCommand, } from "./commands/ListClustersCommand";
7
9
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
10
+ import { PutClusterPolicyCommand, } from "./commands/PutClusterPolicyCommand";
8
11
  import { TagResourceCommand } from "./commands/TagResourceCommand";
9
12
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
10
13
  import { UpdateClusterCommand, } from "./commands/UpdateClusterCommand";
@@ -12,10 +15,13 @@ import { DSQLClient } from "./DSQLClient";
12
15
  const commands = {
13
16
  CreateClusterCommand,
14
17
  DeleteClusterCommand,
18
+ DeleteClusterPolicyCommand,
15
19
  GetClusterCommand,
20
+ GetClusterPolicyCommand,
16
21
  GetVpcEndpointServiceNameCommand,
17
22
  ListClustersCommand,
18
23
  ListTagsForResourceCommand,
24
+ PutClusterPolicyCommand,
19
25
  TagResourceCommand,
20
26
  UntagResourceCommand,
21
27
  UpdateClusterCommand,
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_DeleteClusterPolicyCommand, se_DeleteClusterPolicyCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class DeleteClusterPolicyCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "DeleteClusterPolicy", {})
17
+ .n("DSQLClient", "DeleteClusterPolicyCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_DeleteClusterPolicyCommand)
20
+ .de(de_DeleteClusterPolicyCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_GetClusterPolicyCommand, se_GetClusterPolicyCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class GetClusterPolicyCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "GetClusterPolicy", {})
17
+ .n("DSQLClient", "GetClusterPolicyCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_GetClusterPolicyCommand)
20
+ .de(de_GetClusterPolicyCommand)
21
+ .build() {
22
+ }
@@ -0,0 +1,22 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { commonParams } from "../endpoint/EndpointParameters";
5
+ import { de_PutClusterPolicyCommand, se_PutClusterPolicyCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class PutClusterPolicyCommand extends $Command
8
+ .classBuilder()
9
+ .ep(commonParams)
10
+ .m(function (Command, cs, config, o) {
11
+ return [
12
+ getSerdePlugin(config, this.serialize, this.deserialize),
13
+ getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
14
+ ];
15
+ })
16
+ .s("DSQL", "PutClusterPolicy", {})
17
+ .n("DSQLClient", "PutClusterPolicyCommand")
18
+ .f(void 0, void 0)
19
+ .ser(se_PutClusterPolicyCommand)
20
+ .de(de_PutClusterPolicyCommand)
21
+ .build() {
22
+ }
@@ -1,9 +1,12 @@
1
1
  export * from "./CreateClusterCommand";
2
2
  export * from "./DeleteClusterCommand";
3
+ export * from "./DeleteClusterPolicyCommand";
3
4
  export * from "./GetClusterCommand";
5
+ export * from "./GetClusterPolicyCommand";
4
6
  export * from "./GetVpcEndpointServiceNameCommand";
5
7
  export * from "./ListClustersCommand";
6
8
  export * from "./ListTagsForResourceCommand";
9
+ export * from "./PutClusterPolicyCommand";
7
10
  export * from "./TagResourceCommand";
8
11
  export * from "./UntagResourceCommand";
9
12
  export * from "./UpdateClusterCommand";
@@ -12,10 +12,12 @@ export const se_CreateClusterCommand = async (input, context) => {
12
12
  b.bp("/cluster");
13
13
  let body;
14
14
  body = JSON.stringify(take(input, {
15
+ bypassPolicyLockoutSafetyCheck: [],
15
16
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
16
17
  deletionProtectionEnabled: [],
17
18
  kmsEncryptionKey: [],
18
19
  multiRegionProperties: (_) => _json(_),
20
+ policy: [],
19
21
  tags: (_) => _json(_),
20
22
  }));
21
23
  b.m("POST").h(headers).b(body);
@@ -33,6 +35,19 @@ export const se_DeleteClusterCommand = async (input, context) => {
33
35
  b.m("DELETE").h(headers).q(query).b(body);
34
36
  return b.build();
35
37
  };
38
+ export const se_DeleteClusterPolicyCommand = async (input, context) => {
39
+ const b = rb(input, context);
40
+ const headers = {};
41
+ b.bp("/cluster/{identifier}/policy");
42
+ b.p("identifier", () => input.identifier, "{identifier}", false);
43
+ const query = map({
44
+ [_epv]: [, input[_ePV]],
45
+ [_ct]: [, input[_cT] ?? generateIdempotencyToken()],
46
+ });
47
+ let body;
48
+ b.m("DELETE").h(headers).q(query).b(body);
49
+ return b.build();
50
+ };
36
51
  export const se_GetClusterCommand = async (input, context) => {
37
52
  const b = rb(input, context);
38
53
  const headers = {};
@@ -42,6 +57,15 @@ export const se_GetClusterCommand = async (input, context) => {
42
57
  b.m("GET").h(headers).b(body);
43
58
  return b.build();
44
59
  };
60
+ export const se_GetClusterPolicyCommand = async (input, context) => {
61
+ const b = rb(input, context);
62
+ const headers = {};
63
+ b.bp("/cluster/{identifier}/policy");
64
+ b.p("identifier", () => input.identifier, "{identifier}", false);
65
+ let body;
66
+ b.m("GET").h(headers).b(body);
67
+ return b.build();
68
+ };
45
69
  export const se_GetVpcEndpointServiceNameCommand = async (input, context) => {
46
70
  const b = rb(input, context);
47
71
  const headers = {};
@@ -72,6 +96,23 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
72
96
  b.m("GET").h(headers).b(body);
73
97
  return b.build();
74
98
  };
99
+ export const se_PutClusterPolicyCommand = async (input, context) => {
100
+ const b = rb(input, context);
101
+ const headers = {
102
+ "content-type": "application/json",
103
+ };
104
+ b.bp("/cluster/{identifier}/policy");
105
+ b.p("identifier", () => input.identifier, "{identifier}", false);
106
+ let body;
107
+ body = JSON.stringify(take(input, {
108
+ bypassPolicyLockoutSafetyCheck: [],
109
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
110
+ expectedPolicyVersion: [],
111
+ policy: [],
112
+ }));
113
+ b.m("POST").h(headers).b(body);
114
+ return b.build();
115
+ };
75
116
  export const se_TagResourceCommand = async (input, context) => {
76
117
  const b = rb(input, context);
77
118
  const headers = {
@@ -152,6 +193,20 @@ export const de_DeleteClusterCommand = async (output, context) => {
152
193
  Object.assign(contents, doc);
153
194
  return contents;
154
195
  };
196
+ export const de_DeleteClusterPolicyCommand = async (output, context) => {
197
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
198
+ return de_CommandError(output, context);
199
+ }
200
+ const contents = map({
201
+ $metadata: deserializeMetadata(output),
202
+ });
203
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
204
+ const doc = take(data, {
205
+ policyVersion: __expectString,
206
+ });
207
+ Object.assign(contents, doc);
208
+ return contents;
209
+ };
155
210
  export const de_GetClusterCommand = async (output, context) => {
156
211
  if (output.statusCode !== 200 && output.statusCode >= 300) {
157
212
  return de_CommandError(output, context);
@@ -173,6 +228,21 @@ export const de_GetClusterCommand = async (output, context) => {
173
228
  Object.assign(contents, doc);
174
229
  return contents;
175
230
  };
231
+ export const de_GetClusterPolicyCommand = async (output, context) => {
232
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
233
+ return de_CommandError(output, context);
234
+ }
235
+ const contents = map({
236
+ $metadata: deserializeMetadata(output),
237
+ });
238
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
239
+ const doc = take(data, {
240
+ policy: __expectString,
241
+ policyVersion: __expectString,
242
+ });
243
+ Object.assign(contents, doc);
244
+ return contents;
245
+ };
176
246
  export const de_GetVpcEndpointServiceNameCommand = async (output, context) => {
177
247
  if (output.statusCode !== 200 && output.statusCode >= 300) {
178
248
  return de_CommandError(output, context);
@@ -216,6 +286,20 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
216
286
  Object.assign(contents, doc);
217
287
  return contents;
218
288
  };
289
+ export const de_PutClusterPolicyCommand = async (output, context) => {
290
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
291
+ return de_CommandError(output, context);
292
+ }
293
+ const contents = map({
294
+ $metadata: deserializeMetadata(output),
295
+ });
296
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
297
+ const doc = take(data, {
298
+ policyVersion: __expectString,
299
+ });
300
+ Object.assign(contents, doc);
301
+ return contents;
302
+ };
219
303
  export const de_TagResourceCommand = async (output, context) => {
220
304
  if (output.statusCode !== 200 && output.statusCode >= 300) {
221
305
  return de_CommandError(output, context);
@@ -407,6 +491,8 @@ const deserializeMetadata = (output) => ({
407
491
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
408
492
  const _cT = "clientToken";
409
493
  const _ct = "client-token";
494
+ const _ePV = "expectedPolicyVersion";
495
+ const _epv = "expected-policy-version";
410
496
  const _mR = "maxResults";
411
497
  const _mr = "max-results";
412
498
  const _nT = "nextToken";
@@ -1,10 +1,13 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
2
  import { CreateClusterCommandInput, CreateClusterCommandOutput } from "./commands/CreateClusterCommand";
3
3
  import { DeleteClusterCommandInput, DeleteClusterCommandOutput } from "./commands/DeleteClusterCommand";
4
+ import { DeleteClusterPolicyCommandInput, DeleteClusterPolicyCommandOutput } from "./commands/DeleteClusterPolicyCommand";
4
5
  import { GetClusterCommandInput, GetClusterCommandOutput } from "./commands/GetClusterCommand";
6
+ import { GetClusterPolicyCommandInput, GetClusterPolicyCommandOutput } from "./commands/GetClusterPolicyCommand";
5
7
  import { GetVpcEndpointServiceNameCommandInput, GetVpcEndpointServiceNameCommandOutput } from "./commands/GetVpcEndpointServiceNameCommand";
6
8
  import { ListClustersCommandInput, ListClustersCommandOutput } from "./commands/ListClustersCommand";
7
9
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
10
+ import { PutClusterPolicyCommandInput, PutClusterPolicyCommandOutput } from "./commands/PutClusterPolicyCommand";
8
11
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
9
12
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
10
13
  import { UpdateClusterCommandInput, UpdateClusterCommandOutput } from "./commands/UpdateClusterCommand";
@@ -23,12 +26,24 @@ export interface DSQL {
23
26
  deleteCluster(args: DeleteClusterCommandInput, options?: __HttpHandlerOptions): Promise<DeleteClusterCommandOutput>;
24
27
  deleteCluster(args: DeleteClusterCommandInput, cb: (err: any, data?: DeleteClusterCommandOutput) => void): void;
25
28
  deleteCluster(args: DeleteClusterCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteClusterCommandOutput) => void): void;
29
+ /**
30
+ * @see {@link DeleteClusterPolicyCommand}
31
+ */
32
+ deleteClusterPolicy(args: DeleteClusterPolicyCommandInput, options?: __HttpHandlerOptions): Promise<DeleteClusterPolicyCommandOutput>;
33
+ deleteClusterPolicy(args: DeleteClusterPolicyCommandInput, cb: (err: any, data?: DeleteClusterPolicyCommandOutput) => void): void;
34
+ deleteClusterPolicy(args: DeleteClusterPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteClusterPolicyCommandOutput) => void): void;
26
35
  /**
27
36
  * @see {@link GetClusterCommand}
28
37
  */
29
38
  getCluster(args: GetClusterCommandInput, options?: __HttpHandlerOptions): Promise<GetClusterCommandOutput>;
30
39
  getCluster(args: GetClusterCommandInput, cb: (err: any, data?: GetClusterCommandOutput) => void): void;
31
40
  getCluster(args: GetClusterCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetClusterCommandOutput) => void): void;
41
+ /**
42
+ * @see {@link GetClusterPolicyCommand}
43
+ */
44
+ getClusterPolicy(args: GetClusterPolicyCommandInput, options?: __HttpHandlerOptions): Promise<GetClusterPolicyCommandOutput>;
45
+ getClusterPolicy(args: GetClusterPolicyCommandInput, cb: (err: any, data?: GetClusterPolicyCommandOutput) => void): void;
46
+ getClusterPolicy(args: GetClusterPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetClusterPolicyCommandOutput) => void): void;
32
47
  /**
33
48
  * @see {@link GetVpcEndpointServiceNameCommand}
34
49
  */
@@ -48,6 +63,12 @@ export interface DSQL {
48
63
  listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
49
64
  listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
50
65
  listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
66
+ /**
67
+ * @see {@link PutClusterPolicyCommand}
68
+ */
69
+ putClusterPolicy(args: PutClusterPolicyCommandInput, options?: __HttpHandlerOptions): Promise<PutClusterPolicyCommandOutput>;
70
+ putClusterPolicy(args: PutClusterPolicyCommandInput, cb: (err: any, data?: PutClusterPolicyCommandOutput) => void): void;
71
+ putClusterPolicy(args: PutClusterPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutClusterPolicyCommandOutput) => void): void;
51
72
  /**
52
73
  * @see {@link TagResourceCommand}
53
74
  */
@@ -9,10 +9,13 @@ import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalc
9
9
  import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
10
10
  import { CreateClusterCommandInput, CreateClusterCommandOutput } from "./commands/CreateClusterCommand";
11
11
  import { DeleteClusterCommandInput, DeleteClusterCommandOutput } from "./commands/DeleteClusterCommand";
12
+ import { DeleteClusterPolicyCommandInput, DeleteClusterPolicyCommandOutput } from "./commands/DeleteClusterPolicyCommand";
12
13
  import { GetClusterCommandInput, GetClusterCommandOutput } from "./commands/GetClusterCommand";
14
+ import { GetClusterPolicyCommandInput, GetClusterPolicyCommandOutput } from "./commands/GetClusterPolicyCommand";
13
15
  import { GetVpcEndpointServiceNameCommandInput, GetVpcEndpointServiceNameCommandOutput } from "./commands/GetVpcEndpointServiceNameCommand";
14
16
  import { ListClustersCommandInput, ListClustersCommandOutput } from "./commands/ListClustersCommand";
15
17
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
18
+ import { PutClusterPolicyCommandInput, PutClusterPolicyCommandOutput } from "./commands/PutClusterPolicyCommand";
16
19
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
17
20
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
18
21
  import { UpdateClusterCommandInput, UpdateClusterCommandOutput } from "./commands/UpdateClusterCommand";
@@ -22,11 +25,11 @@ export { __Client };
22
25
  /**
23
26
  * @public
24
27
  */
25
- export type ServiceInputTypes = CreateClusterCommandInput | DeleteClusterCommandInput | GetClusterCommandInput | GetVpcEndpointServiceNameCommandInput | ListClustersCommandInput | ListTagsForResourceCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateClusterCommandInput;
28
+ export type ServiceInputTypes = CreateClusterCommandInput | DeleteClusterCommandInput | DeleteClusterPolicyCommandInput | GetClusterCommandInput | GetClusterPolicyCommandInput | GetVpcEndpointServiceNameCommandInput | ListClustersCommandInput | ListTagsForResourceCommandInput | PutClusterPolicyCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateClusterCommandInput;
26
29
  /**
27
30
  * @public
28
31
  */
29
- export type ServiceOutputTypes = CreateClusterCommandOutput | DeleteClusterCommandOutput | GetClusterCommandOutput | GetVpcEndpointServiceNameCommandOutput | ListClustersCommandOutput | ListTagsForResourceCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateClusterCommandOutput;
32
+ export type ServiceOutputTypes = CreateClusterCommandOutput | DeleteClusterCommandOutput | DeleteClusterPolicyCommandOutput | GetClusterCommandOutput | GetClusterPolicyCommandOutput | GetVpcEndpointServiceNameCommandOutput | ListClustersCommandOutput | ListTagsForResourceCommandOutput | PutClusterPolicyCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateClusterCommandOutput;
30
33
  /**
31
34
  * @public
32
35
  */
@@ -27,7 +27,7 @@ declare const CreateClusterCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * <p>The CreateCluster API allows you to create both single-region clusters and multi-Region
30
+ * <p>The CreateCluster API allows you to create both single-Region clusters and multi-Region
31
31
  * clusters. With the addition of the <i>multiRegionProperties</i> parameter,
32
32
  * you can create a cluster with witness Region support and establish peer relationships with
33
33
  * clusters in other Regions during creation.</p>
@@ -54,7 +54,7 @@ declare const CreateClusterCommand_base: {
54
54
  * </dd>
55
55
  * <dt>dsql:PutMultiRegionProperties</dt>
56
56
  * <dd>
57
- * <p>Permission to configure multi-region properties for a cluster.</p>
57
+ * <p>Permission to configure multi-Region properties for a cluster.</p>
58
58
  * <p>Resources: <code>arn:aws:dsql:region:account-id:cluster/*</code>
59
59
  * </p>
60
60
  * </dd>
@@ -113,6 +113,8 @@ declare const CreateClusterCommand_base: {
113
113
  * "STRING_VALUE",
114
114
  * ],
115
115
  * },
116
+ * policy: "STRING_VALUE",
117
+ * bypassPolicyLockoutSafetyCheck: true || false,
116
118
  * };
117
119
  * const command = new CreateClusterCommand(input);
118
120
  * const response = await client.send(command);