@effect-aws/client-kms 1.9.3 → 1.10.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/src/KMSService.ts CHANGED
@@ -166,6 +166,7 @@ import {
166
166
  } from "@aws-sdk/client-kms";
167
167
  import type { HttpHandlerOptions, SdkError, ServiceLogger } from "@effect-aws/commons";
168
168
  import { Service } from "@effect-aws/commons";
169
+ import type { Cause } from "effect";
169
170
  import { Effect, Layer } from "effect";
170
171
  import type {
171
172
  AlreadyExistsError,
@@ -288,7 +289,13 @@ interface KMSService$ {
288
289
  options?: HttpHandlerOptions,
289
290
  ): Effect.Effect<
290
291
  CancelKeyDeletionCommandOutput,
291
- SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError
292
+ | Cause.TimeoutException
293
+ | SdkError
294
+ | DependencyTimeoutError
295
+ | InvalidArnError
296
+ | KMSInternalError
297
+ | KMSInvalidStateError
298
+ | NotFoundError
292
299
  >;
293
300
 
294
301
  /**
@@ -299,6 +306,7 @@ interface KMSService$ {
299
306
  options?: HttpHandlerOptions,
300
307
  ): Effect.Effect<
301
308
  ConnectCustomKeyStoreCommandOutput,
309
+ | Cause.TimeoutException
302
310
  | SdkError
303
311
  | CloudHsmClusterInvalidConfigurationError
304
312
  | CloudHsmClusterNotActiveError
@@ -315,6 +323,7 @@ interface KMSService$ {
315
323
  options?: HttpHandlerOptions,
316
324
  ): Effect.Effect<
317
325
  CreateAliasCommandOutput,
326
+ | Cause.TimeoutException
318
327
  | SdkError
319
328
  | AlreadyExistsError
320
329
  | DependencyTimeoutError
@@ -333,6 +342,7 @@ interface KMSService$ {
333
342
  options?: HttpHandlerOptions,
334
343
  ): Effect.Effect<
335
344
  CreateCustomKeyStoreCommandOutput,
345
+ | Cause.TimeoutException
336
346
  | SdkError
337
347
  | CloudHsmClusterInUseError
338
348
  | CloudHsmClusterInvalidConfigurationError
@@ -361,6 +371,7 @@ interface KMSService$ {
361
371
  options?: HttpHandlerOptions,
362
372
  ): Effect.Effect<
363
373
  CreateGrantCommandOutput,
374
+ | Cause.TimeoutException
364
375
  | SdkError
365
376
  | DependencyTimeoutError
366
377
  | DisabledError
@@ -381,6 +392,7 @@ interface KMSService$ {
381
392
  options?: HttpHandlerOptions,
382
393
  ): Effect.Effect<
383
394
  CreateKeyCommandOutput,
395
+ | Cause.TimeoutException
384
396
  | SdkError
385
397
  | CloudHsmClusterInvalidConfigurationError
386
398
  | CustomKeyStoreInvalidStateError
@@ -405,6 +417,7 @@ interface KMSService$ {
405
417
  options?: HttpHandlerOptions,
406
418
  ): Effect.Effect<
407
419
  DecryptCommandOutput,
420
+ | Cause.TimeoutException
408
421
  | SdkError
409
422
  | DependencyTimeoutError
410
423
  | DisabledError
@@ -427,7 +440,7 @@ interface KMSService$ {
427
440
  options?: HttpHandlerOptions,
428
441
  ): Effect.Effect<
429
442
  DeleteAliasCommandOutput,
430
- SdkError | DependencyTimeoutError | KMSInternalError | KMSInvalidStateError | NotFoundError
443
+ Cause.TimeoutException | SdkError | DependencyTimeoutError | KMSInternalError | KMSInvalidStateError | NotFoundError
431
444
  >;
432
445
 
433
446
  /**
@@ -438,6 +451,7 @@ interface KMSService$ {
438
451
  options?: HttpHandlerOptions,
439
452
  ): Effect.Effect<
440
453
  DeleteCustomKeyStoreCommandOutput,
454
+ | Cause.TimeoutException
441
455
  | SdkError
442
456
  | CustomKeyStoreHasCMKsError
443
457
  | CustomKeyStoreInvalidStateError
@@ -453,6 +467,7 @@ interface KMSService$ {
453
467
  options?: HttpHandlerOptions,
454
468
  ): Effect.Effect<
455
469
  DeleteImportedKeyMaterialCommandOutput,
470
+ | Cause.TimeoutException
456
471
  | SdkError
457
472
  | DependencyTimeoutError
458
473
  | InvalidArnError
@@ -470,6 +485,7 @@ interface KMSService$ {
470
485
  options?: HttpHandlerOptions,
471
486
  ): Effect.Effect<
472
487
  DeriveSharedSecretCommandOutput,
488
+ | Cause.TimeoutException
473
489
  | SdkError
474
490
  | DependencyTimeoutError
475
491
  | DisabledError
@@ -490,7 +506,7 @@ interface KMSService$ {
490
506
  options?: HttpHandlerOptions,
491
507
  ): Effect.Effect<
492
508
  DescribeCustomKeyStoresCommandOutput,
493
- SdkError | CustomKeyStoreNotFoundError | InvalidMarkerError | KMSInternalError
509
+ Cause.TimeoutException | SdkError | CustomKeyStoreNotFoundError | InvalidMarkerError | KMSInternalError
494
510
  >;
495
511
 
496
512
  /**
@@ -501,7 +517,7 @@ interface KMSService$ {
501
517
  options?: HttpHandlerOptions,
502
518
  ): Effect.Effect<
503
519
  DescribeKeyCommandOutput,
504
- SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | NotFoundError
520
+ Cause.TimeoutException | SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | NotFoundError
505
521
  >;
506
522
 
507
523
  /**
@@ -512,7 +528,13 @@ interface KMSService$ {
512
528
  options?: HttpHandlerOptions,
513
529
  ): Effect.Effect<
514
530
  DisableKeyCommandOutput,
515
- SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError
531
+ | Cause.TimeoutException
532
+ | SdkError
533
+ | DependencyTimeoutError
534
+ | InvalidArnError
535
+ | KMSInternalError
536
+ | KMSInvalidStateError
537
+ | NotFoundError
516
538
  >;
517
539
 
518
540
  /**
@@ -523,6 +545,7 @@ interface KMSService$ {
523
545
  options?: HttpHandlerOptions,
524
546
  ): Effect.Effect<
525
547
  DisableKeyRotationCommandOutput,
548
+ | Cause.TimeoutException
526
549
  | SdkError
527
550
  | DependencyTimeoutError
528
551
  | DisabledError
@@ -541,7 +564,7 @@ interface KMSService$ {
541
564
  options?: HttpHandlerOptions,
542
565
  ): Effect.Effect<
543
566
  DisconnectCustomKeyStoreCommandOutput,
544
- SdkError | CustomKeyStoreInvalidStateError | CustomKeyStoreNotFoundError | KMSInternalError
567
+ Cause.TimeoutException | SdkError | CustomKeyStoreInvalidStateError | CustomKeyStoreNotFoundError | KMSInternalError
545
568
  >;
546
569
 
547
570
  /**
@@ -552,6 +575,7 @@ interface KMSService$ {
552
575
  options?: HttpHandlerOptions,
553
576
  ): Effect.Effect<
554
577
  EnableKeyCommandOutput,
578
+ | Cause.TimeoutException
555
579
  | SdkError
556
580
  | DependencyTimeoutError
557
581
  | InvalidArnError
@@ -569,6 +593,7 @@ interface KMSService$ {
569
593
  options?: HttpHandlerOptions,
570
594
  ): Effect.Effect<
571
595
  EnableKeyRotationCommandOutput,
596
+ | Cause.TimeoutException
572
597
  | SdkError
573
598
  | DependencyTimeoutError
574
599
  | DisabledError
@@ -587,6 +612,7 @@ interface KMSService$ {
587
612
  options?: HttpHandlerOptions,
588
613
  ): Effect.Effect<
589
614
  EncryptCommandOutput,
615
+ | Cause.TimeoutException
590
616
  | SdkError
591
617
  | DependencyTimeoutError
592
618
  | DisabledError
@@ -607,6 +633,7 @@ interface KMSService$ {
607
633
  options?: HttpHandlerOptions,
608
634
  ): Effect.Effect<
609
635
  GenerateDataKeyCommandOutput,
636
+ | Cause.TimeoutException
610
637
  | SdkError
611
638
  | DependencyTimeoutError
612
639
  | DisabledError
@@ -627,6 +654,7 @@ interface KMSService$ {
627
654
  options?: HttpHandlerOptions,
628
655
  ): Effect.Effect<
629
656
  GenerateDataKeyPairCommandOutput,
657
+ | Cause.TimeoutException
630
658
  | SdkError
631
659
  | DependencyTimeoutError
632
660
  | DisabledError
@@ -648,6 +676,7 @@ interface KMSService$ {
648
676
  options?: HttpHandlerOptions,
649
677
  ): Effect.Effect<
650
678
  GenerateDataKeyPairWithoutPlaintextCommandOutput,
679
+ | Cause.TimeoutException
651
680
  | SdkError
652
681
  | DependencyTimeoutError
653
682
  | DisabledError
@@ -669,6 +698,7 @@ interface KMSService$ {
669
698
  options?: HttpHandlerOptions,
670
699
  ): Effect.Effect<
671
700
  GenerateDataKeyWithoutPlaintextCommandOutput,
701
+ | Cause.TimeoutException
672
702
  | SdkError
673
703
  | DependencyTimeoutError
674
704
  | DisabledError
@@ -689,6 +719,7 @@ interface KMSService$ {
689
719
  options?: HttpHandlerOptions,
690
720
  ): Effect.Effect<
691
721
  GenerateMacCommandOutput,
722
+ | Cause.TimeoutException
692
723
  | SdkError
693
724
  | DisabledError
694
725
  | DryRunOperationError
@@ -708,6 +739,7 @@ interface KMSService$ {
708
739
  options?: HttpHandlerOptions,
709
740
  ): Effect.Effect<
710
741
  GenerateRandomCommandOutput,
742
+ | Cause.TimeoutException
711
743
  | SdkError
712
744
  | CustomKeyStoreInvalidStateError
713
745
  | CustomKeyStoreNotFoundError
@@ -724,7 +756,13 @@ interface KMSService$ {
724
756
  options?: HttpHandlerOptions,
725
757
  ): Effect.Effect<
726
758
  GetKeyPolicyCommandOutput,
727
- SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError
759
+ | Cause.TimeoutException
760
+ | SdkError
761
+ | DependencyTimeoutError
762
+ | InvalidArnError
763
+ | KMSInternalError
764
+ | KMSInvalidStateError
765
+ | NotFoundError
728
766
  >;
729
767
 
730
768
  /**
@@ -735,6 +773,7 @@ interface KMSService$ {
735
773
  options?: HttpHandlerOptions,
736
774
  ): Effect.Effect<
737
775
  GetKeyRotationStatusCommandOutput,
776
+ | Cause.TimeoutException
738
777
  | SdkError
739
778
  | DependencyTimeoutError
740
779
  | InvalidArnError
@@ -752,6 +791,7 @@ interface KMSService$ {
752
791
  options?: HttpHandlerOptions,
753
792
  ): Effect.Effect<
754
793
  GetParametersForImportCommandOutput,
794
+ | Cause.TimeoutException
755
795
  | SdkError
756
796
  | DependencyTimeoutError
757
797
  | InvalidArnError
@@ -769,6 +809,7 @@ interface KMSService$ {
769
809
  options?: HttpHandlerOptions,
770
810
  ): Effect.Effect<
771
811
  GetPublicKeyCommandOutput,
812
+ | Cause.TimeoutException
772
813
  | SdkError
773
814
  | DependencyTimeoutError
774
815
  | DisabledError
@@ -790,6 +831,7 @@ interface KMSService$ {
790
831
  options?: HttpHandlerOptions,
791
832
  ): Effect.Effect<
792
833
  ImportKeyMaterialCommandOutput,
834
+ | Cause.TimeoutException
793
835
  | SdkError
794
836
  | DependencyTimeoutError
795
837
  | ExpiredImportTokenError
@@ -811,7 +853,13 @@ interface KMSService$ {
811
853
  options?: HttpHandlerOptions,
812
854
  ): Effect.Effect<
813
855
  ListAliasesCommandOutput,
814
- SdkError | DependencyTimeoutError | InvalidArnError | InvalidMarkerError | KMSInternalError | NotFoundError
856
+ | Cause.TimeoutException
857
+ | SdkError
858
+ | DependencyTimeoutError
859
+ | InvalidArnError
860
+ | InvalidMarkerError
861
+ | KMSInternalError
862
+ | NotFoundError
815
863
  >;
816
864
 
817
865
  /**
@@ -822,6 +870,7 @@ interface KMSService$ {
822
870
  options?: HttpHandlerOptions,
823
871
  ): Effect.Effect<
824
872
  ListGrantsCommandOutput,
873
+ | Cause.TimeoutException
825
874
  | SdkError
826
875
  | DependencyTimeoutError
827
876
  | InvalidArnError
@@ -840,7 +889,13 @@ interface KMSService$ {
840
889
  options?: HttpHandlerOptions,
841
890
  ): Effect.Effect<
842
891
  ListKeyPoliciesCommandOutput,
843
- SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError
892
+ | Cause.TimeoutException
893
+ | SdkError
894
+ | DependencyTimeoutError
895
+ | InvalidArnError
896
+ | KMSInternalError
897
+ | KMSInvalidStateError
898
+ | NotFoundError
844
899
  >;
845
900
 
846
901
  /**
@@ -851,6 +906,7 @@ interface KMSService$ {
851
906
  options?: HttpHandlerOptions,
852
907
  ): Effect.Effect<
853
908
  ListKeyRotationsCommandOutput,
909
+ | Cause.TimeoutException
854
910
  | SdkError
855
911
  | InvalidArnError
856
912
  | InvalidMarkerError
@@ -868,7 +924,7 @@ interface KMSService$ {
868
924
  options?: HttpHandlerOptions,
869
925
  ): Effect.Effect<
870
926
  ListKeysCommandOutput,
871
- SdkError | DependencyTimeoutError | InvalidMarkerError | KMSInternalError
927
+ Cause.TimeoutException | SdkError | DependencyTimeoutError | InvalidMarkerError | KMSInternalError
872
928
  >;
873
929
 
874
930
  /**
@@ -879,7 +935,7 @@ interface KMSService$ {
879
935
  options?: HttpHandlerOptions,
880
936
  ): Effect.Effect<
881
937
  ListResourceTagsCommandOutput,
882
- SdkError | InvalidArnError | InvalidMarkerError | KMSInternalError | NotFoundError
938
+ Cause.TimeoutException | SdkError | InvalidArnError | InvalidMarkerError | KMSInternalError | NotFoundError
883
939
  >;
884
940
 
885
941
  /**
@@ -890,7 +946,13 @@ interface KMSService$ {
890
946
  options?: HttpHandlerOptions,
891
947
  ): Effect.Effect<
892
948
  ListRetirableGrantsCommandOutput,
893
- SdkError | DependencyTimeoutError | InvalidArnError | InvalidMarkerError | KMSInternalError | NotFoundError
949
+ | Cause.TimeoutException
950
+ | SdkError
951
+ | DependencyTimeoutError
952
+ | InvalidArnError
953
+ | InvalidMarkerError
954
+ | KMSInternalError
955
+ | NotFoundError
894
956
  >;
895
957
 
896
958
  /**
@@ -901,6 +963,7 @@ interface KMSService$ {
901
963
  options?: HttpHandlerOptions,
902
964
  ): Effect.Effect<
903
965
  PutKeyPolicyCommandOutput,
966
+ | Cause.TimeoutException
904
967
  | SdkError
905
968
  | DependencyTimeoutError
906
969
  | InvalidArnError
@@ -920,6 +983,7 @@ interface KMSService$ {
920
983
  options?: HttpHandlerOptions,
921
984
  ): Effect.Effect<
922
985
  ReEncryptCommandOutput,
986
+ | Cause.TimeoutException
923
987
  | SdkError
924
988
  | DependencyTimeoutError
925
989
  | DisabledError
@@ -942,6 +1006,7 @@ interface KMSService$ {
942
1006
  options?: HttpHandlerOptions,
943
1007
  ): Effect.Effect<
944
1008
  ReplicateKeyCommandOutput,
1009
+ | Cause.TimeoutException
945
1010
  | SdkError
946
1011
  | AlreadyExistsError
947
1012
  | DisabledError
@@ -963,6 +1028,7 @@ interface KMSService$ {
963
1028
  options?: HttpHandlerOptions,
964
1029
  ): Effect.Effect<
965
1030
  RetireGrantCommandOutput,
1031
+ | Cause.TimeoutException
966
1032
  | SdkError
967
1033
  | DependencyTimeoutError
968
1034
  | DryRunOperationError
@@ -982,6 +1048,7 @@ interface KMSService$ {
982
1048
  options?: HttpHandlerOptions,
983
1049
  ): Effect.Effect<
984
1050
  RevokeGrantCommandOutput,
1051
+ | Cause.TimeoutException
985
1052
  | SdkError
986
1053
  | DependencyTimeoutError
987
1054
  | DryRunOperationError
@@ -1000,6 +1067,7 @@ interface KMSService$ {
1000
1067
  options?: HttpHandlerOptions,
1001
1068
  ): Effect.Effect<
1002
1069
  RotateKeyOnDemandCommandOutput,
1070
+ | Cause.TimeoutException
1003
1071
  | SdkError
1004
1072
  | ConflictError
1005
1073
  | DependencyTimeoutError
@@ -1020,7 +1088,13 @@ interface KMSService$ {
1020
1088
  options?: HttpHandlerOptions,
1021
1089
  ): Effect.Effect<
1022
1090
  ScheduleKeyDeletionCommandOutput,
1023
- SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError
1091
+ | Cause.TimeoutException
1092
+ | SdkError
1093
+ | DependencyTimeoutError
1094
+ | InvalidArnError
1095
+ | KMSInternalError
1096
+ | KMSInvalidStateError
1097
+ | NotFoundError
1024
1098
  >;
1025
1099
 
1026
1100
  /**
@@ -1031,6 +1105,7 @@ interface KMSService$ {
1031
1105
  options?: HttpHandlerOptions,
1032
1106
  ): Effect.Effect<
1033
1107
  SignCommandOutput,
1108
+ | Cause.TimeoutException
1034
1109
  | SdkError
1035
1110
  | DependencyTimeoutError
1036
1111
  | DisabledError
@@ -1051,7 +1126,14 @@ interface KMSService$ {
1051
1126
  options?: HttpHandlerOptions,
1052
1127
  ): Effect.Effect<
1053
1128
  TagResourceCommandOutput,
1054
- SdkError | InvalidArnError | KMSInternalError | KMSInvalidStateError | LimitExceededError | NotFoundError | TagError
1129
+ | Cause.TimeoutException
1130
+ | SdkError
1131
+ | InvalidArnError
1132
+ | KMSInternalError
1133
+ | KMSInvalidStateError
1134
+ | LimitExceededError
1135
+ | NotFoundError
1136
+ | TagError
1055
1137
  >;
1056
1138
 
1057
1139
  /**
@@ -1062,7 +1144,13 @@ interface KMSService$ {
1062
1144
  options?: HttpHandlerOptions,
1063
1145
  ): Effect.Effect<
1064
1146
  UntagResourceCommandOutput,
1065
- SdkError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError | TagError
1147
+ | Cause.TimeoutException
1148
+ | SdkError
1149
+ | InvalidArnError
1150
+ | KMSInternalError
1151
+ | KMSInvalidStateError
1152
+ | NotFoundError
1153
+ | TagError
1066
1154
  >;
1067
1155
 
1068
1156
  /**
@@ -1073,7 +1161,13 @@ interface KMSService$ {
1073
1161
  options?: HttpHandlerOptions,
1074
1162
  ): Effect.Effect<
1075
1163
  UpdateAliasCommandOutput,
1076
- SdkError | DependencyTimeoutError | KMSInternalError | KMSInvalidStateError | LimitExceededError | NotFoundError
1164
+ | Cause.TimeoutException
1165
+ | SdkError
1166
+ | DependencyTimeoutError
1167
+ | KMSInternalError
1168
+ | KMSInvalidStateError
1169
+ | LimitExceededError
1170
+ | NotFoundError
1077
1171
  >;
1078
1172
 
1079
1173
  /**
@@ -1084,6 +1178,7 @@ interface KMSService$ {
1084
1178
  options?: HttpHandlerOptions,
1085
1179
  ): Effect.Effect<
1086
1180
  UpdateCustomKeyStoreCommandOutput,
1181
+ | Cause.TimeoutException
1087
1182
  | SdkError
1088
1183
  | CloudHsmClusterInvalidConfigurationError
1089
1184
  | CloudHsmClusterNotActiveError
@@ -1112,7 +1207,13 @@ interface KMSService$ {
1112
1207
  options?: HttpHandlerOptions,
1113
1208
  ): Effect.Effect<
1114
1209
  UpdateKeyDescriptionCommandOutput,
1115
- SdkError | DependencyTimeoutError | InvalidArnError | KMSInternalError | KMSInvalidStateError | NotFoundError
1210
+ | Cause.TimeoutException
1211
+ | SdkError
1212
+ | DependencyTimeoutError
1213
+ | InvalidArnError
1214
+ | KMSInternalError
1215
+ | KMSInvalidStateError
1216
+ | NotFoundError
1116
1217
  >;
1117
1218
 
1118
1219
  /**
@@ -1123,6 +1224,7 @@ interface KMSService$ {
1123
1224
  options?: HttpHandlerOptions,
1124
1225
  ): Effect.Effect<
1125
1226
  UpdatePrimaryRegionCommandOutput,
1227
+ | Cause.TimeoutException
1126
1228
  | SdkError
1127
1229
  | DisabledError
1128
1230
  | InvalidArnError
@@ -1140,6 +1242,7 @@ interface KMSService$ {
1140
1242
  options?: HttpHandlerOptions,
1141
1243
  ): Effect.Effect<
1142
1244
  VerifyCommandOutput,
1245
+ | Cause.TimeoutException
1143
1246
  | SdkError
1144
1247
  | DependencyTimeoutError
1145
1248
  | DisabledError
@@ -1161,6 +1264,7 @@ interface KMSService$ {
1161
1264
  options?: HttpHandlerOptions,
1162
1265
  ): Effect.Effect<
1163
1266
  VerifyMacCommandOutput,
1267
+ | Cause.TimeoutException
1164
1268
  | SdkError
1165
1269
  | DisabledError
1166
1270
  | DryRunOperationError
@@ -1181,7 +1285,7 @@ interface KMSService$ {
1181
1285
  export const makeKMSService = Effect.gen(function*() {
1182
1286
  const client = yield* Instance.KMSClientInstance;
1183
1287
 
1184
- return Service.fromClientAndCommands<KMSService$>(
1288
+ return yield* Service.fromClientAndCommands<KMSService$>(
1185
1289
  client,
1186
1290
  commands,
1187
1291
  {