aws-sdk-kms 1.134.0 → 1.136.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.
@@ -61,6 +61,8 @@ module Aws::KMS
61
61
  DataKeyPairSpec = Shapes::StringShape.new(name: 'DataKeyPairSpec')
62
62
  DataKeySpec = Shapes::StringShape.new(name: 'DataKeySpec')
63
63
  DateType = Shapes::TimestampShape.new(name: 'DateType')
64
+ DecapsulateRequest = Shapes::StructureShape.new(name: 'DecapsulateRequest')
65
+ DecapsulateResponse = Shapes::StructureShape.new(name: 'DecapsulateResponse')
64
66
  DecryptRequest = Shapes::StructureShape.new(name: 'DecryptRequest')
65
67
  DecryptResponse = Shapes::StructureShape.new(name: 'DecryptResponse')
66
68
  DeleteAliasRequest = Shapes::StructureShape.new(name: 'DeleteAliasRequest')
@@ -86,6 +88,10 @@ module Aws::KMS
86
88
  DryRunOperationException = Shapes::StructureShape.new(name: 'DryRunOperationException')
87
89
  EnableKeyRequest = Shapes::StructureShape.new(name: 'EnableKeyRequest')
88
90
  EnableKeyRotationRequest = Shapes::StructureShape.new(name: 'EnableKeyRotationRequest')
91
+ EncapsulateRequest = Shapes::StructureShape.new(name: 'EncapsulateRequest')
92
+ EncapsulateResponse = Shapes::StructureShape.new(name: 'EncapsulateResponse')
93
+ EncapsulationAlgorithmSpec = Shapes::StringShape.new(name: 'EncapsulationAlgorithmSpec')
94
+ EncapsulationAlgorithmSpecList = Shapes::ListShape.new(name: 'EncapsulationAlgorithmSpecList')
89
95
  EncryptRequest = Shapes::StructureShape.new(name: 'EncryptRequest')
90
96
  EncryptResponse = Shapes::StructureShape.new(name: 'EncryptResponse')
91
97
  EncryptionAlgorithmSpec = Shapes::StringShape.new(name: 'EncryptionAlgorithmSpec')
@@ -384,6 +390,18 @@ module Aws::KMS
384
390
  CustomKeyStoresListEntry.add_member(:xks_proxy_configuration, Shapes::ShapeRef.new(shape: XksProxyConfigurationType, location_name: "XksProxyConfiguration"))
385
391
  CustomKeyStoresListEntry.struct_class = Types::CustomKeyStoresListEntry
386
392
 
393
+ DecapsulateRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
394
+ DecapsulateRequest.add_member(:shared_secret_ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, required: true, location_name: "SharedSecretCiphertextBlob"))
395
+ DecapsulateRequest.add_member(:encapsulation_algorithm, Shapes::ShapeRef.new(shape: EncapsulationAlgorithmSpec, required: true, location_name: "EncapsulationAlgorithm"))
396
+ DecapsulateRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
397
+ DecapsulateRequest.add_member(:dry_run, Shapes::ShapeRef.new(shape: NullableBooleanType, location_name: "DryRun"))
398
+ DecapsulateRequest.struct_class = Types::DecapsulateRequest
399
+
400
+ DecapsulateResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
401
+ DecapsulateResponse.add_member(:shared_secret, Shapes::ShapeRef.new(shape: PlaintextType, location_name: "SharedSecret"))
402
+ DecapsulateResponse.add_member(:encapsulation_algorithm, Shapes::ShapeRef.new(shape: EncapsulationAlgorithmSpec, location_name: "EncapsulationAlgorithm"))
403
+ DecapsulateResponse.struct_class = Types::DecapsulateResponse
404
+
387
405
  DecryptRequest.add_member(:ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "CiphertextBlob"))
388
406
  DecryptRequest.add_member(:encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContext"))
389
407
  DecryptRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
@@ -479,6 +497,20 @@ module Aws::KMS
479
497
  EnableKeyRotationRequest.add_member(:rotation_period_in_days, Shapes::ShapeRef.new(shape: RotationPeriodInDaysType, location_name: "RotationPeriodInDays"))
480
498
  EnableKeyRotationRequest.struct_class = Types::EnableKeyRotationRequest
481
499
 
500
+ EncapsulateRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
501
+ EncapsulateRequest.add_member(:encapsulation_algorithm, Shapes::ShapeRef.new(shape: EncapsulationAlgorithmSpec, required: true, location_name: "EncapsulationAlgorithm"))
502
+ EncapsulateRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
503
+ EncapsulateRequest.add_member(:dry_run, Shapes::ShapeRef.new(shape: NullableBooleanType, location_name: "DryRun"))
504
+ EncapsulateRequest.struct_class = Types::EncapsulateRequest
505
+
506
+ EncapsulateResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
507
+ EncapsulateResponse.add_member(:shared_secret, Shapes::ShapeRef.new(shape: PlaintextType, location_name: "SharedSecret"))
508
+ EncapsulateResponse.add_member(:shared_secret_ciphertext_blob, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "SharedSecretCiphertextBlob"))
509
+ EncapsulateResponse.add_member(:encapsulation_algorithm, Shapes::ShapeRef.new(shape: EncapsulationAlgorithmSpec, location_name: "EncapsulationAlgorithm"))
510
+ EncapsulateResponse.struct_class = Types::EncapsulateResponse
511
+
512
+ EncapsulationAlgorithmSpecList.member = Shapes::ShapeRef.new(shape: EncapsulationAlgorithmSpec)
513
+
482
514
  EncryptRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
483
515
  EncryptRequest.add_member(:plaintext, Shapes::ShapeRef.new(shape: PlaintextType, required: true, location_name: "Plaintext"))
484
516
  EncryptRequest.add_member(:encryption_context, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContext"))
@@ -631,6 +663,7 @@ module Aws::KMS
631
663
  GetPublicKeyResponse.add_member(:encryption_algorithms, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpecList, location_name: "EncryptionAlgorithms"))
632
664
  GetPublicKeyResponse.add_member(:signing_algorithms, Shapes::ShapeRef.new(shape: SigningAlgorithmSpecList, location_name: "SigningAlgorithms"))
633
665
  GetPublicKeyResponse.add_member(:key_agreement_algorithms, Shapes::ShapeRef.new(shape: KeyAgreementAlgorithmSpecList, location_name: "KeyAgreementAlgorithms"))
666
+ GetPublicKeyResponse.add_member(:encapsulation_algorithms, Shapes::ShapeRef.new(shape: EncapsulationAlgorithmSpecList, location_name: "EncapsulationAlgorithms"))
634
667
  GetPublicKeyResponse.struct_class = Types::GetPublicKeyResponse
635
668
 
636
669
  GrantConstraints.add_member(:encryption_context_subset, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContextSubset"))
@@ -750,6 +783,7 @@ module Aws::KMS
750
783
  KeyMetadata.add_member(:encryption_algorithms, Shapes::ShapeRef.new(shape: EncryptionAlgorithmSpecList, location_name: "EncryptionAlgorithms"))
751
784
  KeyMetadata.add_member(:signing_algorithms, Shapes::ShapeRef.new(shape: SigningAlgorithmSpecList, location_name: "SigningAlgorithms"))
752
785
  KeyMetadata.add_member(:key_agreement_algorithms, Shapes::ShapeRef.new(shape: KeyAgreementAlgorithmSpecList, location_name: "KeyAgreementAlgorithms"))
786
+ KeyMetadata.add_member(:encapsulation_algorithms, Shapes::ShapeRef.new(shape: EncapsulationAlgorithmSpecList, location_name: "EncapsulationAlgorithms"))
753
787
  KeyMetadata.add_member(:multi_region, Shapes::ShapeRef.new(shape: NullableBooleanType, location_name: "MultiRegion"))
754
788
  KeyMetadata.add_member(:multi_region_configuration, Shapes::ShapeRef.new(shape: MultiRegionConfiguration, location_name: "MultiRegionConfiguration"))
755
789
  KeyMetadata.add_member(:pending_deletion_window_in_days, Shapes::ShapeRef.new(shape: PendingWindowInDaysType, location_name: "PendingDeletionWindowInDays"))
@@ -1204,6 +1238,24 @@ module Aws::KMS
1204
1238
  o.errors << Shapes::ShapeRef.new(shape: XksKeyNotFoundException)
1205
1239
  end)
1206
1240
 
1241
+ api.add_operation(:decapsulate, Seahorse::Model::Operation.new.tap do |o|
1242
+ o.name = "Decapsulate"
1243
+ o.http_method = "POST"
1244
+ o.http_request_uri = "/"
1245
+ o.input = Shapes::ShapeRef.new(shape: DecapsulateRequest)
1246
+ o.output = Shapes::ShapeRef.new(shape: DecapsulateResponse)
1247
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1248
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1249
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1250
+ o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1251
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1252
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1253
+ o.errors << Shapes::ShapeRef.new(shape: InvalidCiphertextException)
1254
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1255
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1256
+ o.errors << Shapes::ShapeRef.new(shape: DryRunOperationException)
1257
+ end)
1258
+
1207
1259
  api.add_operation(:decrypt, Seahorse::Model::Operation.new.tap do |o|
1208
1260
  o.name = "Decrypt"
1209
1261
  o.http_method = "POST"
@@ -1376,6 +1428,23 @@ module Aws::KMS
1376
1428
  o.errors << Shapes::ShapeRef.new(shape: UnsupportedOperationException)
1377
1429
  end)
1378
1430
 
1431
+ api.add_operation(:encapsulate, Seahorse::Model::Operation.new.tap do |o|
1432
+ o.name = "Encapsulate"
1433
+ o.http_method = "POST"
1434
+ o.http_request_uri = "/"
1435
+ o.input = Shapes::ShapeRef.new(shape: EncapsulateRequest)
1436
+ o.output = Shapes::ShapeRef.new(shape: EncapsulateResponse)
1437
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1438
+ o.errors << Shapes::ShapeRef.new(shape: DisabledException)
1439
+ o.errors << Shapes::ShapeRef.new(shape: KeyUnavailableException)
1440
+ o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1441
+ o.errors << Shapes::ShapeRef.new(shape: InvalidGrantTokenException)
1442
+ o.errors << Shapes::ShapeRef.new(shape: InvalidKeyUsageException)
1443
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1444
+ o.errors << Shapes::ShapeRef.new(shape: KMSInvalidStateException)
1445
+ o.errors << Shapes::ShapeRef.new(shape: DryRunOperationException)
1446
+ end)
1447
+
1379
1448
  api.add_operation(:encrypt, Seahorse::Model::Operation.new.tap do |o|
1380
1449
  o.name = "Encrypt"
1381
1450
  o.http_method = "POST"
@@ -932,6 +932,9 @@ module Aws::KMS
932
932
  # * For asymmetric KMS keys with ML-DSA key pairs, specify
933
933
  # `SIGN_VERIFY`.
934
934
  #
935
+ # * For asymmetric KMS keys with ML-KEM key pairs, specify
936
+ # `ENCAPSULATE_DECAPSULATE`.
937
+ #
935
938
  # * For asymmetric KMS keys with SM2 key pairs (China Regions only),
936
939
  # specify `ENCRYPT_DECRYPT`, `SIGN_VERIFY`, or `KEY_AGREEMENT`.
937
940
  #
@@ -1033,6 +1036,15 @@ module Aws::KMS
1033
1036
  # * `ML_DSA_65`
1034
1037
  #
1035
1038
  # * `ML_DSA_87`
1039
+ # * Asymmetric ML-KEM key pairs (establishing shared secrets)
1040
+ #
1041
+ # * `ML_KEM_512`
1042
+ #
1043
+ # * `ML_KEM_768`
1044
+ #
1045
+ # * `ML_KEM_1024`
1046
+ # The ML-KEM key specs are not available in China Regions.
1047
+ #
1036
1048
  # * SM2 key pairs (encryption and decryption -or- signing and
1037
1049
  # verification -or- deriving shared secrets)
1038
1050
  #
@@ -1609,6 +1621,109 @@ module Aws::KMS
1609
1621
  include Aws::Structure
1610
1622
  end
1611
1623
 
1624
+ # @!attribute [rw] key_id
1625
+ # Identifies the asymmetric ML-KEM KMS key whose public key was used
1626
+ # to produce the encapsulated shared secret. KMS uses the private key
1627
+ # in the specified key pair to decapsulate the shared secret.
1628
+ #
1629
+ # To specify a KMS key, use its key ID, key ARN, alias name, or alias
1630
+ # ARN. When using an alias name, prefix it with `"alias/"`. To specify
1631
+ # a KMS key in a different Amazon Web Services account, you must use
1632
+ # the key ARN or alias ARN.
1633
+ #
1634
+ # For example:
1635
+ #
1636
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
1637
+ #
1638
+ # * Key ARN:
1639
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
1640
+ #
1641
+ # * Alias name: `alias/ExampleAlias`
1642
+ #
1643
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
1644
+ #
1645
+ # To get the key ID and key ARN for a KMS key, use ListKeys or
1646
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
1647
+ # @return [String]
1648
+ #
1649
+ # @!attribute [rw] shared_secret_ciphertext_blob
1650
+ # The encapsulated (ciphertext) form of the shared secret to recover.
1651
+ # This is the `SharedSecretCiphertextBlob` value that the Encapsulate
1652
+ # operation returns. When you use the HTTP API or the Amazon Web
1653
+ # Services CLI, the value is Base64-encoded. Otherwise, it is not
1654
+ # Base64-encoded.
1655
+ # @return [String]
1656
+ #
1657
+ # @!attribute [rw] encapsulation_algorithm
1658
+ # Specifies the key encapsulation algorithm used to recover the shared
1659
+ # secret. The only valid value is `ML_KEM`.
1660
+ # @return [String]
1661
+ #
1662
+ # @!attribute [rw] grant_tokens
1663
+ # A list of grant tokens.
1664
+ #
1665
+ # Use a grant token when your permission to call this operation comes
1666
+ # from a new grant that has not yet achieved *eventual consistency*.
1667
+ # For more information, see [Grant token][1] and [Using a grant
1668
+ # token][2] in the *Key Management Service Developer Guide*.
1669
+ #
1670
+ #
1671
+ #
1672
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
1673
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
1674
+ # @return [Array<String>]
1675
+ #
1676
+ # @!attribute [rw] dry_run
1677
+ # Checks if your request will succeed. `DryRun` is an optional
1678
+ # parameter.
1679
+ #
1680
+ # To learn more about how to use this parameter, see [Testing your
1681
+ # permissions][1] in the *Key Management Service Developer Guide*.
1682
+ #
1683
+ #
1684
+ #
1685
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
1686
+ # @return [Boolean]
1687
+ #
1688
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DecapsulateRequest AWS API Documentation
1689
+ #
1690
+ class DecapsulateRequest < Struct.new(
1691
+ :key_id,
1692
+ :shared_secret_ciphertext_blob,
1693
+ :encapsulation_algorithm,
1694
+ :grant_tokens,
1695
+ :dry_run)
1696
+ SENSITIVE = []
1697
+ include Aws::Structure
1698
+ end
1699
+
1700
+ # @!attribute [rw] key_id
1701
+ # The identifier of the ML-KEM KMS key used to decapsulate the shared
1702
+ # secret.
1703
+ # @return [String]
1704
+ #
1705
+ # @!attribute [rw] shared_secret
1706
+ # The plaintext shared secret recovered from the encapsulated form. It
1707
+ # is a 32-byte value that matches the shared secret held by the
1708
+ # encapsulating party. When you use the HTTP API or the Amazon Web
1709
+ # Services CLI, the value is Base64-encoded. Otherwise, it is not
1710
+ # Base64-encoded.
1711
+ # @return [String]
1712
+ #
1713
+ # @!attribute [rw] encapsulation_algorithm
1714
+ # The key encapsulation algorithm used to recover the shared secret.
1715
+ # @return [String]
1716
+ #
1717
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DecapsulateResponse AWS API Documentation
1718
+ #
1719
+ class DecapsulateResponse < Struct.new(
1720
+ :key_id,
1721
+ :shared_secret,
1722
+ :encapsulation_algorithm)
1723
+ SENSITIVE = [:shared_secret]
1724
+ include Aws::Structure
1725
+ end
1726
+
1612
1727
  # @!attribute [rw] ciphertext_blob
1613
1728
  # Ciphertext to be decrypted. The blob includes metadata.
1614
1729
  #
@@ -2451,6 +2566,116 @@ module Aws::KMS
2451
2566
  include Aws::Structure
2452
2567
  end
2453
2568
 
2569
+ # @!attribute [rw] key_id
2570
+ # Identifies an asymmetric ML-KEM KMS key. KMS uses the public key in
2571
+ # the specified key pair to encapsulate the shared secret. ML-KEM KMS
2572
+ # keys have a `KeySpec` value of `ML_KEM_512`, `ML_KEM_768`, or
2573
+ # `ML_KEM_1024` and a `KeyUsage` value of `ENCAPSULATE_DECAPSULATE`.
2574
+ # To find the `KeySpec` and `KeyUsage` of a KMS key, use the
2575
+ # DescribeKey operation.
2576
+ #
2577
+ # To specify a KMS key, use its key ID, key ARN, alias name, or alias
2578
+ # ARN. When using an alias name, prefix it with `"alias/"`. To specify
2579
+ # a KMS key in a different Amazon Web Services account, you must use
2580
+ # the key ARN or alias ARN.
2581
+ #
2582
+ # For example:
2583
+ #
2584
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
2585
+ #
2586
+ # * Key ARN:
2587
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
2588
+ #
2589
+ # * Alias name: `alias/ExampleAlias`
2590
+ #
2591
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
2592
+ #
2593
+ # To get the key ID and key ARN for a KMS key, use ListKeys or
2594
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
2595
+ # @return [String]
2596
+ #
2597
+ # @!attribute [rw] encapsulation_algorithm
2598
+ # Specifies the key encapsulation algorithm used to generate the
2599
+ # shared secret and its encapsulated form. The only valid value is
2600
+ # `ML_KEM`.
2601
+ # @return [String]
2602
+ #
2603
+ # @!attribute [rw] grant_tokens
2604
+ # A list of grant tokens.
2605
+ #
2606
+ # Use a grant token when your permission to call this operation comes
2607
+ # from a new grant that has not yet achieved *eventual consistency*.
2608
+ # For more information, see [Grant token][1] and [Using a grant
2609
+ # token][2] in the *Key Management Service Developer Guide*.
2610
+ #
2611
+ #
2612
+ #
2613
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
2614
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
2615
+ # @return [Array<String>]
2616
+ #
2617
+ # @!attribute [rw] dry_run
2618
+ # Checks if your request will succeed. `DryRun` is an optional
2619
+ # parameter.
2620
+ #
2621
+ # To learn more about how to use this parameter, see [Testing your
2622
+ # permissions][1] in the *Key Management Service Developer Guide*.
2623
+ #
2624
+ #
2625
+ #
2626
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
2627
+ # @return [Boolean]
2628
+ #
2629
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EncapsulateRequest AWS API Documentation
2630
+ #
2631
+ class EncapsulateRequest < Struct.new(
2632
+ :key_id,
2633
+ :encapsulation_algorithm,
2634
+ :grant_tokens,
2635
+ :dry_run)
2636
+ SENSITIVE = []
2637
+ include Aws::Structure
2638
+ end
2639
+
2640
+ # @!attribute [rw] key_id
2641
+ # The identifier of the ML-KEM KMS key used to encapsulate the shared
2642
+ # secret.
2643
+ # @return [String]
2644
+ #
2645
+ # @!attribute [rw] shared_secret
2646
+ # The plaintext shared secret. It is a 32-byte cryptographically
2647
+ # random value that both parties can use directly as key material or
2648
+ # pass through a key derivation function to generate multiple keys and
2649
+ # nonces. When you use the HTTP API or the Amazon Web Services CLI,
2650
+ # the value is Base64-encoded. Otherwise, it is not Base64-encoded.
2651
+ # @return [String]
2652
+ #
2653
+ # @!attribute [rw] shared_secret_ciphertext_blob
2654
+ # The encapsulated form of the shared secret. Pass this value to the
2655
+ # Decapsulate operation to recover the shared secret. When you use the
2656
+ # HTTP API or the Amazon Web Services CLI, the value is
2657
+ # Base64-encoded. Otherwise, it is not Base64-encoded. The length of
2658
+ # `SharedSecretCiphertextBlob` depends on the ML-KEM key spec. Before
2659
+ # Base64 encoding, the encapsulated shared secret is 768 bytes for
2660
+ # `ML_KEM_512`, 1088 bytes for `ML_KEM_768`, and 1568 bytes for
2661
+ # `ML_KEM_1024`.
2662
+ # @return [String]
2663
+ #
2664
+ # @!attribute [rw] encapsulation_algorithm
2665
+ # The key encapsulation algorithm used to generate the shared secret.
2666
+ # @return [String]
2667
+ #
2668
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EncapsulateResponse AWS API Documentation
2669
+ #
2670
+ class EncapsulateResponse < Struct.new(
2671
+ :key_id,
2672
+ :shared_secret,
2673
+ :shared_secret_ciphertext_blob,
2674
+ :encapsulation_algorithm)
2675
+ SENSITIVE = [:shared_secret]
2676
+ include Aws::Structure
2677
+ end
2678
+
2454
2679
  # @!attribute [rw] key_id
2455
2680
  # Identifies the KMS key to use in the encryption operation. The KMS
2456
2681
  # key must have a `KeyUsage` of `ENCRYPT_DECRYPT`. To find the
@@ -2666,7 +2891,7 @@ module Aws::KMS
2666
2891
  # verify, and the rule that permits you to use ML-DSA key pairs to
2667
2892
  # sign and verify only are not effective on data key pairs, which are
2668
2893
  # used outside of KMS. The SM2 key spec is only available in China
2669
- # Regions.
2894
+ # Regions. The ML-KEM key specs are not available in China Regions.
2670
2895
  # @return [String]
2671
2896
  #
2672
2897
  # @!attribute [rw] grant_tokens
@@ -2876,7 +3101,7 @@ module Aws::KMS
2876
3101
  # verify, and the rule that permits you to use ML-DSA key pairs to
2877
3102
  # sign and verify only are not effective on data key pairs, which are
2878
3103
  # used outside of KMS. The SM2 key spec is only available in China
2879
- # Regions.
3104
+ # Regions. The ML-KEM key specs are not available in China Regions.
2880
3105
  # @return [String]
2881
3106
  #
2882
3107
  # @!attribute [rw] grant_tokens
@@ -3510,7 +3735,7 @@ module Aws::KMS
3510
3735
  # @!attribute [rw] key_last_usage
3511
3736
  # Contains usage information about the last time the KMS key was used
3512
3737
  # for a successful cryptographic operation. If the key has not been
3513
- # used since tracking began, this response element is empty.
3738
+ # used since tracking began, this response element is an empty object.
3514
3739
  # @return [Types::KeyLastUsageData]
3515
3740
  #
3516
3741
  # @!attribute [rw] tracking_start_date
@@ -3886,6 +4111,12 @@ module Aws::KMS
3886
4111
  # `KEY_AGREEMENT`.
3887
4112
  # @return [Array<String>]
3888
4113
  #
4114
+ # @!attribute [rw] encapsulation_algorithms
4115
+ # The key encapsulation algorithm used to establish a shared secret.
4116
+ # This field is present only when the KMS key has a `KeyUsage` value
4117
+ # of `ENCAPSULATE_DECAPSULATE`.
4118
+ # @return [Array<String>]
4119
+ #
3889
4120
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKeyResponse AWS API Documentation
3890
4121
  #
3891
4122
  class GetPublicKeyResponse < Struct.new(
@@ -3896,7 +4127,8 @@ module Aws::KMS
3896
4127
  :key_usage,
3897
4128
  :encryption_algorithms,
3898
4129
  :signing_algorithms,
3899
- :key_agreement_algorithms)
4130
+ :key_agreement_algorithms,
4131
+ :encapsulation_algorithms)
3900
4132
  SENSITIVE = []
3901
4133
  include Aws::Structure
3902
4134
  end
@@ -4338,6 +4570,10 @@ module Aws::KMS
4338
4570
  # From the ImportKeyMaterial operation, the request was rejected because
4339
4571
  # KMS could not decrypt the encrypted (wrapped) key material.
4340
4572
  #
4573
+ # From the Decapsulate operation, the request was rejected because the
4574
+ # length of the `SharedSecretCiphertextBlob` is inconsistent with the
4575
+ # specified ML-KEM key spec.
4576
+ #
4341
4577
  # @!attribute [rw] message
4342
4578
  # @return [String]
4343
4579
  #
@@ -4404,8 +4640,10 @@ module Aws::KMS
4404
4640
  # messages, the `KeyUsage` must be `SIGN_VERIFY`. For generating and
4405
4641
  # verifying message authentication codes (MACs), the `KeyUsage` must be
4406
4642
  # `GENERATE_VERIFY_MAC`. For deriving key agreement secrets, the
4407
- # `KeyUsage` must be `KEY_AGREEMENT`. To find the `KeyUsage` of a KMS
4408
- # key, use the DescribeKey operation.
4643
+ # `KeyUsage` must be `KEY_AGREEMENT`. For encapsulating and
4644
+ # decapsulating shared secrets, the `KeyUsage` must be
4645
+ # `ENCAPSULATE_DECAPSULATE`. To find the `KeyUsage` of a KMS key, use
4646
+ # the DescribeKey operation.
4409
4647
  #
4410
4648
  # To find the encryption or signing algorithms supported for a
4411
4649
  # particular KMS key, use the DescribeKey operation.
@@ -4726,6 +4964,12 @@ module Aws::KMS
4726
4964
  # The key agreement algorithm used to derive a shared secret.
4727
4965
  # @return [Array<String>]
4728
4966
  #
4967
+ # @!attribute [rw] encapsulation_algorithms
4968
+ # The key encapsulation algorithm that the KMS key supports. This
4969
+ # field appears only for KMS keys with a `KeyUsage` value of
4970
+ # `ENCAPSULATE_DECAPSULATE`.
4971
+ # @return [Array<String>]
4972
+ #
4729
4973
  # @!attribute [rw] multi_region
4730
4974
  # Indicates whether the KMS key is a multi-Region (`True`) or regional
4731
4975
  # (`False`) key. This value is `True` for multi-Region primary and
@@ -4829,6 +5073,7 @@ module Aws::KMS
4829
5073
  :encryption_algorithms,
4830
5074
  :signing_algorithms,
4831
5075
  :key_agreement_algorithms,
5076
+ :encapsulation_algorithms,
4832
5077
  :multi_region,
4833
5078
  :multi_region_configuration,
4834
5079
  :pending_deletion_window_in_days,
data/lib/aws-sdk-kms.rb CHANGED
@@ -54,7 +54,7 @@ module Aws::KMS
54
54
  autoload :EndpointProvider, 'aws-sdk-kms/endpoint_provider'
55
55
  autoload :Endpoints, 'aws-sdk-kms/endpoints'
56
56
 
57
- GEM_VERSION = '1.134.0'
57
+ GEM_VERSION = '1.136.0'
58
58
 
59
59
  end
60
60
 
data/sig/client.rbs CHANGED
@@ -139,7 +139,7 @@ module Aws
139
139
  key_id: ::String,
140
140
  ?grantee_principal: ::String,
141
141
  ?retiring_principal: ::String,
142
- operations: Array[("Decrypt" | "Encrypt" | "GenerateDataKey" | "GenerateDataKeyWithoutPlaintext" | "ReEncryptFrom" | "ReEncryptTo" | "Sign" | "Verify" | "GetPublicKey" | "CreateGrant" | "RetireGrant" | "DescribeKey" | "GenerateDataKeyPair" | "GenerateDataKeyPairWithoutPlaintext" | "GenerateMac" | "VerifyMac" | "DeriveSharedSecret")],
142
+ operations: Array[("Decrypt" | "Encrypt" | "GenerateDataKey" | "GenerateDataKeyWithoutPlaintext" | "ReEncryptFrom" | "ReEncryptTo" | "Sign" | "Verify" | "GetPublicKey" | "CreateGrant" | "RetireGrant" | "DescribeKey" | "GenerateDataKeyPair" | "GenerateDataKeyPairWithoutPlaintext" | "GenerateMac" | "VerifyMac" | "DeriveSharedSecret" | "Encapsulate" | "Decapsulate")],
143
143
  ?constraints: {
144
144
  encryption_context_subset: Hash[::String, ::String]?,
145
145
  encryption_context_equals: Hash[::String, ::String]?,
@@ -161,9 +161,9 @@ module Aws
161
161
  def create_key: (
162
162
  ?policy: ::String,
163
163
  ?description: ::String,
164
- ?key_usage: ("SIGN_VERIFY" | "ENCRYPT_DECRYPT" | "GENERATE_VERIFY_MAC" | "KEY_AGREEMENT"),
164
+ ?key_usage: ("SIGN_VERIFY" | "ENCRYPT_DECRYPT" | "GENERATE_VERIFY_MAC" | "KEY_AGREEMENT" | "ENCAPSULATE_DECAPSULATE"),
165
165
  ?customer_master_key_spec: ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SYMMETRIC_DEFAULT" | "HMAC_224" | "HMAC_256" | "HMAC_384" | "HMAC_512" | "SM2"),
166
- ?key_spec: ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SYMMETRIC_DEFAULT" | "HMAC_224" | "HMAC_256" | "HMAC_384" | "HMAC_512" | "SM2" | "ML_DSA_44" | "ML_DSA_65" | "ML_DSA_87" | "ECC_NIST_EDWARDS25519"),
166
+ ?key_spec: ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SYMMETRIC_DEFAULT" | "HMAC_224" | "HMAC_256" | "HMAC_384" | "HMAC_512" | "SM2" | "ML_DSA_44" | "ML_DSA_65" | "ML_DSA_87" | "ECC_NIST_EDWARDS25519" | "ML_KEM_512" | "ML_KEM_768" | "ML_KEM_1024"),
167
167
  ?origin: ("AWS_KMS" | "EXTERNAL" | "AWS_CLOUDHSM" | "EXTERNAL_KEY_STORE"),
168
168
  ?custom_key_store_id: ::String,
169
169
  ?bypass_policy_lockout_safety_check: bool,
@@ -178,6 +178,22 @@ module Aws
178
178
  ) -> _CreateKeyResponseSuccess
179
179
  | (?Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _CreateKeyResponseSuccess
180
180
 
181
+ interface _DecapsulateResponseSuccess
182
+ include ::Seahorse::Client::_ResponseSuccess[Types::DecapsulateResponse]
183
+ def key_id: () -> ::String
184
+ def shared_secret: () -> ::String
185
+ def encapsulation_algorithm: () -> ("ML_KEM")
186
+ end
187
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/KMS/Client.html#decapsulate-instance_method
188
+ def decapsulate: (
189
+ key_id: ::String,
190
+ shared_secret_ciphertext_blob: ::String,
191
+ encapsulation_algorithm: ("ML_KEM"),
192
+ ?grant_tokens: Array[::String],
193
+ ?dry_run: bool
194
+ ) -> _DecapsulateResponseSuccess
195
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _DecapsulateResponseSuccess
196
+
181
197
  interface _DecryptResponseSuccess
182
198
  include ::Seahorse::Client::_ResponseSuccess[Types::DecryptResponse]
183
199
  def key_id: () -> ::String
@@ -311,6 +327,22 @@ module Aws
311
327
  ) -> ::Seahorse::Client::_ResponseSuccess[::Aws::EmptyStructure]
312
328
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> ::Seahorse::Client::_ResponseSuccess[::Aws::EmptyStructure]
313
329
 
330
+ interface _EncapsulateResponseSuccess
331
+ include ::Seahorse::Client::_ResponseSuccess[Types::EncapsulateResponse]
332
+ def key_id: () -> ::String
333
+ def shared_secret: () -> ::String
334
+ def shared_secret_ciphertext_blob: () -> ::String
335
+ def encapsulation_algorithm: () -> ("ML_KEM")
336
+ end
337
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/KMS/Client.html#encapsulate-instance_method
338
+ def encapsulate: (
339
+ key_id: ::String,
340
+ encapsulation_algorithm: ("ML_KEM"),
341
+ ?grant_tokens: Array[::String],
342
+ ?dry_run: bool
343
+ ) -> _EncapsulateResponseSuccess
344
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _EncapsulateResponseSuccess
345
+
314
346
  interface _EncryptResponseSuccess
315
347
  include ::Seahorse::Client::_ResponseSuccess[Types::EncryptResponse]
316
348
  def ciphertext_blob: () -> ::String
@@ -357,7 +389,7 @@ module Aws
357
389
  def private_key_plaintext: () -> ::String
358
390
  def public_key: () -> ::String
359
391
  def key_id: () -> ::String
360
- def key_pair_spec: () -> ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SM2" | "ECC_NIST_EDWARDS25519")
392
+ def key_pair_spec: () -> ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SM2" | "ECC_NIST_EDWARDS25519" | "ML_KEM_512" | "ML_KEM_768" | "ML_KEM_1024")
361
393
  def ciphertext_for_recipient: () -> ::String
362
394
  def key_material_id: () -> ::String
363
395
  end
@@ -365,7 +397,7 @@ module Aws
365
397
  def generate_data_key_pair: (
366
398
  ?encryption_context: Hash[::String, ::String],
367
399
  key_id: ::String,
368
- key_pair_spec: ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SM2" | "ECC_NIST_EDWARDS25519"),
400
+ key_pair_spec: ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SM2" | "ECC_NIST_EDWARDS25519" | "ML_KEM_512" | "ML_KEM_768" | "ML_KEM_1024"),
369
401
  ?grant_tokens: Array[::String],
370
402
  ?recipient: {
371
403
  key_encryption_algorithm: ("RSAES_OAEP_SHA_256")?,
@@ -380,14 +412,14 @@ module Aws
380
412
  def private_key_ciphertext_blob: () -> ::String
381
413
  def public_key: () -> ::String
382
414
  def key_id: () -> ::String
383
- def key_pair_spec: () -> ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SM2" | "ECC_NIST_EDWARDS25519")
415
+ def key_pair_spec: () -> ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SM2" | "ECC_NIST_EDWARDS25519" | "ML_KEM_512" | "ML_KEM_768" | "ML_KEM_1024")
384
416
  def key_material_id: () -> ::String
385
417
  end
386
418
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/KMS/Client.html#generate_data_key_pair_without_plaintext-instance_method
387
419
  def generate_data_key_pair_without_plaintext: (
388
420
  ?encryption_context: Hash[::String, ::String],
389
421
  key_id: ::String,
390
- key_pair_spec: ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SM2" | "ECC_NIST_EDWARDS25519"),
422
+ key_pair_spec: ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SM2" | "ECC_NIST_EDWARDS25519" | "ML_KEM_512" | "ML_KEM_768" | "ML_KEM_1024"),
391
423
  ?grant_tokens: Array[::String],
392
424
  ?dry_run: bool
393
425
  ) -> _GenerateDataKeyPairWithoutPlaintextResponseSuccess
@@ -501,11 +533,12 @@ module Aws
501
533
  def key_id: () -> ::String
502
534
  def public_key: () -> ::String
503
535
  def customer_master_key_spec: () -> ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SYMMETRIC_DEFAULT" | "HMAC_224" | "HMAC_256" | "HMAC_384" | "HMAC_512" | "SM2")
504
- def key_spec: () -> ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SYMMETRIC_DEFAULT" | "HMAC_224" | "HMAC_256" | "HMAC_384" | "HMAC_512" | "SM2" | "ML_DSA_44" | "ML_DSA_65" | "ML_DSA_87" | "ECC_NIST_EDWARDS25519")
505
- def key_usage: () -> ("SIGN_VERIFY" | "ENCRYPT_DECRYPT" | "GENERATE_VERIFY_MAC" | "KEY_AGREEMENT")
536
+ def key_spec: () -> ("RSA_2048" | "RSA_3072" | "RSA_4096" | "ECC_NIST_P256" | "ECC_NIST_P384" | "ECC_NIST_P521" | "ECC_SECG_P256K1" | "SYMMETRIC_DEFAULT" | "HMAC_224" | "HMAC_256" | "HMAC_384" | "HMAC_512" | "SM2" | "ML_DSA_44" | "ML_DSA_65" | "ML_DSA_87" | "ECC_NIST_EDWARDS25519" | "ML_KEM_512" | "ML_KEM_768" | "ML_KEM_1024")
537
+ def key_usage: () -> ("SIGN_VERIFY" | "ENCRYPT_DECRYPT" | "GENERATE_VERIFY_MAC" | "KEY_AGREEMENT" | "ENCAPSULATE_DECAPSULATE")
506
538
  def encryption_algorithms: () -> ::Array[("SYMMETRIC_DEFAULT" | "RSAES_OAEP_SHA_1" | "RSAES_OAEP_SHA_256" | "SM2PKE")]
507
539
  def signing_algorithms: () -> ::Array[("RSASSA_PSS_SHA_256" | "RSASSA_PSS_SHA_384" | "RSASSA_PSS_SHA_512" | "RSASSA_PKCS1_V1_5_SHA_256" | "RSASSA_PKCS1_V1_5_SHA_384" | "RSASSA_PKCS1_V1_5_SHA_512" | "ECDSA_SHA_256" | "ECDSA_SHA_384" | "ECDSA_SHA_512" | "SM2DSA" | "ML_DSA_SHAKE_256" | "ED25519_SHA_512" | "ED25519_PH_SHA_512")]
508
540
  def key_agreement_algorithms: () -> ::Array[("ECDH")]
541
+ def encapsulation_algorithms: () -> ::Array[("ML_KEM")]
509
542
  end
510
543
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/KMS/Client.html#get_public_key-instance_method
511
544
  def get_public_key: (