aws-sdk-kms 1.62.0 → 1.64.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.
@@ -390,12 +390,12 @@ module Aws::KMS
390
390
  # key state. For details, see [Key states of KMS keys][2] in the *Key
391
391
  # Management Service Developer Guide*.
392
392
  #
393
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
393
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
394
394
  # key in a different Amazon Web Services account.
395
395
  #
396
- # **Required permissions**\: [kms:CancelKeyDeletion][3] (key policy)
396
+ # **Required permissions**: [kms:CancelKeyDeletion][3] (key policy)
397
397
  #
398
- # **Related operations**\: ScheduleKeyDeletion
398
+ # **Related operations**: ScheduleKeyDeletion
399
399
  #
400
400
  #
401
401
  #
@@ -527,10 +527,10 @@ module Aws::KMS
527
527
  # store, see [Troubleshooting an external key store][6] in the *Key
528
528
  # Management Service Developer Guide*.
529
529
  #
530
- # **Cross-account use**\: No. You cannot perform this operation on a
530
+ # **Cross-account use**: No. You cannot perform this operation on a
531
531
  # custom key store in a different Amazon Web Services account.
532
532
  #
533
- # **Required permissions**\: [kms:ConnectCustomKeyStore][7] (IAM policy)
533
+ # **Required permissions**: [kms:ConnectCustomKeyStore][7] (IAM policy)
534
534
  #
535
535
  # **Related operations**
536
536
  #
@@ -624,7 +624,7 @@ module Aws::KMS
624
624
  # key state. For details, see [Key states of KMS keys][4] in the *Key
625
625
  # Management Service Developer Guide*.
626
626
  #
627
- # **Cross-account use**\: No. You cannot perform this operation on an
627
+ # **Cross-account use**: No. You cannot perform this operation on an
628
628
  # alias in a different Amazon Web Services account.
629
629
  #
630
630
  # **Required permissions**
@@ -657,6 +657,10 @@ module Aws::KMS
657
657
  # Specifies the alias name. This value must begin with `alias/` followed
658
658
  # by a name, such as `alias/ExampleAlias`.
659
659
  #
660
+ # Do not include confidential or sensitive information in this field.
661
+ # This field may be displayed in plaintext in CloudTrail logs and other
662
+ # output.
663
+ #
660
664
  # The `AliasName` value must be string of 1-256 characters. It can
661
665
  # contain only alphanumeric characters, forward slashes (/), underscores
662
666
  # (\_), and dashes (-). The alias name cannot begin with `alias/aws/`.
@@ -788,10 +792,10 @@ module Aws::KMS
788
792
  # For help with failures, see [Troubleshooting a custom key store][7] in
789
793
  # the *Key Management Service Developer Guide*.
790
794
  #
791
- # **Cross-account use**\: No. You cannot perform this operation on a
795
+ # **Cross-account use**: No. You cannot perform this operation on a
792
796
  # custom key store in a different Amazon Web Services account.
793
797
  #
794
- # **Required permissions**\: [kms:CreateCustomKeyStore][9] (IAM policy).
798
+ # **Required permissions**: [kms:CreateCustomKeyStore][9] (IAM policy).
795
799
  #
796
800
  # **Related operations:**
797
801
  #
@@ -822,6 +826,10 @@ module Aws::KMS
822
826
  # unique in your Amazon Web Services account and Region. This parameter
823
827
  # is required for all custom key stores.
824
828
  #
829
+ # Do not include confidential or sensitive information in this field.
830
+ # This field may be displayed in plaintext in CloudTrail logs and other
831
+ # output.
832
+ #
825
833
  # @option params [String] :cloud_hsm_cluster_id
826
834
  # Identifies the CloudHSM cluster for an CloudHSM key store. This
827
835
  # parameter is required for custom key stores with `CustomKeyStoreType`
@@ -1018,7 +1026,7 @@ module Aws::KMS
1018
1026
  # # This example creates a custom key store that is associated with an AWS CloudHSM cluster.
1019
1027
  #
1020
1028
  # resp = client.create_custom_key_store({
1021
- # cloud_hsm_cluster_id: "cluster-1a23b4cdefg", # The ID of the CloudHSM cluster.
1029
+ # cloud_hsm_cluster_id: "cluster-234abcdefABC", # The ID of the CloudHSM cluster.
1022
1030
  # custom_key_store_name: "ExampleKeyStore", # A friendly name for the custom key store.
1023
1031
  # key_store_password: "kmsPswd", # The password for the kmsuser CU account in the specified cluster.
1024
1032
  # trust_anchor_certificate: "<certificate-goes-here>", # The content of the customerCA.crt file that you created when you initialized the cluster.
@@ -1140,11 +1148,11 @@ module Aws::KMS
1140
1148
  # key state. For details, see [Key states of KMS keys][4] in the *Key
1141
1149
  # Management Service Developer Guide*.
1142
1150
  #
1143
- # **Cross-account use**\: Yes. To perform this operation on a KMS key in
1151
+ # **Cross-account use**: Yes. To perform this operation on a KMS key in
1144
1152
  # a different Amazon Web Services account, specify the key ARN in the
1145
1153
  # value of the `KeyId` parameter.
1146
1154
  #
1147
- # **Required permissions**\: [kms:CreateGrant][5] (key policy)
1155
+ # **Required permissions**: [kms:CreateGrant][5] (key policy)
1148
1156
  #
1149
1157
  # **Related operations:**
1150
1158
  #
@@ -1184,30 +1192,27 @@ module Aws::KMS
1184
1192
  # @option params [required, String] :grantee_principal
1185
1193
  # The identity that gets the permissions specified in the grant.
1186
1194
  #
1187
- # To specify the principal, use the [Amazon Resource Name (ARN)][1] of
1188
- # an Amazon Web Services principal. Valid Amazon Web Services principals
1189
- # include Amazon Web Services accounts (root), IAM users, IAM roles,
1190
- # federated users, and assumed role users. For examples of the ARN
1191
- # syntax to use for specifying a principal, see [Amazon Web Services
1192
- # Identity and Access Management (IAM)][2] in the Example ARNs section
1193
- # of the *Amazon Web Services General Reference*.
1195
+ # To specify the grantee principal, use the Amazon Resource Name (ARN)
1196
+ # of an Amazon Web Services principal. Valid principals include Amazon
1197
+ # Web Services accounts, IAM users, IAM roles, federated users, and
1198
+ # assumed role users. For help with the ARN syntax for a principal, see
1199
+ # [IAM ARNs][1] in the <i> <i>Identity and Access Management User
1200
+ # Guide</i> </i>.
1194
1201
  #
1195
1202
  #
1196
1203
  #
1197
- # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1198
- # [2]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam
1204
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
1199
1205
  #
1200
1206
  # @option params [String] :retiring_principal
1201
1207
  # The principal that has permission to use the RetireGrant operation to
1202
1208
  # retire the grant.
1203
1209
  #
1204
1210
  # To specify the principal, use the [Amazon Resource Name (ARN)][1] of
1205
- # an Amazon Web Services principal. Valid Amazon Web Services principals
1206
- # include Amazon Web Services accounts (root), IAM users, federated
1207
- # users, and assumed role users. For examples of the ARN syntax to use
1208
- # for specifying a principal, see [Amazon Web Services Identity and
1209
- # Access Management (IAM)][2] in the Example ARNs section of the *Amazon
1210
- # Web Services General Reference*.
1211
+ # an Amazon Web Services principal. Valid principals include Amazon Web
1212
+ # Services accounts, IAM users, IAM roles, federated users, and assumed
1213
+ # role users. For help with the ARN syntax for a principal, see [IAM
1214
+ # ARNs][2] in the <i> <i>Identity and Access Management User Guide</i>
1215
+ # </i>.
1211
1216
  #
1212
1217
  # The grant determines the retiring principal. Other principals might
1213
1218
  # have permission to retire the grant or revoke the grant. For details,
@@ -1217,7 +1222,7 @@ module Aws::KMS
1217
1222
  #
1218
1223
  #
1219
1224
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1220
- # [2]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam
1225
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
1221
1226
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
1222
1227
  #
1223
1228
  # @option params [required, Array<String>] :operations
@@ -1238,22 +1243,19 @@ module Aws::KMS
1238
1243
  # @option params [Types::GrantConstraints] :constraints
1239
1244
  # Specifies a grant constraint.
1240
1245
  #
1246
+ # Do not include confidential or sensitive information in this field.
1247
+ # This field may be displayed in plaintext in CloudTrail logs and other
1248
+ # output.
1249
+ #
1241
1250
  # KMS supports the `EncryptionContextEquals` and
1242
- # `EncryptionContextSubset` grant constraints. Each constraint value can
1243
- # include up to 8 encryption context pairs. The encryption context value
1244
- # in each constraint cannot exceed 384 characters. For information about
1245
- # grant constraints, see [Using grant constraints][1] in the *Key
1246
- # Management Service Developer Guide*. For more information about
1247
- # encryption context, see [Encryption context][2] in the <i> <i>Key
1248
- # Management Service Developer Guide</i> </i>.
1249
- #
1250
- # The encryption context grant constraints allow the permissions in the
1251
- # grant only when the encryption context in the request matches
1252
- # (`EncryptionContextEquals`) or includes (`EncryptionContextSubset`)
1253
- # the encryption context specified in this structure.
1251
+ # `EncryptionContextSubset` grant constraints, which allow the
1252
+ # permissions in the grant only when the encryption context in the
1253
+ # request matches (`EncryptionContextEquals`) or includes
1254
+ # (`EncryptionContextSubset`) the encryption context specified in the
1255
+ # constraint.
1254
1256
  #
1255
1257
  # The encryption context grant constraints are supported only on [grant
1256
- # operations][3] that include an `EncryptionContext` parameter, such as
1258
+ # operations][1] that include an `EncryptionContext` parameter, such as
1257
1259
  # cryptographic operations on symmetric encryption KMS keys. Grants with
1258
1260
  # grant constraints can include the DescribeKey and RetireGrant
1259
1261
  # operations, but the constraint doesn't apply to these operations. If
@@ -1264,15 +1266,20 @@ module Aws::KMS
1264
1266
  #
1265
1267
  # You cannot use an encryption context grant constraint for
1266
1268
  # cryptographic operations with asymmetric KMS keys or HMAC KMS keys.
1267
- # These keys don't support an encryption context.
1268
- #
1269
+ # Operations with these keys don't support an encryption context.
1269
1270
  #
1271
+ # Each constraint value can include up to 8 encryption context pairs.
1272
+ # The encryption context value in each constraint cannot exceed 384
1273
+ # characters. For information about grant constraints, see [Using grant
1274
+ # constraints][2] in the *Key Management Service Developer Guide*. For
1275
+ # more information about encryption context, see [Encryption context][3]
1276
+ # in the <i> <i>Key Management Service Developer Guide</i> </i>.
1270
1277
  #
1271
1278
  #
1272
1279
  #
1273
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
1274
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
1275
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations
1280
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations
1281
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
1282
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
1276
1283
  #
1277
1284
  # @option params [Array<String>] :grant_tokens
1278
1285
  # A list of grant tokens.
@@ -1291,6 +1298,10 @@ module Aws::KMS
1291
1298
  # A friendly name for the grant. Use this value to prevent the
1292
1299
  # unintended creation of duplicate grants when retrying this request.
1293
1300
  #
1301
+ # Do not include confidential or sensitive information in this field.
1302
+ # This field may be displayed in plaintext in CloudTrail logs and other
1303
+ # output.
1304
+ #
1294
1305
  # When this value is absent, all `CreateGrant` requests result in a new
1295
1306
  # grant with a unique `GrantId` even if all the supplied parameters are
1296
1307
  # identical. This can result in unintended duplicates when you retry the
@@ -1555,13 +1566,13 @@ module Aws::KMS
1555
1566
  #
1556
1567
  # </note>
1557
1568
  #
1558
- # **Cross-account use**\: No. You cannot use this operation to create a
1569
+ # **Cross-account use**: No. You cannot use this operation to create a
1559
1570
  # KMS key in a different Amazon Web Services account.
1560
1571
  #
1561
- # **Required permissions**\: [kms:CreateKey][11] (IAM policy). To use
1562
- # the `Tags` parameter, [kms:TagResource][11] (IAM policy). For examples
1563
- # and information about related permissions, see [Allow a user to create
1564
- # KMS keys][12] in the *Key Management Service Developer Guide*.
1572
+ # **Required permissions**: [kms:CreateKey][11] (IAM policy). To use the
1573
+ # `Tags` parameter, [kms:TagResource][11] (IAM policy). For examples and
1574
+ # information about related permissions, see [Allow a user to create KMS
1575
+ # keys][12] in the *Key Management Service Developer Guide*.
1565
1576
  #
1566
1577
  # **Related operations:**
1567
1578
  #
@@ -1591,26 +1602,23 @@ module Aws::KMS
1591
1602
  #
1592
1603
  # If you provide a key policy, it must meet the following criteria:
1593
1604
  #
1594
- # * If you don't set `BypassPolicyLockoutSafetyCheck` to true, the key
1595
- # policy must allow the principal that is making the `CreateKey`
1596
- # request to make a subsequent PutKeyPolicy request on the KMS key.
1597
- # This reduces the risk that the KMS key becomes unmanageable. For
1598
- # more information, refer to the scenario in the [Default Key
1599
- # Policy][1] section of the <i> <i>Key Management Service Developer
1600
- # Guide</i> </i>.
1605
+ # * The key policy must allow the calling principal to make a subsequent
1606
+ # `PutKeyPolicy` request on the KMS key. This reduces the risk that
1607
+ # the KMS key becomes unmanageable. For more information, see [Default
1608
+ # key policy][1] in the *Key Management Service Developer Guide*. (To
1609
+ # omit this condition, set `BypassPolicyLockoutSafetyCheck` to true.)
1601
1610
  #
1602
1611
  # * Each statement in the key policy must contain one or more
1603
1612
  # principals. The principals in the key policy must exist and be
1604
- # visible to KMS. When you create a new Amazon Web Services principal
1605
- # (for example, an IAM user or role), you might need to enforce a
1606
- # delay before including the new principal in a key policy because the
1607
- # new principal might not be immediately visible to KMS. For more
1608
- # information, see [Changes that I make are not always immediately
1609
- # visible][2] in the *Amazon Web Services Identity and Access
1610
- # Management User Guide*.
1613
+ # visible to KMS. When you create a new Amazon Web Services principal,
1614
+ # you might need to enforce a delay before including the new principal
1615
+ # in a key policy because the new principal might not be immediately
1616
+ # visible to KMS. For more information, see [Changes that I make are
1617
+ # not always immediately visible][2] in the *Amazon Web Services
1618
+ # Identity and Access Management User Guide*.
1611
1619
  #
1612
1620
  # If you do not provide a key policy, KMS attaches a default key policy
1613
- # to the KMS key. For more information, see [Default Key Policy][3] in
1621
+ # to the KMS key. For more information, see [Default key policy][3] in
1614
1622
  # the *Key Management Service Developer Guide*.
1615
1623
  #
1616
1624
  # The key policy size quota is 32 kilobytes (32768 bytes).
@@ -1621,17 +1629,19 @@ module Aws::KMS
1621
1629
  #
1622
1630
  #
1623
1631
  #
1624
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
1632
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
1625
1633
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
1626
1634
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
1627
1635
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1628
1636
  #
1629
1637
  # @option params [String] :description
1630
- # A description of the KMS key.
1638
+ # A description of the KMS key. Use a description that helps you decide
1639
+ # whether the KMS key is appropriate for a task. The default value is an
1640
+ # empty string (no description).
1631
1641
  #
1632
- # Use a description that helps you decide whether the KMS key is
1633
- # appropriate for a task. The default value is an empty string (no
1634
- # description).
1642
+ # Do not include confidential or sensitive information in this field.
1643
+ # This field may be displayed in plaintext in CloudTrail logs and other
1644
+ # output.
1635
1645
  #
1636
1646
  # To set or change the description after the key is created, use
1637
1647
  # UpdateKeyDescription.
@@ -1797,31 +1807,32 @@ module Aws::KMS
1797
1807
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1798
1808
  #
1799
1809
  # @option params [Boolean] :bypass_policy_lockout_safety_check
1800
- # A flag to indicate whether to bypass the key policy lockout safety
1801
- # check.
1810
+ # Skips ("bypasses") the key policy lockout safety check. The default
1811
+ # value is false.
1802
1812
  #
1803
1813
  # Setting this value to true increases the risk that the KMS key becomes
1804
1814
  # unmanageable. Do not set this value to true indiscriminately.
1805
1815
  #
1806
- # For more information, refer to the scenario in the [Default Key
1807
- # Policy][1] section in the <i> <i>Key Management Service Developer
1808
- # Guide</i> </i>.
1809
- #
1810
- # Use this parameter only when you include a policy in the request and
1811
- # you intend to prevent the principal that is making the request from
1812
- # making a subsequent PutKeyPolicy request on the KMS key.
1816
+ # For more information, see [Default key policy][1] in the *Key
1817
+ # Management Service Developer Guide*.
1813
1818
  #
1814
- # The default value is false.
1819
+ # Use this parameter only when you intend to prevent the principal that
1820
+ # is making the request from making a subsequent PutKeyPolicy request on
1821
+ # the KMS key.
1815
1822
  #
1816
1823
  #
1817
1824
  #
1818
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
1825
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
1819
1826
  #
1820
1827
  # @option params [Array<Types::Tag>] :tags
1821
1828
  # Assigns one or more tags to the KMS key. Use this parameter to tag the
1822
1829
  # KMS key when it is created. To tag an existing KMS key, use the
1823
1830
  # TagResource operation.
1824
1831
  #
1832
+ # Do not include confidential or sensitive information in this field.
1833
+ # This field may be displayed in plaintext in CloudTrail logs and other
1834
+ # output.
1835
+ #
1825
1836
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
1826
1837
  # key. For details, see [ABAC for KMS][1] in the *Key Management Service
1827
1838
  # Developer Guide*.
@@ -2134,7 +2145,7 @@ module Aws::KMS
2134
2145
  # key_metadata: {
2135
2146
  # aws_account_id: "111122223333",
2136
2147
  # arn: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
2137
- # cloud_hsm_cluster_id: "cluster-1a23b4cdefg",
2148
+ # cloud_hsm_cluster_id: "cluster-234abcdefABC",
2138
2149
  # creation_date: Time.parse("2019-12-02T07:48:55-07:00"),
2139
2150
  # custom_key_store_id: "cks-1234567890abcdef0",
2140
2151
  # customer_master_key_spec: "SYMMETRIC_DEFAULT",
@@ -2296,30 +2307,37 @@ module Aws::KMS
2296
2307
  # key that you intend.
2297
2308
  #
2298
2309
  # Whenever possible, use key policies to give users permission to call
2299
- # the `Decrypt` operation on a particular KMS key, instead of using IAM
2300
- # policies. Otherwise, you might create an IAM user policy that gives
2301
- # the user `Decrypt` permission on all KMS keys. This user could decrypt
2302
- # ciphertext that was encrypted by KMS keys in other accounts if the key
2303
- # policy for the cross-account KMS key permits it. If you must use an
2304
- # IAM policy for `Decrypt` permissions, limit the user to particular KMS
2305
- # keys or particular trusted accounts. For details, see [Best practices
2306
- # for IAM policies][4] in the *Key Management Service Developer Guide*.
2307
- #
2308
- # Applications in Amazon Web Services Nitro Enclaves can call this
2309
- # operation by using the [Amazon Web Services Nitro Enclaves Development
2310
- # Kit][5]. For information about the supporting parameters, see [How
2311
- # Amazon Web Services Nitro Enclaves use KMS][6] in the *Key Management
2312
- # Service Developer Guide*.
2310
+ # the `Decrypt` operation on a particular KMS key, instead of using
2311
+ # &amp;IAM; policies. Otherwise, you might create an &amp;IAM; policy
2312
+ # that gives the user `Decrypt` permission on all KMS keys. This user
2313
+ # could decrypt ciphertext that was encrypted by KMS keys in other
2314
+ # accounts if the key policy for the cross-account KMS key permits it.
2315
+ # If you must use an IAM policy for `Decrypt` permissions, limit the
2316
+ # user to particular KMS keys or particular trusted accounts. For
2317
+ # details, see [Best practices for IAM policies][4] in the *Key
2318
+ # Management Service Developer Guide*.
2319
+ #
2320
+ # `Decrypt` also supports [Amazon Web Services Nitro Enclaves][5], which
2321
+ # provide an isolated compute environment in Amazon EC2. To call
2322
+ # `Decrypt` for a Nitro enclave, use the [Amazon Web Services Nitro
2323
+ # Enclaves SDK][6] or any Amazon Web Services SDK. Use the `Recipient`
2324
+ # parameter to provide the attestation document for the enclave. Instead
2325
+ # of the plaintext data, the response includes the plaintext data
2326
+ # encrypted with the public key from the attestation document
2327
+ # (`CiphertextForRecipient`).For information about the interaction
2328
+ # between KMS and Amazon Web Services Nitro Enclaves, see [How Amazon
2329
+ # Web Services Nitro Enclaves uses KMS][7] in the *Key Management
2330
+ # Service Developer Guide*..
2313
2331
  #
2314
2332
  # The KMS key that you use for this operation must be in a compatible
2315
- # key state. For details, see [Key states of KMS keys][7] in the *Key
2333
+ # key state. For details, see [Key states of KMS keys][8] in the *Key
2316
2334
  # Management Service Developer Guide*.
2317
2335
  #
2318
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
2319
- # in a different Amazon Web Services account, specify the key ARN or
2320
- # alias ARN in the value of the `KeyId` parameter.
2336
+ # **Cross-account use**: Yes. If you use the `KeyId` parameter to
2337
+ # identify a KMS key in a different Amazon Web Services account, specify
2338
+ # the key ARN or the alias ARN of the KMS key.
2321
2339
  #
2322
- # **Required permissions**\: [kms:Decrypt][8] (key policy)
2340
+ # **Required permissions**: [kms:Decrypt][9] (key policy)
2323
2341
  #
2324
2342
  # **Related operations:**
2325
2343
  #
@@ -2337,10 +2355,11 @@ module Aws::KMS
2337
2355
  # [2]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
2338
2356
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
2339
2357
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policies-best-practices
2340
- # [5]: https://github.com/aws/aws-nitro-enclaves-sdk-c
2341
- # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
2342
- # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2343
- # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2358
+ # [5]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
2359
+ # [6]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
2360
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
2361
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2362
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2344
2363
  #
2345
2364
  # @option params [required, String, StringIO, File] :ciphertext_blob
2346
2365
  # Ciphertext to be decrypted. The blob includes metadata.
@@ -2425,16 +2444,44 @@ module Aws::KMS
2425
2444
  # represents the only supported algorithm that is valid for symmetric
2426
2445
  # encryption KMS keys.
2427
2446
  #
2447
+ # @option params [Types::RecipientInfo] :recipient
2448
+ # A signed [attestation document][1] from an Amazon Web Services Nitro
2449
+ # enclave and the encryption algorithm to use with the enclave's public
2450
+ # key. The only valid encryption algorithm is `RSAES_OAEP_SHA_256`.
2451
+ #
2452
+ # This parameter only supports attestation documents for Amazon Web
2453
+ # Services Nitro Enclaves. To include this parameter, use the [Amazon
2454
+ # Web Services Nitro Enclaves SDK][2] or any Amazon Web Services SDK.
2455
+ #
2456
+ # When you use this parameter, instead of returning the plaintext data,
2457
+ # KMS encrypts the plaintext data with the public key in the attestation
2458
+ # document, and returns the resulting ciphertext in the
2459
+ # `CiphertextForRecipient` field in the response. This ciphertext can be
2460
+ # decrypted only with the private key in the enclave. The `Plaintext`
2461
+ # field in the response is null or empty.
2462
+ #
2463
+ # For information about the interaction between KMS and Amazon Web
2464
+ # Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves
2465
+ # uses KMS][3] in the *Key Management Service Developer Guide*.
2466
+ #
2467
+ #
2468
+ #
2469
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
2470
+ # [2]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
2471
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
2472
+ #
2428
2473
  # @return [Types::DecryptResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2429
2474
  #
2430
2475
  # * {Types::DecryptResponse#key_id #key_id} => String
2431
2476
  # * {Types::DecryptResponse#plaintext #plaintext} => String
2432
2477
  # * {Types::DecryptResponse#encryption_algorithm #encryption_algorithm} => String
2478
+ # * {Types::DecryptResponse#ciphertext_for_recipient #ciphertext_for_recipient} => String
2433
2479
  #
2434
2480
  #
2435
- # @example Example: To decrypt data
2481
+ # @example Example: To decrypt data with a symmetric encryption KMS key
2436
2482
  #
2437
- # # The following example decrypts data that was encrypted with a KMS key.
2483
+ # # The following example decrypts data that was encrypted with a symmetric encryption KMS key. The KeyId is not required
2484
+ # # when decrypting with a symmetric encryption key, but it is a best practice.
2438
2485
  #
2439
2486
  # resp = client.decrypt({
2440
2487
  # ciphertext_blob: "<binary data>", # The encrypted data (ciphertext).
@@ -2443,10 +2490,51 @@ module Aws::KMS
2443
2490
  #
2444
2491
  # resp.to_h outputs the following:
2445
2492
  # {
2493
+ # encryption_algorithm: "SYMMETRIC_DEFAULT", # The encryption algorithm that was used to decrypt the ciphertext. SYMMETRIC_DEFAULT is the only valid value for symmetric encryption in AWS KMS.
2446
2494
  # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The Amazon Resource Name (ARN) of the KMS key that was used to decrypt the data.
2447
2495
  # plaintext: "<binary data>", # The decrypted (plaintext) data.
2448
2496
  # }
2449
2497
  #
2498
+ # @example Example: To decrypt data with an asymmetric encryption KMS key
2499
+ #
2500
+ # # The following example decrypts data that was encrypted with an asymmetric encryption KMS key. When the KMS encryption
2501
+ # # key is asymmetric, you must specify the KMS key ID and the encryption algorithm that was used to encrypt the data.
2502
+ #
2503
+ # resp = client.decrypt({
2504
+ # ciphertext_blob: "<binary data>", # The encrypted data (ciphertext).
2505
+ # encryption_algorithm: "RSAES_OAEP_SHA_256", # The encryption algorithm that was used to encrypt the data. This parameter is required to decrypt with an asymmetric KMS key.
2506
+ # key_id: "0987dcba-09fe-87dc-65ba-ab0987654321", # A key identifier for the KMS key to use to decrypt the data. This parameter is required to decrypt with an asymmetric KMS key.
2507
+ # })
2508
+ #
2509
+ # resp.to_h outputs the following:
2510
+ # {
2511
+ # encryption_algorithm: "RSAES_OAEP_SHA_256", # The encryption algorithm that was used to decrypt the ciphertext.
2512
+ # key_id: "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321", # The Amazon Resource Name (ARN) of the KMS key that was used to decrypt the data.
2513
+ # plaintext: "<binary data>", # The decrypted (plaintext) data.
2514
+ # }
2515
+ #
2516
+ # @example Example: To decrypt data for a Nitro enclave
2517
+ #
2518
+ # # The following Decrypt example includes the Recipient parameter with a signed attestation document from an AWS Nitro
2519
+ # # enclave. Instead of returning the decrypted data in plaintext (Plaintext), the operation returns the decrypted data
2520
+ # # encrypted by the public key from the attestation document (CiphertextForRecipient).
2521
+ #
2522
+ # resp = client.decrypt({
2523
+ # ciphertext_blob: "<binary data>", # The encrypted data. This ciphertext was encrypted with the KMS key
2524
+ # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The KMS key to use to decrypt the ciphertext
2525
+ # recipient: {
2526
+ # attestation_document: "<attestation document>",
2527
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256",
2528
+ # }, # Specifies the attestation document from the Nitro enclave and the encryption algorithm to use with the public key from the attestation document
2529
+ # })
2530
+ #
2531
+ # resp.to_h outputs the following:
2532
+ # {
2533
+ # ciphertext_for_recipient: "<binary data>", # The decrypted CiphertextBlob encrypted with the public key from the attestation document
2534
+ # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The KMS key that was used to decrypt the encrypted data (CiphertextBlob)
2535
+ # plaintext: "", # This field is null or empty
2536
+ # }
2537
+ #
2450
2538
  # @example Request syntax with placeholder values
2451
2539
  #
2452
2540
  # resp = client.decrypt({
@@ -2457,6 +2545,10 @@ module Aws::KMS
2457
2545
  # grant_tokens: ["GrantTokenType"],
2458
2546
  # key_id: "KeyIdType",
2459
2547
  # encryption_algorithm: "SYMMETRIC_DEFAULT", # accepts SYMMETRIC_DEFAULT, RSAES_OAEP_SHA_1, RSAES_OAEP_SHA_256, SM2PKE
2548
+ # recipient: {
2549
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256", # accepts RSAES_OAEP_SHA_256
2550
+ # attestation_document: "data",
2551
+ # },
2460
2552
  # })
2461
2553
  #
2462
2554
  # @example Response structure
@@ -2464,6 +2556,7 @@ module Aws::KMS
2464
2556
  # resp.key_id #=> String
2465
2557
  # resp.plaintext #=> String
2466
2558
  # resp.encryption_algorithm #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
2559
+ # resp.ciphertext_for_recipient #=> String
2467
2560
  #
2468
2561
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Decrypt AWS API Documentation
2469
2562
  #
@@ -2492,7 +2585,7 @@ module Aws::KMS
2492
2585
  # create a new alias. To associate an existing alias with a different
2493
2586
  # KMS key, call UpdateAlias.
2494
2587
  #
2495
- # **Cross-account use**\: No. You cannot perform this operation on an
2588
+ # **Cross-account use**: No. You cannot perform this operation on an
2496
2589
  # alias in a different Amazon Web Services account.
2497
2590
  #
2498
2591
  # **Required permissions**
@@ -2586,10 +2679,10 @@ module Aws::KMS
2586
2679
  # If the operation succeeds, it returns a JSON object with no
2587
2680
  # properties.
2588
2681
  #
2589
- # **Cross-account use**\: No. You cannot perform this operation on a
2682
+ # **Cross-account use**: No. You cannot perform this operation on a
2590
2683
  # custom key store in a different Amazon Web Services account.
2591
2684
  #
2592
- # **Required permissions**\: [kms:DeleteCustomKeyStore][5] (IAM policy)
2685
+ # **Required permissions**: [kms:DeleteCustomKeyStore][5] (IAM policy)
2593
2686
  #
2594
2687
  # **Related operations:**
2595
2688
  #
@@ -2663,10 +2756,10 @@ module Aws::KMS
2663
2756
  # key state. For details, see [Key states of KMS keys][2] in the *Key
2664
2757
  # Management Service Developer Guide*.
2665
2758
  #
2666
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
2759
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
2667
2760
  # key in a different Amazon Web Services account.
2668
2761
  #
2669
- # **Required permissions**\: [kms:DeleteImportedKeyMaterial][3] (key
2762
+ # **Required permissions**: [kms:DeleteImportedKeyMaterial][3] (key
2670
2763
  # policy)
2671
2764
  #
2672
2765
  # **Related operations:**
@@ -2758,10 +2851,10 @@ module Aws::KMS
2758
2851
  # see the [Troubleshooting external key stores][3]. Both topics are in
2759
2852
  # the *Key Management Service Developer Guide*.
2760
2853
  #
2761
- # **Cross-account use**\: No. You cannot perform this operation on a
2854
+ # **Cross-account use**: No. You cannot perform this operation on a
2762
2855
  # custom key store in a different Amazon Web Services account.
2763
2856
  #
2764
- # **Required permissions**\: [kms:DescribeCustomKeyStores][4] (IAM
2857
+ # **Required permissions**: [kms:DescribeCustomKeyStores][4] (IAM
2765
2858
  # policy)
2766
2859
  #
2767
2860
  # **Related operations:**
@@ -2847,7 +2940,7 @@ module Aws::KMS
2847
2940
  # {
2848
2941
  # custom_key_stores: [
2849
2942
  # {
2850
- # cloud_hsm_cluster_id: "cluster-1a23b4cdefg",
2943
+ # cloud_hsm_cluster_id: "cluster-234abcdefABC",
2851
2944
  # connection_state: "CONNECTED",
2852
2945
  # creation_date: Time.parse("1.499288695918E9"),
2853
2946
  # custom_key_store_id: "cks-1234567890abcdef0",
@@ -2996,11 +3089,11 @@ module Aws::KMS
2996
3089
  # services use `DescribeKey` to create [Amazon Web Services managed
2997
3090
  # keys][2] from a *predefined Amazon Web Services alias* with no key ID.
2998
3091
  #
2999
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
3092
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
3000
3093
  # in a different Amazon Web Services account, specify the key ARN or
3001
3094
  # alias ARN in the value of the `KeyId` parameter.
3002
3095
  #
3003
- # **Required permissions**\: [kms:DescribeKey][4] (key policy)
3096
+ # **Required permissions**: [kms:DescribeKey][4] (key policy)
3004
3097
  #
3005
3098
  # **Related operations:**
3006
3099
  #
@@ -3232,7 +3325,7 @@ module Aws::KMS
3232
3325
  # key_metadata: {
3233
3326
  # aws_account_id: "123456789012",
3234
3327
  # arn: "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
3235
- # cloud_hsm_cluster_id: "cluster-1a23b4cdefg",
3328
+ # cloud_hsm_cluster_id: "cluster-234abcdefABC",
3236
3329
  # creation_date: Time.parse(1646160362.664),
3237
3330
  # custom_key_store_id: "cks-1234567890abcdef0",
3238
3331
  # customer_master_key_spec: "SYMMETRIC_DEFAULT",
@@ -3347,12 +3440,12 @@ module Aws::KMS
3347
3440
  # key state. For details, see [Key states of KMS keys][2] in the *Key
3348
3441
  # Management Service Developer Guide*.
3349
3442
  #
3350
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
3443
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
3351
3444
  # key in a different Amazon Web Services account.
3352
3445
  #
3353
- # **Required permissions**\: [kms:DisableKey][3] (key policy)
3446
+ # **Required permissions**: [kms:DisableKey][3] (key policy)
3354
3447
  #
3355
- # **Related operations**\: EnableKey
3448
+ # **Related operations**: EnableKey
3356
3449
  #
3357
3450
  #
3358
3451
  #
@@ -3427,10 +3520,10 @@ module Aws::KMS
3427
3520
  # key state. For details, see [Key states of KMS keys][10] in the *Key
3428
3521
  # Management Service Developer Guide*.
3429
3522
  #
3430
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
3523
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
3431
3524
  # key in a different Amazon Web Services account.
3432
3525
  #
3433
- # **Required permissions**\: [kms:DisableKeyRotation][11] (key policy)
3526
+ # **Required permissions**: [kms:DisableKeyRotation][11] (key policy)
3434
3527
  #
3435
3528
  # **Related operations:**
3436
3529
  #
@@ -3532,10 +3625,10 @@ module Aws::KMS
3532
3625
  # If the operation succeeds, it returns a JSON object with no
3533
3626
  # properties.
3534
3627
  #
3535
- # **Cross-account use**\: No. You cannot perform this operation on a
3628
+ # **Cross-account use**: No. You cannot perform this operation on a
3536
3629
  # custom key store in a different Amazon Web Services account.
3537
3630
  #
3538
- # **Required permissions**\: [kms:DisconnectCustomKeyStore][3] (IAM
3631
+ # **Required permissions**: [kms:DisconnectCustomKeyStore][3] (IAM
3539
3632
  # policy)
3540
3633
  #
3541
3634
  # **Related operations:**
@@ -3601,12 +3694,12 @@ module Aws::KMS
3601
3694
  # key state. For details, see [Key states of KMS keys][2] in the *Key
3602
3695
  # Management Service Developer Guide*.
3603
3696
  #
3604
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
3697
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
3605
3698
  # key in a different Amazon Web Services account.
3606
3699
  #
3607
- # **Required permissions**\: [kms:EnableKey][3] (key policy)
3700
+ # **Required permissions**: [kms:EnableKey][3] (key policy)
3608
3701
  #
3609
- # **Related operations**\: DisableKey
3702
+ # **Related operations**: DisableKey
3610
3703
  #
3611
3704
  #
3612
3705
  #
@@ -3693,10 +3786,10 @@ module Aws::KMS
3693
3786
  # key state. For details, see [Key states of KMS keys][11] in the *Key
3694
3787
  # Management Service Developer Guide*.
3695
3788
  #
3696
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
3789
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
3697
3790
  # key in a different Amazon Web Services account.
3698
3791
  #
3699
- # **Required permissions**\: [kms:EnableKeyRotation][12] (key policy)
3792
+ # **Required permissions**: [kms:EnableKeyRotation][12] (key policy)
3700
3793
  #
3701
3794
  # **Related operations:**
3702
3795
  #
@@ -3812,39 +3905,39 @@ module Aws::KMS
3812
3905
  #
3813
3906
  # * Symmetric encryption KMS keys
3814
3907
  #
3815
- # * `SYMMETRIC_DEFAULT`\: 4096 bytes
3908
+ # * `SYMMETRIC_DEFAULT`: 4096 bytes
3816
3909
  #
3817
3910
  # ^
3818
3911
  #
3819
3912
  # * `RSA_2048`
3820
3913
  #
3821
- # * `RSAES_OAEP_SHA_1`\: 214 bytes
3914
+ # * `RSAES_OAEP_SHA_1`: 214 bytes
3822
3915
  #
3823
- # * `RSAES_OAEP_SHA_256`\: 190 bytes
3916
+ # * `RSAES_OAEP_SHA_256`: 190 bytes
3824
3917
  #
3825
3918
  # * `RSA_3072`
3826
3919
  #
3827
- # * `RSAES_OAEP_SHA_1`\: 342 bytes
3920
+ # * `RSAES_OAEP_SHA_1`: 342 bytes
3828
3921
  #
3829
- # * `RSAES_OAEP_SHA_256`\: 318 bytes
3922
+ # * `RSAES_OAEP_SHA_256`: 318 bytes
3830
3923
  #
3831
3924
  # * `RSA_4096`
3832
3925
  #
3833
- # * `RSAES_OAEP_SHA_1`\: 470 bytes
3926
+ # * `RSAES_OAEP_SHA_1`: 470 bytes
3834
3927
  #
3835
- # * `RSAES_OAEP_SHA_256`\: 446 bytes
3928
+ # * `RSAES_OAEP_SHA_256`: 446 bytes
3836
3929
  #
3837
- # * `SM2PKE`\: 1024 bytes (China Regions only)
3930
+ # * `SM2PKE`: 1024 bytes (China Regions only)
3838
3931
  #
3839
3932
  # The KMS key that you use for this operation must be in a compatible
3840
3933
  # key state. For details, see [Key states of KMS keys][2] in the *Key
3841
3934
  # Management Service Developer Guide*.
3842
3935
  #
3843
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
3936
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
3844
3937
  # in a different Amazon Web Services account, specify the key ARN or
3845
3938
  # alias ARN in the value of the `KeyId` parameter.
3846
3939
  #
3847
- # **Required permissions**\: [kms:Encrypt][3] (key policy)
3940
+ # **Required permissions**: [kms:Encrypt][3] (key policy)
3848
3941
  #
3849
3942
  # **Related operations:**
3850
3943
  #
@@ -3894,6 +3987,10 @@ module Aws::KMS
3894
3987
  # asymmetric encryption algorithms and HMAC algorithms that KMS uses do
3895
3988
  # not support an encryption context.
3896
3989
  #
3990
+ # Do not include confidential or sensitive information in this field.
3991
+ # This field may be displayed in plaintext in CloudTrail logs and other
3992
+ # output.
3993
+ #
3897
3994
  # An *encryption context* is a collection of non-secret key-value pairs
3898
3995
  # that represent additional authenticated data. When you use an
3899
3996
  # encryption context to encrypt data, you must specify the same (an
@@ -3942,9 +4039,9 @@ module Aws::KMS
3942
4039
  # * {Types::EncryptResponse#encryption_algorithm #encryption_algorithm} => String
3943
4040
  #
3944
4041
  #
3945
- # @example Example: To encrypt data
4042
+ # @example Example: To encrypt data with a symmetric encryption KMS key
3946
4043
  #
3947
- # # The following example encrypts data with the specified KMS key.
4044
+ # # The following example encrypts data with the specified symmetric encryption KMS key.
3948
4045
  #
3949
4046
  # resp = client.encrypt({
3950
4047
  # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key to use for encryption. You can use the key ID or Amazon Resource Name (ARN) of the KMS key, or the name or ARN of an alias that refers to the KMS key.
@@ -3954,9 +4051,28 @@ module Aws::KMS
3954
4051
  # resp.to_h outputs the following:
3955
4052
  # {
3956
4053
  # ciphertext_blob: "<binary data>", # The encrypted data (ciphertext).
4054
+ # encryption_algorithm: "SYMMETRIC_DEFAULT", # The encryption algorithm that was used in the operation. For symmetric encryption keys, the encryption algorithm is always SYMMETRIC_DEFAULT.
3957
4055
  # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The ARN of the KMS key that was used to encrypt the data.
3958
4056
  # }
3959
4057
  #
4058
+ # @example Example: To encrypt data with an asymmetric encryption KMS key
4059
+ #
4060
+ # # The following example encrypts data with the specified RSA asymmetric KMS key. When you encrypt with an asymmetric key,
4061
+ # # you must specify the encryption algorithm.
4062
+ #
4063
+ # resp = client.encrypt({
4064
+ # encryption_algorithm: "RSAES_OAEP_SHA_256", # The encryption algorithm to use in the operation.
4065
+ # key_id: "0987dcba-09fe-87dc-65ba-ab0987654321", # The identifier of the KMS key to use for encryption. You can use the key ID or Amazon Resource Name (ARN) of the KMS key, or the name or ARN of an alias that refers to the KMS key.
4066
+ # plaintext: "<binary data>", # The data to encrypt.
4067
+ # })
4068
+ #
4069
+ # resp.to_h outputs the following:
4070
+ # {
4071
+ # ciphertext_blob: "<binary data>", # The encrypted data (ciphertext).
4072
+ # encryption_algorithm: "RSAES_OAEP_SHA_256", # The encryption algorithm that was used in the operation.
4073
+ # key_id: "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321", # The ARN of the KMS key that was used to encrypt the data.
4074
+ # }
4075
+ #
3960
4076
  # @example Request syntax with placeholder values
3961
4077
  #
3962
4078
  # resp = client.encrypt({
@@ -4001,10 +4117,10 @@ module Aws::KMS
4001
4117
  # `KeySpec` or `NumberOfBytes` parameters (but not both). For 128-bit
4002
4118
  # and 256-bit data keys, use the `KeySpec` parameter.
4003
4119
  #
4004
- # To generate an SM4 data key (China Regions only), specify a `KeySpec`
4005
- # value of `AES_128` or `NumberOfBytes` value of `128`. The symmetric
4006
- # encryption key used in China Regions to encrypt your data key is an
4007
- # SM4 encryption key.
4120
+ # To generate a 128-bit SM4 data key (China Regions only), specify a
4121
+ # `KeySpec` value of `AES_128` or a `NumberOfBytes` value of `16`. The
4122
+ # symmetric encryption key used in China Regions to encrypt your data
4123
+ # key is an SM4 encryption key.
4008
4124
  #
4009
4125
  # To get only an encrypted copy of the data key, use
4010
4126
  # GenerateDataKeyWithoutPlaintext. To generate an asymmetric data key
@@ -4020,14 +4136,22 @@ module Aws::KMS
4020
4136
  # information, see [Encryption Context][1] in the *Key Management
4021
4137
  # Service Developer Guide*.
4022
4138
  #
4023
- # Applications in Amazon Web Services Nitro Enclaves can call this
4024
- # operation by using the [Amazon Web Services Nitro Enclaves Development
4025
- # Kit][2]. For information about the supporting parameters, see [How
4026
- # Amazon Web Services Nitro Enclaves use KMS][3] in the *Key Management
4027
- # Service Developer Guide*.
4139
+ # `GenerateDataKey` also supports [Amazon Web Services Nitro
4140
+ # Enclaves][2], which provide an isolated compute environment in Amazon
4141
+ # EC2. To call `GenerateDataKey` for an Amazon Web Services Nitro
4142
+ # enclave, use the [Amazon Web Services Nitro Enclaves SDK][3] or any
4143
+ # Amazon Web Services SDK. Use the `Recipient` parameter to provide the
4144
+ # attestation document for the enclave. `GenerateDataKey` returns a copy
4145
+ # of the data key encrypted under the specified KMS key, as usual. But
4146
+ # instead of a plaintext copy of the data key, the response includes a
4147
+ # copy of the data key encrypted under the public key from the
4148
+ # attestation document (`CiphertextForRecipient`). For information about
4149
+ # the interaction between KMS and Amazon Web Services Nitro Enclaves,
4150
+ # see [How Amazon Web Services Nitro Enclaves uses KMS][4] in the *Key
4151
+ # Management Service Developer Guide*..
4028
4152
  #
4029
4153
  # The KMS key that you use for this operation must be in a compatible
4030
- # key state. For details, see [Key states of KMS keys][4] in the *Key
4154
+ # key state. For details, see [Key states of KMS keys][5] in the *Key
4031
4155
  # Management Service Developer Guide*.
4032
4156
  #
4033
4157
  # **How to use your data key**
@@ -4035,8 +4159,8 @@ module Aws::KMS
4035
4159
  # We recommend that you use the following pattern to encrypt data
4036
4160
  # locally in your application. You can write your own code or use a
4037
4161
  # client-side encryption library, such as the [Amazon Web Services
4038
- # Encryption SDK][5], the [Amazon DynamoDB Encryption Client][6], or
4039
- # [Amazon S3 client-side encryption][7] to do these tasks for you.
4162
+ # Encryption SDK][6], the [Amazon DynamoDB Encryption Client][7], or
4163
+ # [Amazon S3 client-side encryption][8] to do these tasks for you.
4040
4164
  #
4041
4165
  # To encrypt data outside of KMS:
4042
4166
  #
@@ -4057,11 +4181,11 @@ module Aws::KMS
4057
4181
  # 2. Use the plaintext data key to decrypt data outside of KMS, then
4058
4182
  # erase the plaintext data key from memory.
4059
4183
  #
4060
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
4184
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
4061
4185
  # in a different Amazon Web Services account, specify the key ARN or
4062
4186
  # alias ARN in the value of the `KeyId` parameter.
4063
4187
  #
4064
- # **Required permissions**\: [kms:GenerateDataKey][8] (key policy)
4188
+ # **Required permissions**: [kms:GenerateDataKey][9] (key policy)
4065
4189
  #
4066
4190
  # **Related operations:**
4067
4191
  #
@@ -4078,13 +4202,14 @@ module Aws::KMS
4078
4202
  #
4079
4203
  #
4080
4204
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
4081
- # [2]: https://github.com/aws/aws-nitro-enclaves-sdk-c
4082
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4083
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
4084
- # [5]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
4085
- # [6]: https://docs.aws.amazon.com/dynamodb-encryption-client/latest/devguide/
4086
- # [7]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
4087
- # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4205
+ # [2]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
4206
+ # [3]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
4207
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4208
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
4209
+ # [6]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
4210
+ # [7]: https://docs.aws.amazon.com/dynamodb-encryption-client/latest/devguide/
4211
+ # [8]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
4212
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4088
4213
  #
4089
4214
  # @option params [required, String] :key_id
4090
4215
  # Specifies the symmetric encryption KMS key that encrypts the data key.
@@ -4115,6 +4240,10 @@ module Aws::KMS
4115
4240
  # Specifies the encryption context that will be used when encrypting the
4116
4241
  # data key.
4117
4242
  #
4243
+ # Do not include confidential or sensitive information in this field.
4244
+ # This field may be displayed in plaintext in CloudTrail logs and other
4245
+ # output.
4246
+ #
4118
4247
  # An *encryption context* is a collection of non-secret key-value pairs
4119
4248
  # that represent additional authenticated data. When you use an
4120
4249
  # encryption context to encrypt data, you must specify the same (an
@@ -4160,11 +4289,40 @@ module Aws::KMS
4160
4289
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
4161
4290
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
4162
4291
  #
4292
+ # @option params [Types::RecipientInfo] :recipient
4293
+ # A signed [attestation document][1] from an Amazon Web Services Nitro
4294
+ # enclave and the encryption algorithm to use with the enclave's public
4295
+ # key. The only valid encryption algorithm is `RSAES_OAEP_SHA_256`.
4296
+ #
4297
+ # This parameter only supports attestation documents for Amazon Web
4298
+ # Services Nitro Enclaves. To include this parameter, use the [Amazon
4299
+ # Web Services Nitro Enclaves SDK][2] or any Amazon Web Services SDK.
4300
+ #
4301
+ # When you use this parameter, instead of returning the plaintext data
4302
+ # key, KMS encrypts the plaintext data key under the public key in the
4303
+ # attestation document, and returns the resulting ciphertext in the
4304
+ # `CiphertextForRecipient` field in the response. This ciphertext can be
4305
+ # decrypted only with the private key in the enclave. The
4306
+ # `CiphertextBlob` field in the response contains a copy of the data key
4307
+ # encrypted under the KMS key specified by the `KeyId` parameter. The
4308
+ # `Plaintext` field in the response is null or empty.
4309
+ #
4310
+ # For information about the interaction between KMS and Amazon Web
4311
+ # Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves
4312
+ # uses KMS][3] in the *Key Management Service Developer Guide*.
4313
+ #
4314
+ #
4315
+ #
4316
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
4317
+ # [2]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
4318
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4319
+ #
4163
4320
  # @return [Types::GenerateDataKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4164
4321
  #
4165
4322
  # * {Types::GenerateDataKeyResponse#ciphertext_blob #ciphertext_blob} => String
4166
4323
  # * {Types::GenerateDataKeyResponse#plaintext #plaintext} => String
4167
4324
  # * {Types::GenerateDataKeyResponse#key_id #key_id} => String
4325
+ # * {Types::GenerateDataKeyResponse#ciphertext_for_recipient #ciphertext_for_recipient} => String
4168
4326
  #
4169
4327
  #
4170
4328
  # @example Example: To generate a data key
@@ -4184,6 +4342,31 @@ module Aws::KMS
4184
4342
  # plaintext: "<binary data>", # The unencrypted (plaintext) data key.
4185
4343
  # }
4186
4344
  #
4345
+ # @example Example: To generate a data key pair for a Nitro enclave
4346
+ #
4347
+ # # The following example includes the Recipient parameter with a signed attestation document from an AWS Nitro enclave.
4348
+ # # Instead of returning a copy of the data key encrypted by the KMS key and a plaintext copy of the data key,
4349
+ # # GenerateDataKey returns one copy of the data key encrypted by the KMS key (CiphertextBlob) and one copy of the data key
4350
+ # # encrypted by the public key from the attestation document (CiphertextForRecipient). The operation doesn't return a
4351
+ # # plaintext data key.
4352
+ #
4353
+ # resp = client.generate_data_key({
4354
+ # key_id: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # Identifies the KMS key used to encrypt the encrypted data key (CiphertextBlob)
4355
+ # key_spec: "AES_256", # Specifies the type of data key to return
4356
+ # recipient: {
4357
+ # attestation_document: "<attestation document>",
4358
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256",
4359
+ # }, # Specifies the attestation document from the Nitro enclave and the encryption algorithm to use with the public key from the attestation document
4360
+ # })
4361
+ #
4362
+ # resp.to_h outputs the following:
4363
+ # {
4364
+ # ciphertext_blob: "<binary data>", # The data key encrypted by the specified KMS key
4365
+ # ciphertext_for_recipient: "<binary data>", # The plaintext data key encrypted by the public key from the attestation document
4366
+ # key_id: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The KMS key used to encrypt the CiphertextBlob (encrypted data key)
4367
+ # plaintext: "", # This field is null or empty
4368
+ # }
4369
+ #
4187
4370
  # @example Request syntax with placeholder values
4188
4371
  #
4189
4372
  # resp = client.generate_data_key({
@@ -4194,6 +4377,10 @@ module Aws::KMS
4194
4377
  # number_of_bytes: 1,
4195
4378
  # key_spec: "AES_256", # accepts AES_256, AES_128
4196
4379
  # grant_tokens: ["GrantTokenType"],
4380
+ # recipient: {
4381
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256", # accepts RSAES_OAEP_SHA_256
4382
+ # attestation_document: "data",
4383
+ # },
4197
4384
  # })
4198
4385
  #
4199
4386
  # @example Response structure
@@ -4201,6 +4388,7 @@ module Aws::KMS
4201
4388
  # resp.ciphertext_blob #=> String
4202
4389
  # resp.plaintext #=> String
4203
4390
  # resp.key_id #=> String
4391
+ # resp.ciphertext_for_recipient #=> String
4204
4392
  #
4205
4393
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKey AWS API Documentation
4206
4394
  #
@@ -4253,23 +4441,38 @@ module Aws::KMS
4253
4441
  # 5280][1]. The private key is a DER-encoded PKCS8 PrivateKeyInfo, as
4254
4442
  # specified in [RFC 5958][2].
4255
4443
  #
4444
+ # `GenerateDataKeyPair` also supports [Amazon Web Services Nitro
4445
+ # Enclaves][3], which provide an isolated compute environment in Amazon
4446
+ # EC2. To call `GenerateDataKeyPair` for an Amazon Web Services Nitro
4447
+ # enclave, use the [Amazon Web Services Nitro Enclaves SDK][4] or any
4448
+ # Amazon Web Services SDK. Use the `Recipient` parameter to provide the
4449
+ # attestation document for the enclave. `GenerateDataKeyPair` returns
4450
+ # the public data key and a copy of the private data key encrypted under
4451
+ # the specified KMS key, as usual. But instead of a plaintext copy of
4452
+ # the private data key (`PrivateKeyPlaintext`), the response includes a
4453
+ # copy of the private data key encrypted under the public key from the
4454
+ # attestation document (`CiphertextForRecipient`). For information about
4455
+ # the interaction between KMS and Amazon Web Services Nitro Enclaves,
4456
+ # see [How Amazon Web Services Nitro Enclaves uses KMS][5] in the *Key
4457
+ # Management Service Developer Guide*..
4458
+ #
4256
4459
  # You can use an optional encryption context to add additional security
4257
4460
  # to the encryption operation. If you specify an `EncryptionContext`,
4258
4461
  # you must specify the same encryption context (a case-sensitive exact
4259
4462
  # match) when decrypting the encrypted data key. Otherwise, the request
4260
4463
  # to decrypt fails with an `InvalidCiphertextException`. For more
4261
- # information, see [Encryption Context][3] in the *Key Management
4464
+ # information, see [Encryption Context][6] in the *Key Management
4262
4465
  # Service Developer Guide*.
4263
4466
  #
4264
4467
  # The KMS key that you use for this operation must be in a compatible
4265
- # key state. For details, see [Key states of KMS keys][4] in the *Key
4468
+ # key state. For details, see [Key states of KMS keys][7] in the *Key
4266
4469
  # Management Service Developer Guide*.
4267
4470
  #
4268
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
4471
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
4269
4472
  # in a different Amazon Web Services account, specify the key ARN or
4270
4473
  # alias ARN in the value of the `KeyId` parameter.
4271
4474
  #
4272
- # **Required permissions**\: [kms:GenerateDataKeyPair][5] (key policy)
4475
+ # **Required permissions**: [kms:GenerateDataKeyPair][8] (key policy)
4273
4476
  #
4274
4477
  # **Related operations:**
4275
4478
  #
@@ -4287,14 +4490,21 @@ module Aws::KMS
4287
4490
  #
4288
4491
  # [1]: https://tools.ietf.org/html/rfc5280
4289
4492
  # [2]: https://tools.ietf.org/html/rfc5958
4290
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
4291
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
4292
- # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4493
+ # [3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
4494
+ # [4]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
4495
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4496
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
4497
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
4498
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4293
4499
  #
4294
4500
  # @option params [Hash<String,String>] :encryption_context
4295
4501
  # Specifies the encryption context that will be used when encrypting the
4296
4502
  # private key in the data key pair.
4297
4503
  #
4504
+ # Do not include confidential or sensitive information in this field.
4505
+ # This field may be displayed in plaintext in CloudTrail logs and other
4506
+ # output.
4507
+ #
4298
4508
  # An *encryption context* is a collection of non-secret key-value pairs
4299
4509
  # that represent additional authenticated data. When you use an
4300
4510
  # encryption context to encrypt data, you must specify the same (an
@@ -4357,6 +4567,35 @@ module Aws::KMS
4357
4567
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
4358
4568
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
4359
4569
  #
4570
+ # @option params [Types::RecipientInfo] :recipient
4571
+ # A signed [attestation document][1] from an Amazon Web Services Nitro
4572
+ # enclave and the encryption algorithm to use with the enclave's public
4573
+ # key. The only valid encryption algorithm is `RSAES_OAEP_SHA_256`.
4574
+ #
4575
+ # This parameter only supports attestation documents for Amazon Web
4576
+ # Services Nitro Enclaves. To include this parameter, use the [Amazon
4577
+ # Web Services Nitro Enclaves SDK][2] or any Amazon Web Services SDK.
4578
+ #
4579
+ # When you use this parameter, instead of returning a plaintext copy of
4580
+ # the private data key, KMS encrypts the plaintext private data key
4581
+ # under the public key in the attestation document, and returns the
4582
+ # resulting ciphertext in the `CiphertextForRecipient` field in the
4583
+ # response. This ciphertext can be decrypted only with the private key
4584
+ # in the enclave. The `CiphertextBlob` field in the response contains a
4585
+ # copy of the private data key encrypted under the KMS key specified by
4586
+ # the `KeyId` parameter. The `PrivateKeyPlaintext` field in the response
4587
+ # is null or empty.
4588
+ #
4589
+ # For information about the interaction between KMS and Amazon Web
4590
+ # Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves
4591
+ # uses KMS][3] in the *Key Management Service Developer Guide*.
4592
+ #
4593
+ #
4594
+ #
4595
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
4596
+ # [2]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
4597
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4598
+ #
4360
4599
  # @return [Types::GenerateDataKeyPairResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4361
4600
  #
4362
4601
  # * {Types::GenerateDataKeyPairResponse#private_key_ciphertext_blob #private_key_ciphertext_blob} => String
@@ -4364,6 +4603,7 @@ module Aws::KMS
4364
4603
  # * {Types::GenerateDataKeyPairResponse#public_key #public_key} => String
4365
4604
  # * {Types::GenerateDataKeyPairResponse#key_id #key_id} => String
4366
4605
  # * {Types::GenerateDataKeyPairResponse#key_pair_spec #key_pair_spec} => String
4606
+ # * {Types::GenerateDataKeyPairResponse#ciphertext_for_recipient #ciphertext_for_recipient} => String
4367
4607
  #
4368
4608
  #
4369
4609
  # @example Example: To generate an RSA key pair for encryption and decryption
@@ -4385,6 +4625,33 @@ module Aws::KMS
4385
4625
  # public_key: "<binary data>", # The public key (plaintext) of the RSA data key pair.
4386
4626
  # }
4387
4627
  #
4628
+ # @example Example: To generate a data key pair for a Nitro enclave
4629
+ #
4630
+ # # The following example includes the Recipient parameter with a signed attestation document from an AWS Nitro enclave.
4631
+ # # Instead of returning a plaintext copy of the private data key, GenerateDataKeyPair returns a copy of the private data
4632
+ # # key encrypted by the public key from the attestation document (CiphertextForRecipient). It returns the public data key
4633
+ # # (PublicKey) and a copy of private data key encrypted under the specified KMS key (PrivateKeyCiphertextBlob), as usual,
4634
+ # # but plaintext private data key field (PrivateKeyPlaintext) is null or empty.
4635
+ #
4636
+ # resp = client.generate_data_key_pair({
4637
+ # key_id: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The key ID of the symmetric encryption KMS key that encrypts the private RSA key in the data key pair.
4638
+ # key_pair_spec: "RSA_3072", # The requested key spec of the RSA data key pair.
4639
+ # recipient: {
4640
+ # attestation_document: "<attestation document>",
4641
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256",
4642
+ # }, # Specifies the attestation document from the Nitro enclave and the encryption algorithm to use with the public key from the attestation document.
4643
+ # })
4644
+ #
4645
+ # resp.to_h outputs the following:
4646
+ # {
4647
+ # ciphertext_for_recipient: "<binary data>", # The private key of the RSA data key pair encrypted by the public key from the attestation document
4648
+ # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The key ARN of the symmetric encryption KMS key that was used to encrypt the PrivateKeyCiphertextBlob.
4649
+ # key_pair_spec: "RSA_3072", # The actual key spec of the RSA data key pair.
4650
+ # private_key_ciphertext_blob: "<binary data>", # The private key of the RSA data key pair encrypted by the KMS key.
4651
+ # private_key_plaintext: "", # This field is null or empty
4652
+ # public_key: "<binary data>", # The public key (plaintext) of the RSA data key pair.
4653
+ # }
4654
+ #
4388
4655
  # @example Request syntax with placeholder values
4389
4656
  #
4390
4657
  # resp = client.generate_data_key_pair({
@@ -4394,6 +4661,10 @@ module Aws::KMS
4394
4661
  # key_id: "KeyIdType", # required
4395
4662
  # key_pair_spec: "RSA_2048", # required, accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1, SM2
4396
4663
  # grant_tokens: ["GrantTokenType"],
4664
+ # recipient: {
4665
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256", # accepts RSAES_OAEP_SHA_256
4666
+ # attestation_document: "data",
4667
+ # },
4397
4668
  # })
4398
4669
  #
4399
4670
  # @example Response structure
@@ -4403,6 +4674,7 @@ module Aws::KMS
4403
4674
  # resp.public_key #=> String
4404
4675
  # resp.key_id #=> String
4405
4676
  # resp.key_pair_spec #=> String, one of "RSA_2048", "RSA_3072", "RSA_4096", "ECC_NIST_P256", "ECC_NIST_P384", "ECC_NIST_P521", "ECC_SECG_P256K1", "SM2"
4677
+ # resp.ciphertext_for_recipient #=> String
4406
4678
  #
4407
4679
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPair AWS API Documentation
4408
4680
  #
@@ -4456,12 +4728,12 @@ module Aws::KMS
4456
4728
  # key state. For details, see [Key states of KMS keys][3] in the *Key
4457
4729
  # Management Service Developer Guide*.
4458
4730
  #
4459
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
4731
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
4460
4732
  # in a different Amazon Web Services account, specify the key ARN or
4461
4733
  # alias ARN in the value of the `KeyId` parameter.
4462
4734
  #
4463
- # **Required permissions**\:
4464
- # [kms:GenerateDataKeyPairWithoutPlaintext][4] (key policy)
4735
+ # **Required permissions**: [kms:GenerateDataKeyPairWithoutPlaintext][4]
4736
+ # (key policy)
4465
4737
  #
4466
4738
  # **Related operations:**
4467
4739
  #
@@ -4486,6 +4758,10 @@ module Aws::KMS
4486
4758
  # Specifies the encryption context that will be used when encrypting the
4487
4759
  # private key in the data key pair.
4488
4760
  #
4761
+ # Do not include confidential or sensitive information in this field.
4762
+ # This field may be displayed in plaintext in CloudTrail logs and other
4763
+ # output.
4764
+ #
4489
4765
  # An *encryption context* is a collection of non-secret key-value pairs
4490
4766
  # that represent additional authenticated data. When you use an
4491
4767
  # encryption context to encrypt data, you must specify the same (an
@@ -4637,7 +4913,7 @@ module Aws::KMS
4637
4913
  # and 256-bit data keys, use the `KeySpec` parameter.
4638
4914
  #
4639
4915
  # To generate an SM4 data key (China Regions only), specify a `KeySpec`
4640
- # value of `AES_128` or `NumberOfBytes` value of `128`. The symmetric
4916
+ # value of `AES_128` or `NumberOfBytes` value of `16`. The symmetric
4641
4917
  # encryption key used in China Regions to encrypt your data key is an
4642
4918
  # SM4 encryption key.
4643
4919
  #
@@ -4656,11 +4932,11 @@ module Aws::KMS
4656
4932
  # key state. For details, see [Key states of KMS keys][2] in the *Key
4657
4933
  # Management Service Developer Guide*.
4658
4934
  #
4659
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
4935
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
4660
4936
  # in a different Amazon Web Services account, specify the key ARN or
4661
4937
  # alias ARN in the value of the `KeyId` parameter.
4662
4938
  #
4663
- # **Required permissions**\: [kms:GenerateDataKeyWithoutPlaintext][3]
4939
+ # **Required permissions**: [kms:GenerateDataKeyWithoutPlaintext][3]
4664
4940
  # (key policy)
4665
4941
  #
4666
4942
  # **Related operations:**
@@ -4710,6 +4986,10 @@ module Aws::KMS
4710
4986
  # Specifies the encryption context that will be used when encrypting the
4711
4987
  # data key.
4712
4988
  #
4989
+ # Do not include confidential or sensitive information in this field.
4990
+ # This field may be displayed in plaintext in CloudTrail logs and other
4991
+ # output.
4992
+ #
4713
4993
  # An *encryption context* is a collection of non-secret key-value pairs
4714
4994
  # that represent additional authenticated data. When you use an
4715
4995
  # encryption context to encrypt data, you must specify the same (an
@@ -4823,13 +5103,13 @@ module Aws::KMS
4823
5103
  # key state. For details, see [Key states of KMS keys][3] in the *Key
4824
5104
  # Management Service Developer Guide*.
4825
5105
  #
4826
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
5106
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
4827
5107
  # in a different Amazon Web Services account, specify the key ARN or
4828
5108
  # alias ARN in the value of the `KeyId` parameter.
4829
5109
  #
4830
- # **Required permissions**\: [kms:GenerateMac][4] (key policy)
5110
+ # **Required permissions**: [kms:GenerateMac][4] (key policy)
4831
5111
  #
4832
- # **Related operations**\: VerifyMac
5112
+ # **Related operations**: VerifyMac
4833
5113
  #
4834
5114
  #
4835
5115
  #
@@ -4935,26 +5215,33 @@ module Aws::KMS
4935
5215
  # the byte string in the CloudHSM cluster associated with an CloudHSM
4936
5216
  # key store, use the `CustomKeyStoreId` parameter.
4937
5217
  #
4938
- # Applications in Amazon Web Services Nitro Enclaves can call this
4939
- # operation by using the [Amazon Web Services Nitro Enclaves Development
4940
- # Kit][1]. For information about the supporting parameters, see [How
4941
- # Amazon Web Services Nitro Enclaves use KMS][2] in the *Key Management
4942
- # Service Developer Guide*.
5218
+ # `GenerateRandom` also supports [Amazon Web Services Nitro
5219
+ # Enclaves][1], which provide an isolated compute environment in Amazon
5220
+ # EC2. To call `GenerateRandom` for a Nitro enclave, use the [Amazon Web
5221
+ # Services Nitro Enclaves SDK][2] or any Amazon Web Services SDK. Use
5222
+ # the `Recipient` parameter to provide the attestation document for the
5223
+ # enclave. Instead of plaintext bytes, the response includes the
5224
+ # plaintext bytes encrypted under the public key from the attestation
5225
+ # document (`CiphertextForRecipient`).For information about the
5226
+ # interaction between KMS and Amazon Web Services Nitro Enclaves, see
5227
+ # [How Amazon Web Services Nitro Enclaves uses KMS][3] in the *Key
5228
+ # Management Service Developer Guide*.
4943
5229
  #
4944
5230
  # For more information about entropy and random number generation, see
4945
- # [Key Management Service Cryptographic Details][3].
5231
+ # [Key Management Service Cryptographic Details][4].
4946
5232
  #
4947
- # **Cross-account use**\: Not applicable. `GenerateRandom` does not use
5233
+ # **Cross-account use**: Not applicable. `GenerateRandom` does not use
4948
5234
  # any account-specific resources, such as KMS keys.
4949
5235
  #
4950
- # **Required permissions**\: [kms:GenerateRandom][4] (IAM policy)
5236
+ # **Required permissions**: [kms:GenerateRandom][5] (IAM policy)
4951
5237
  #
4952
5238
  #
4953
5239
  #
4954
- # [1]: https://github.com/aws/aws-nitro-enclaves-sdk-c
4955
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4956
- # [3]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
4957
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
5240
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
5241
+ # [2]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
5242
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
5243
+ # [4]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
5244
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4958
5245
  #
4959
5246
  # @option params [Integer] :number_of_bytes
4960
5247
  # The length of the random byte string. This parameter is required.
@@ -4968,9 +5255,36 @@ module Aws::KMS
4968
5255
  # specify the ID of an external key store, `GenerateRandom` throws an
4969
5256
  # `UnsupportedOperationException`.
4970
5257
  #
5258
+ # @option params [Types::RecipientInfo] :recipient
5259
+ # A signed [attestation document][1] from an Amazon Web Services Nitro
5260
+ # enclave and the encryption algorithm to use with the enclave's public
5261
+ # key. The only valid encryption algorithm is `RSAES_OAEP_SHA_256`.
5262
+ #
5263
+ # This parameter only supports attestation documents for Amazon Web
5264
+ # Services Nitro Enclaves. To include this parameter, use the [Amazon
5265
+ # Web Services Nitro Enclaves SDK][2] or any Amazon Web Services SDK.
5266
+ #
5267
+ # When you use this parameter, instead of returning plaintext bytes, KMS
5268
+ # encrypts the plaintext bytes under the public key in the attestation
5269
+ # document, and returns the resulting ciphertext in the
5270
+ # `CiphertextForRecipient` field in the response. This ciphertext can be
5271
+ # decrypted only with the private key in the enclave. The `Plaintext`
5272
+ # field in the response is null or empty.
5273
+ #
5274
+ # For information about the interaction between KMS and Amazon Web
5275
+ # Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves
5276
+ # uses KMS][3] in the *Key Management Service Developer Guide*.
5277
+ #
5278
+ #
5279
+ #
5280
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
5281
+ # [2]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
5282
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
5283
+ #
4971
5284
  # @return [Types::GenerateRandomResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4972
5285
  #
4973
5286
  # * {Types::GenerateRandomResponse#plaintext #plaintext} => String
5287
+ # * {Types::GenerateRandomResponse#ciphertext_for_recipient #ciphertext_for_recipient} => String
4974
5288
  #
4975
5289
  #
4976
5290
  # @example Example: To generate random data
@@ -4986,16 +5300,41 @@ module Aws::KMS
4986
5300
  # plaintext: "<binary data>", # The random data.
4987
5301
  # }
4988
5302
  #
5303
+ # @example Example: To generate random data
5304
+ #
5305
+ # # The following example includes the Recipient parameter with a signed attestation document from an AWS Nitro enclave.
5306
+ # # Instead of returning a plaintext (unencrypted) byte string, GenerateRandom returns the byte string encrypted by the
5307
+ # # public key from the enclave's attestation document.
5308
+ #
5309
+ # resp = client.generate_random({
5310
+ # number_of_bytes: 1024, # The length of the random byte string
5311
+ # recipient: {
5312
+ # attestation_document: "<attestation document>",
5313
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256",
5314
+ # }, # Specifies the attestation document from the Nitro enclave and the encryption algorithm to use with the public key from the attestation document
5315
+ # })
5316
+ #
5317
+ # resp.to_h outputs the following:
5318
+ # {
5319
+ # ciphertext_for_recipient: "<binary data>", # The random data encrypted under the public key from the attestation document
5320
+ # plaintext: "", # This field is null or empty
5321
+ # }
5322
+ #
4989
5323
  # @example Request syntax with placeholder values
4990
5324
  #
4991
5325
  # resp = client.generate_random({
4992
5326
  # number_of_bytes: 1,
4993
5327
  # custom_key_store_id: "CustomKeyStoreIdType",
5328
+ # recipient: {
5329
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256", # accepts RSAES_OAEP_SHA_256
5330
+ # attestation_document: "data",
5331
+ # },
4994
5332
  # })
4995
5333
  #
4996
5334
  # @example Response structure
4997
5335
  #
4998
5336
  # resp.plaintext #=> String
5337
+ # resp.ciphertext_for_recipient #=> String
4999
5338
  #
5000
5339
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateRandom AWS API Documentation
5001
5340
  #
@@ -5008,12 +5347,12 @@ module Aws::KMS
5008
5347
 
5009
5348
  # Gets a key policy attached to the specified KMS key.
5010
5349
  #
5011
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
5350
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
5012
5351
  # key in a different Amazon Web Services account.
5013
5352
  #
5014
- # **Required permissions**\: [kms:GetKeyPolicy][1] (key policy)
5353
+ # **Required permissions**: [kms:GetKeyPolicy][1] (key policy)
5015
5354
  #
5016
- # **Related operations**\: PutKeyPolicy
5355
+ # **Related operations**: PutKeyPolicy
5017
5356
  #
5018
5357
  #
5019
5358
  #
@@ -5124,11 +5463,11 @@ module Aws::KMS
5124
5463
  # If you cancel the deletion, the original key rotation status returns
5125
5464
  # to `true`.
5126
5465
  #
5127
- # **Cross-account use**\: Yes. To perform this operation on a KMS key in
5466
+ # **Cross-account use**: Yes. To perform this operation on a KMS key in
5128
5467
  # a different Amazon Web Services account, specify the key ARN in the
5129
5468
  # value of the `KeyId` parameter.
5130
5469
  #
5131
- # **Required permissions**\: [kms:GetKeyRotationStatus][11] (key policy)
5470
+ # **Required permissions**: [kms:GetKeyRotationStatus][11] (key policy)
5132
5471
  #
5133
5472
  # **Related operations:**
5134
5473
  #
@@ -5231,11 +5570,10 @@ module Aws::KMS
5231
5570
  # key state. For details, see [Key states of KMS keys][2] in the *Key
5232
5571
  # Management Service Developer Guide*.
5233
5572
  #
5234
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
5573
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
5235
5574
  # key in a different Amazon Web Services account.
5236
5575
  #
5237
- # **Required permissions**\: [kms:GetParametersForImport][3] (key
5238
- # policy)
5576
+ # **Required permissions**: [kms:GetParametersForImport][3] (key policy)
5239
5577
  #
5240
5578
  # **Related operations:**
5241
5579
  #
@@ -5266,14 +5604,21 @@ module Aws::KMS
5266
5604
  # DescribeKey.
5267
5605
  #
5268
5606
  # @option params [required, String] :wrapping_algorithm
5269
- # The algorithm you will use to encrypt the key material before
5270
- # importing it with ImportKeyMaterial. For more information, see
5271
- # [Encrypt the Key Material][1] in the *Key Management Service Developer
5272
- # Guide*.
5607
+ # The algorithm you will use to encrypt the key material before using
5608
+ # the ImportKeyMaterial operation to import it. For more information,
5609
+ # see [Encrypt the key material][1] in the *Key Management Service
5610
+ # Developer Guide*.
5611
+ #
5612
+ # The `RSAES_PKCS1_V1_5` wrapping algorithm is deprecated. We recommend
5613
+ # that you begin using a different wrapping algorithm immediately. KMS
5614
+ # will end support for `RSAES_PKCS1_V1_5` by October 1, 2023 pursuant to
5615
+ # [cryptographic key management guidance][2] from the National Institute
5616
+ # of Standards and Technology (NIST).
5273
5617
  #
5274
5618
  #
5275
5619
  #
5276
5620
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html
5621
+ # [2]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-131Ar2.pdf
5277
5622
  #
5278
5623
  # @option params [required, String] :wrapping_key_spec
5279
5624
  # The type of wrapping key (public key) to return in the response. Only
@@ -5349,12 +5694,12 @@ module Aws::KMS
5349
5694
  # returns important information about the public key in the response,
5350
5695
  # including:
5351
5696
  #
5352
- # * [KeySpec][2]\: The type of key material in the public key, such as
5697
+ # * [KeySpec][2]: The type of key material in the public key, such as
5353
5698
  # `RSA_4096` or `ECC_NIST_P521`.
5354
5699
  #
5355
- # * [KeyUsage][3]\: Whether the key is used for encryption or signing.
5700
+ # * [KeyUsage][3]: Whether the key is used for encryption or signing.
5356
5701
  #
5357
- # * [EncryptionAlgorithms][4] or [SigningAlgorithms][5]\: A list of the
5702
+ # * [EncryptionAlgorithms][4] or [SigningAlgorithms][5]: A list of the
5358
5703
  # encryption algorithms or the signing algorithms for the key.
5359
5704
  #
5360
5705
  # Although KMS cannot enforce these restrictions on external operations,
@@ -5374,13 +5719,13 @@ module Aws::KMS
5374
5719
  # key state. For details, see [Key states of KMS keys][7] in the *Key
5375
5720
  # Management Service Developer Guide*.
5376
5721
  #
5377
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
5722
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
5378
5723
  # in a different Amazon Web Services account, specify the key ARN or
5379
5724
  # alias ARN in the value of the `KeyId` parameter.
5380
5725
  #
5381
- # **Required permissions**\: [kms:GetPublicKey][8] (key policy)
5726
+ # **Required permissions**: [kms:GetPublicKey][8] (key policy)
5382
5727
  #
5383
- # **Related operations**\: CreateKey
5728
+ # **Related operations**: CreateKey
5384
5729
  #
5385
5730
  #
5386
5731
  #
@@ -5545,10 +5890,10 @@ module Aws::KMS
5545
5890
  # key state. For details, see [Key states of KMS keys][4] in the *Key
5546
5891
  # Management Service Developer Guide*.
5547
5892
  #
5548
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
5893
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
5549
5894
  # key in a different Amazon Web Services account.
5550
5895
  #
5551
- # **Required permissions**\: [kms:ImportKeyMaterial][5] (key policy)
5896
+ # **Required permissions**: [kms:ImportKeyMaterial][5] (key policy)
5552
5897
  #
5553
5898
  # **Related operations:**
5554
5899
  #
@@ -5680,10 +6025,10 @@ module Aws::KMS
5680
6025
  # Web Services creates in your account, including predefined aliases, do
5681
6026
  # not count against your [KMS aliases quota][1].
5682
6027
  #
5683
- # **Cross-account use**\: No. `ListAliases` does not return aliases in
6028
+ # **Cross-account use**: No. `ListAliases` does not return aliases in
5684
6029
  # other Amazon Web Services accounts.
5685
6030
  #
5686
- # **Required permissions**\: [kms:ListAliases][2] (IAM policy)
6031
+ # **Required permissions**: [kms:ListAliases][2] (IAM policy)
5687
6032
  #
5688
6033
  # For details, see [Controlling access to aliases][3] in the *Key
5689
6034
  # Management Service Developer Guide*.
@@ -5844,11 +6189,11 @@ module Aws::KMS
5844
6189
  #
5845
6190
  # </note>
5846
6191
  #
5847
- # **Cross-account use**\: Yes. To perform this operation on a KMS key in
6192
+ # **Cross-account use**: Yes. To perform this operation on a KMS key in
5848
6193
  # a different Amazon Web Services account, specify the key ARN in the
5849
6194
  # value of the `KeyId` parameter.
5850
6195
  #
5851
- # **Required permissions**\: [kms:ListGrants][4] (key policy)
6196
+ # **Required permissions**: [kms:ListGrants][4] (key policy)
5852
6197
  #
5853
6198
  # **Related operations:**
5854
6199
  #
@@ -6023,10 +6368,10 @@ module Aws::KMS
6023
6368
  # GetKeyPolicy operation. However, the only valid policy name is
6024
6369
  # `default`.
6025
6370
  #
6026
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
6371
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
6027
6372
  # key in a different Amazon Web Services account.
6028
6373
  #
6029
- # **Required permissions**\: [kms:ListKeyPolicies][1] (key policy)
6374
+ # **Required permissions**: [kms:ListKeyPolicies][1] (key policy)
6030
6375
  #
6031
6376
  # **Related operations:**
6032
6377
  #
@@ -6121,10 +6466,10 @@ module Aws::KMS
6121
6466
  # Gets a list of all KMS keys in the caller's Amazon Web Services
6122
6467
  # account and Region.
6123
6468
  #
6124
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
6469
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
6125
6470
  # key in a different Amazon Web Services account.
6126
6471
  #
6127
- # **Required permissions**\: [kms:ListKeys][1] (IAM policy)
6472
+ # **Required permissions**: [kms:ListKeys][1] (IAM policy)
6128
6473
  #
6129
6474
  # **Related operations:**
6130
6475
  #
@@ -6236,10 +6581,10 @@ module Aws::KMS
6236
6581
  # Services General Reference*. For information about using tags in KMS,
6237
6582
  # see [Tagging keys][2].
6238
6583
  #
6239
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
6584
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
6240
6585
  # key in a different Amazon Web Services account.
6241
6586
  #
6242
- # **Required permissions**\: [kms:ListResourceTags][3] (key policy)
6587
+ # **Required permissions**: [kms:ListResourceTags][3] (key policy)
6243
6588
  #
6244
6589
  # **Related operations:**
6245
6590
  #
@@ -6363,14 +6708,14 @@ module Aws::KMS
6363
6708
  # Guide</i> </i>. For examples of working with grants in several
6364
6709
  # programming languages, see [Programming grants][2].
6365
6710
  #
6366
- # **Cross-account use**\: You must specify a principal in your Amazon
6367
- # Web Services account. However, this operation can return grants in any
6711
+ # **Cross-account use**: You must specify a principal in your Amazon Web
6712
+ # Services account. However, this operation can return grants in any
6368
6713
  # Amazon Web Services account. You do not need `kms:ListRetirableGrants`
6369
6714
  # permission (or any other additional permission) in any Amazon Web
6370
6715
  # Services account other than your own.
6371
6716
  #
6372
- # **Required permissions**\: [kms:ListRetirableGrants][3] (IAM policy)
6373
- # in your Amazon Web Services account.
6717
+ # **Required permissions**: [kms:ListRetirableGrants][3] (IAM policy) in
6718
+ # your Amazon Web Services account.
6374
6719
  #
6375
6720
  # **Related operations:**
6376
6721
  #
@@ -6406,17 +6751,16 @@ module Aws::KMS
6406
6751
  # your Amazon Web Services account.
6407
6752
  #
6408
6753
  # To specify the retiring principal, use the [Amazon Resource Name
6409
- # (ARN)][1] of an Amazon Web Services principal. Valid Amazon Web
6410
- # Services principals include Amazon Web Services accounts (root), IAM
6411
- # users, federated users, and assumed role users. For examples of the
6412
- # ARN syntax for specifying a principal, see [Amazon Web Services
6413
- # Identity and Access Management (IAM)][2] in the Example ARNs section
6414
- # of the *Amazon Web Services General Reference*.
6754
+ # (ARN)][1] of an Amazon Web Services principal. Valid principals
6755
+ # include Amazon Web Services accounts, IAM users, IAM roles, federated
6756
+ # users, and assumed role users. For help with the ARN syntax for a
6757
+ # principal, see [IAM ARNs][2] in the <i> <i>Identity and Access
6758
+ # Management User Guide</i> </i>.
6415
6759
  #
6416
6760
  #
6417
6761
  #
6418
6762
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
6419
- # [2]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam
6763
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
6420
6764
  #
6421
6765
  # @return [Types::ListGrantsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
6422
6766
  #
@@ -6500,12 +6844,12 @@ module Aws::KMS
6500
6844
  # programming languages, see [Setting a key policy][3] in the *Key
6501
6845
  # Management Service Developer Guide*.
6502
6846
  #
6503
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
6847
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
6504
6848
  # key in a different Amazon Web Services account.
6505
6849
  #
6506
- # **Required permissions**\: [kms:PutKeyPolicy][4] (key policy)
6850
+ # **Required permissions**: [kms:PutKeyPolicy][4] (key policy)
6507
6851
  #
6508
- # **Related operations**\: GetKeyPolicy
6852
+ # **Related operations**: GetKeyPolicy
6509
6853
  #
6510
6854
  #
6511
6855
  #
@@ -6537,22 +6881,20 @@ module Aws::KMS
6537
6881
  #
6538
6882
  # The key policy must meet the following criteria:
6539
6883
  #
6540
- # * If you don't set `BypassPolicyLockoutSafetyCheck` to true, the key
6541
- # policy must allow the principal that is making the `PutKeyPolicy`
6542
- # request to make a subsequent `PutKeyPolicy` request on the KMS key.
6543
- # This reduces the risk that the KMS key becomes unmanageable. For
6544
- # more information, refer to the scenario in the [Default Key
6545
- # Policy][1] section of the *Key Management Service Developer Guide*.
6884
+ # * The key policy must allow the calling principal to make a subsequent
6885
+ # `PutKeyPolicy` request on the KMS key. This reduces the risk that
6886
+ # the KMS key becomes unmanageable. For more information, see [Default
6887
+ # key policy][1] in the *Key Management Service Developer Guide*. (To
6888
+ # omit this condition, set `BypassPolicyLockoutSafetyCheck` to true.)
6546
6889
  #
6547
6890
  # * Each statement in the key policy must contain one or more
6548
6891
  # principals. The principals in the key policy must exist and be
6549
- # visible to KMS. When you create a new Amazon Web Services principal
6550
- # (for example, an IAM user or role), you might need to enforce a
6551
- # delay before including the new principal in a key policy because the
6552
- # new principal might not be immediately visible to KMS. For more
6553
- # information, see [Changes that I make are not always immediately
6554
- # visible][2] in the *Amazon Web Services Identity and Access
6555
- # Management User Guide*.
6892
+ # visible to KMS. When you create a new Amazon Web Services principal,
6893
+ # you might need to enforce a delay before including the new principal
6894
+ # in a key policy because the new principal might not be immediately
6895
+ # visible to KMS. For more information, see [Changes that I make are
6896
+ # not always immediately visible][2] in the *Amazon Web Services
6897
+ # Identity and Access Management User Guide*.
6556
6898
  #
6557
6899
  # A key policy document can include only the following characters:
6558
6900
  #
@@ -6573,30 +6915,28 @@ module Aws::KMS
6573
6915
  #
6574
6916
  #
6575
6917
  #
6576
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
6918
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
6577
6919
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
6578
6920
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
6579
6921
  # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
6580
6922
  #
6581
6923
  # @option params [Boolean] :bypass_policy_lockout_safety_check
6582
- # A flag to indicate whether to bypass the key policy lockout safety
6583
- # check.
6924
+ # Skips ("bypasses") the key policy lockout safety check. The default
6925
+ # value is false.
6584
6926
  #
6585
6927
  # Setting this value to true increases the risk that the KMS key becomes
6586
6928
  # unmanageable. Do not set this value to true indiscriminately.
6587
6929
  #
6588
- # For more information, refer to the scenario in the [Default Key
6589
- # Policy][1] section in the *Key Management Service Developer Guide*.
6930
+ # For more information, see [Default key policy][1] in the *Key
6931
+ # Management Service Developer Guide*.
6590
6932
  #
6591
6933
  # Use this parameter only when you intend to prevent the principal that
6592
- # is making the request from making a subsequent `PutKeyPolicy` request
6593
- # on the KMS key.
6594
- #
6595
- # The default value is false.
6934
+ # is making the request from making a subsequent PutKeyPolicy request on
6935
+ # the KMS key.
6596
6936
  #
6597
6937
  #
6598
6938
  #
6599
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
6939
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
6600
6940
  #
6601
6941
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
6602
6942
  #
@@ -6692,12 +7032,12 @@ module Aws::KMS
6692
7032
  # key state. For details, see [Key states of KMS keys][6] in the *Key
6693
7033
  # Management Service Developer Guide*.
6694
7034
  #
6695
- # **Cross-account use**\: Yes. The source KMS key and destination KMS
6696
- # key can be in different Amazon Web Services accounts. Either or both
6697
- # KMS keys can be in a different account than the caller. To specify a
6698
- # KMS key in a different account, you must use its key ARN or alias ARN.
7035
+ # **Cross-account use**: Yes. The source KMS key and destination KMS key
7036
+ # can be in different Amazon Web Services accounts. Either or both KMS
7037
+ # keys can be in a different account than the caller. To specify a KMS
7038
+ # key in a different account, you must use its key ARN or alias ARN.
6699
7039
  #
6700
- # **Required permissions**\:
7040
+ # **Required permissions**:
6701
7041
  #
6702
7042
  # * [kms:ReEncryptFrom][7] permission on the source KMS key (key policy)
6703
7043
  #
@@ -6818,6 +7158,10 @@ module Aws::KMS
6818
7158
  # Specifies that encryption context to use when the reencrypting the
6819
7159
  # data.
6820
7160
  #
7161
+ # Do not include confidential or sensitive information in this field.
7162
+ # This field may be displayed in plaintext in CloudTrail logs and other
7163
+ # output.
7164
+ #
6821
7165
  # A destination encryption context is valid only when the destination
6822
7166
  # KMS key is a symmetric encryption KMS key. The standard ciphertext
6823
7167
  # format for asymmetric KMS keys does not include fields for metadata.
@@ -6998,10 +7342,10 @@ module Aws::KMS
6998
7342
  #
6999
7343
  # </note>
7000
7344
  #
7001
- # **Cross-account use**\: No. You cannot use this operation to create a
7345
+ # **Cross-account use**: No. You cannot use this operation to create a
7002
7346
  # replica key in a different Amazon Web Services account.
7003
7347
  #
7004
- # **Required permissions**\:
7348
+ # **Required permissions**:
7005
7349
  #
7006
7350
  # * `kms:ReplicateKey` on the primary key (in the primary key's
7007
7351
  # Region). Include this permission in the primary key's key policy.
@@ -7097,22 +7441,20 @@ module Aws::KMS
7097
7441
  #
7098
7442
  # If you provide a key policy, it must meet the following criteria:
7099
7443
  #
7100
- # * If you don't set `BypassPolicyLockoutSafetyCheck` to true, the key
7101
- # policy must give the caller `kms:PutKeyPolicy` permission on the
7102
- # replica key. This reduces the risk that the KMS key becomes
7103
- # unmanageable. For more information, refer to the scenario in the
7104
- # [Default Key Policy][2] section of the <i> <i>Key Management Service
7105
- # Developer Guide</i> </i>.
7444
+ # * The key policy must allow the calling principal to make a subsequent
7445
+ # `PutKeyPolicy` request on the KMS key. This reduces the risk that
7446
+ # the KMS key becomes unmanageable. For more information, see [Default
7447
+ # key policy][2] in the *Key Management Service Developer Guide*. (To
7448
+ # omit this condition, set `BypassPolicyLockoutSafetyCheck` to true.)
7106
7449
  #
7107
7450
  # * Each statement in the key policy must contain one or more
7108
7451
  # principals. The principals in the key policy must exist and be
7109
- # visible to KMS. When you create a new Amazon Web Services principal
7110
- # (for example, an IAM user or role), you might need to enforce a
7111
- # delay before including the new principal in a key policy because the
7112
- # new principal might not be immediately visible to KMS. For more
7113
- # information, see [Changes that I make are not always immediately
7114
- # visible][3] in the <i> <i>Identity and Access Management User
7115
- # Guide</i> </i>.
7452
+ # visible to KMS. When you create a new Amazon Web Services principal,
7453
+ # you might need to enforce a delay before including the new principal
7454
+ # in a key policy because the new principal might not be immediately
7455
+ # visible to KMS. For more information, see [Changes that I make are
7456
+ # not always immediately visible][3] in the *Amazon Web Services
7457
+ # Identity and Access Management User Guide*.
7116
7458
  #
7117
7459
  # A key policy document can include only the following characters:
7118
7460
  #
@@ -7134,35 +7476,37 @@ module Aws::KMS
7134
7476
  #
7135
7477
  #
7136
7478
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
7137
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
7479
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
7138
7480
  # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
7139
7481
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
7140
7482
  # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
7141
7483
  #
7142
7484
  # @option params [Boolean] :bypass_policy_lockout_safety_check
7143
- # A flag to indicate whether to bypass the key policy lockout safety
7144
- # check.
7485
+ # Skips ("bypasses") the key policy lockout safety check. The default
7486
+ # value is false.
7145
7487
  #
7146
7488
  # Setting this value to true increases the risk that the KMS key becomes
7147
7489
  # unmanageable. Do not set this value to true indiscriminately.
7148
7490
  #
7149
- # For more information, refer to the scenario in the [Default Key
7150
- # Policy][1] section in the *Key Management Service Developer Guide*.
7491
+ # For more information, see [Default key policy][1] in the *Key
7492
+ # Management Service Developer Guide*.
7151
7493
  #
7152
7494
  # Use this parameter only when you intend to prevent the principal that
7153
- # is making the request from making a subsequent `PutKeyPolicy` request
7154
- # on the KMS key.
7155
- #
7156
- # The default value is false.
7495
+ # is making the request from making a subsequent PutKeyPolicy request on
7496
+ # the KMS key.
7157
7497
  #
7158
7498
  #
7159
7499
  #
7160
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
7500
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
7161
7501
  #
7162
7502
  # @option params [String] :description
7163
7503
  # A description of the KMS key. The default value is an empty string (no
7164
7504
  # description).
7165
7505
  #
7506
+ # Do not include confidential or sensitive information in this field.
7507
+ # This field may be displayed in plaintext in CloudTrail logs and other
7508
+ # output.
7509
+ #
7166
7510
  # The description is not a shared property of multi-Region keys. You can
7167
7511
  # specify the same description or a different description for each key
7168
7512
  # in a set of related multi-Region keys. KMS does not synchronize this
@@ -7173,6 +7517,10 @@ module Aws::KMS
7173
7517
  # the KMS key when it is created. To tag an existing KMS key, use the
7174
7518
  # TagResource operation.
7175
7519
  #
7520
+ # Do not include confidential or sensitive information in this field.
7521
+ # This field may be displayed in plaintext in CloudTrail logs and other
7522
+ # output.
7523
+ #
7176
7524
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
7177
7525
  # key. For details, see [ABAC for KMS][1] in the *Key Management Service
7178
7526
  # Developer Guide*.
@@ -7337,10 +7685,10 @@ module Aws::KMS
7337
7685
  # Guide</i> </i>. For examples of working with grants in several
7338
7686
  # programming languages, see [Programming grants][4].
7339
7687
  #
7340
- # **Cross-account use**\: Yes. You can retire a grant on a KMS key in a
7688
+ # **Cross-account use**: Yes. You can retire a grant on a KMS key in a
7341
7689
  # different Amazon Web Services account.
7342
7690
  #
7343
- # **Required permissions:**\:Permission to retire a grant is determined
7691
+ # **Required permissions:**:Permission to retire a grant is determined
7344
7692
  # primarily by the grant. For details, see [Retiring and revoking
7345
7693
  # grants][2] in the *Key Management Service Developer Guide*.
7346
7694
  #
@@ -7435,11 +7783,11 @@ module Aws::KMS
7435
7783
  # Guide</i> </i>. For examples of working with grants in several
7436
7784
  # programming languages, see [Programming grants][4].
7437
7785
  #
7438
- # **Cross-account use**\: Yes. To perform this operation on a KMS key in
7786
+ # **Cross-account use**: Yes. To perform this operation on a KMS key in
7439
7787
  # a different Amazon Web Services account, specify the key ARN in the
7440
7788
  # value of the `KeyId` parameter.
7441
7789
  #
7442
- # **Required permissions**\: [kms:RevokeGrant][5] (key policy).
7790
+ # **Required permissions**: [kms:RevokeGrant][5] (key policy).
7443
7791
  #
7444
7792
  # **Related operations:**
7445
7793
  #
@@ -7556,10 +7904,10 @@ module Aws::KMS
7556
7904
  # key state. For details, see [Key states of KMS keys][6] in the *Key
7557
7905
  # Management Service Developer Guide*.
7558
7906
  #
7559
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
7907
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
7560
7908
  # key in a different Amazon Web Services account.
7561
7909
  #
7562
- # **Required permissions**\: kms:ScheduleKeyDeletion (key policy)
7910
+ # **Required permissions**: kms:ScheduleKeyDeletion (key policy)
7563
7911
  #
7564
7912
  # **Related operations**
7565
7913
  #
@@ -7699,13 +8047,13 @@ module Aws::KMS
7699
8047
  # key state. For details, see [Key states of KMS keys][3] in the *Key
7700
8048
  # Management Service Developer Guide*.
7701
8049
  #
7702
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
8050
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
7703
8051
  # in a different Amazon Web Services account, specify the key ARN or
7704
8052
  # alias ARN in the value of the `KeyId` parameter.
7705
8053
  #
7706
- # **Required permissions**\: [kms:Sign][4] (key policy)
8054
+ # **Required permissions**: [kms:Sign][4] (key policy)
7707
8055
  #
7708
- # **Related operations**\: Verify
8056
+ # **Related operations**: Verify
7709
8057
  #
7710
8058
  #
7711
8059
  #
@@ -7741,15 +8089,52 @@ module Aws::KMS
7741
8089
  #
7742
8090
  # @option params [required, String, StringIO, File] :message
7743
8091
  # Specifies the message or message digest to sign. Messages can be
7744
- # 0-4096 bytes. To sign a larger message, provide the message digest.
8092
+ # 0-4096 bytes. To sign a larger message, provide a message digest.
7745
8093
  #
7746
- # If you provide a message, KMS generates a hash digest of the message
7747
- # and then signs it.
8094
+ # If you provide a message digest, use the `DIGEST` value of
8095
+ # `MessageType` to prevent the digest from being hashed again while
8096
+ # signing.
7748
8097
  #
7749
8098
  # @option params [String] :message_type
7750
- # Tells KMS whether the value of the `Message` parameter is a message or
7751
- # message digest. The default value, RAW, indicates a message. To
7752
- # indicate a message digest, enter `DIGEST`.
8099
+ # Tells KMS whether the value of the `Message` parameter should be
8100
+ # hashed as part of the signing algorithm. Use `RAW` for unhashed
8101
+ # messages; use `DIGEST` for message digests, which are already hashed.
8102
+ #
8103
+ # When the value of `MessageType` is `RAW`, KMS uses the standard
8104
+ # signing algorithm, which begins with a hash function. When the value
8105
+ # is `DIGEST`, KMS skips the hashing step in the signing algorithm.
8106
+ #
8107
+ # Use the `DIGEST` value only when the value of the `Message` parameter
8108
+ # is a message digest. If you use the `DIGEST` value with an unhashed
8109
+ # message, the security of the signing operation can be compromised.
8110
+ #
8111
+ # When the value of `MessageType`is `DIGEST`, the length of the
8112
+ # `Message` value must match the length of hashed messages for the
8113
+ # specified signing algorithm.
8114
+ #
8115
+ # You can submit a message digest and omit the `MessageType` or specify
8116
+ # `RAW` so the digest is hashed again while signing. However, this can
8117
+ # cause verification failures when verifying with a system that assumes
8118
+ # a single hash.
8119
+ #
8120
+ # The hashing algorithm in that `Sign` uses is based on the
8121
+ # `SigningAlgorithm` value.
8122
+ #
8123
+ # * Signing algorithms that end in SHA\_256 use the SHA\_256 hashing
8124
+ # algorithm.
8125
+ #
8126
+ # * Signing algorithms that end in SHA\_384 use the SHA\_384 hashing
8127
+ # algorithm.
8128
+ #
8129
+ # * Signing algorithms that end in SHA\_512 use the SHA\_512 hashing
8130
+ # algorithm.
8131
+ #
8132
+ # * SM2DSA uses the SM3 hashing algorithm. For details, see [Offline
8133
+ # verification with SM2 key pairs][1].
8134
+ #
8135
+ #
8136
+ #
8137
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
7753
8138
  #
7754
8139
  # @option params [Array<String>] :grant_tokens
7755
8140
  # A list of grant tokens.
@@ -7768,7 +8153,9 @@ module Aws::KMS
7768
8153
  # Specifies the signing algorithm to use when signing the message.
7769
8154
  #
7770
8155
  # Choose an algorithm that is compatible with the type and size of the
7771
- # specified asymmetric KMS key.
8156
+ # specified asymmetric KMS key. When signing with RSA key pairs,
8157
+ # RSASSA-PSS algorithms are preferred. We include RSASSA-PKCS1-v1\_5
8158
+ # algorithms for compatibility with existing applications.
7772
8159
  #
7773
8160
  # @return [Types::SignResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
7774
8161
  #
@@ -7796,6 +8183,26 @@ module Aws::KMS
7796
8183
  # signing_algorithm: "ECDSA_SHA_384", # The actual signing algorithm that was used to generate the signature.
7797
8184
  # }
7798
8185
  #
8186
+ # @example Example: To digitally sign a message digest with an asymmetric KMS key.
8187
+ #
8188
+ # # This operation uses the private key in an asymmetric RSA signing KMS key to generate a digital signature for a message
8189
+ # # digest. In this example, a large message was hashed and the resulting digest is provided in the Message parameter. To
8190
+ # # tell KMS not to hash the message again, the MessageType field is set to DIGEST
8191
+ #
8192
+ # resp = client.sign({
8193
+ # key_id: "alias/RSA_signing_key", # The asymmetric KMS key to be used to generate the digital signature. This example uses an alias of the KMS key.
8194
+ # message: "<message digest to be signed>", # Message to be signed. Use Base-64 for the CLI.
8195
+ # message_type: "DIGEST", # Indicates whether the message is RAW or a DIGEST. When it is RAW, KMS hashes the message before signing. When it is DIGEST, KMS skips the hashing step and signs the Message value.
8196
+ # signing_algorithm: "RSASSA_PKCS1_V1_5_SHA_256", # The requested signing algorithm. This must be an algorithm that the KMS key supports.
8197
+ # })
8198
+ #
8199
+ # resp.to_h outputs the following:
8200
+ # {
8201
+ # key_id: "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321", # The key ARN of the asymmetric KMS key that was used to sign the message.
8202
+ # signature: "<binary data>", # The digital signature of the message.
8203
+ # signing_algorithm: "RSASSA_PKCS1_V1_5_SHA_256", # The actual signing algorithm that was used to generate the signature.
8204
+ # }
8205
+ #
7799
8206
  # @example Request syntax with placeholder values
7800
8207
  #
7801
8208
  # resp = client.sign({
@@ -7850,10 +8257,10 @@ module Aws::KMS
7850
8257
  # key state. For details, see [Key states of KMS keys][9] in the *Key
7851
8258
  # Management Service Developer Guide*.
7852
8259
  #
7853
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
8260
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
7854
8261
  # key in a different Amazon Web Services account.
7855
8262
  #
7856
- # **Required permissions**\: [kms:TagResource][10] (key policy)
8263
+ # **Required permissions**: [kms:TagResource][10] (key policy)
7857
8264
  #
7858
8265
  # **Related operations**
7859
8266
  #
@@ -7894,10 +8301,12 @@ module Aws::KMS
7894
8301
  # DescribeKey.
7895
8302
  #
7896
8303
  # @option params [required, Array<Types::Tag>] :tags
7897
- # One or more tags.
8304
+ # One or more tags. Each tag consists of a tag key and a tag value. The
8305
+ # tag value can be an empty (null) string.
7898
8306
  #
7899
- # Each tag consists of a tag key and a tag value. The tag value can be
7900
- # an empty (null) string.
8307
+ # Do not include confidential or sensitive information in this field.
8308
+ # This field may be displayed in plaintext in CloudTrail logs and other
8309
+ # output.
7901
8310
  #
7902
8311
  # You cannot have more than one tag on a KMS key with the same tag key.
7903
8312
  # If you specify an existing tag key with a different tag value, KMS
@@ -7964,10 +8373,10 @@ module Aws::KMS
7964
8373
  # key state. For details, see [Key states of KMS keys][5] in the *Key
7965
8374
  # Management Service Developer Guide*.
7966
8375
  #
7967
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
8376
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
7968
8377
  # key in a different Amazon Web Services account.
7969
8378
  #
7970
- # **Required permissions**\: [kms:UntagResource][6] (key policy)
8379
+ # **Required permissions**: [kms:UntagResource][6] (key policy)
7971
8380
  #
7972
8381
  # **Related operations**
7973
8382
  #
@@ -8068,7 +8477,7 @@ module Aws::KMS
8068
8477
  # key state. For details, see [Key states of KMS keys][2] in the *Key
8069
8478
  # Management Service Developer Guide*.
8070
8479
  #
8071
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
8480
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
8072
8481
  # key in a different Amazon Web Services account.
8073
8482
  #
8074
8483
  # **Required permissions**
@@ -8103,6 +8512,10 @@ module Aws::KMS
8103
8512
  # `alias/ExampleAlias`. You cannot use `UpdateAlias` to change the alias
8104
8513
  # name.
8105
8514
  #
8515
+ # Do not include confidential or sensitive information in this field.
8516
+ # This field may be displayed in plaintext in CloudTrail logs and other
8517
+ # output.
8518
+ #
8106
8519
  # @option params [required, String] :target_key_id
8107
8520
  # Identifies the [customer managed key][1] to associate with the alias.
8108
8521
  # You don't have permission to associate an alias with an [Amazon Web
@@ -8240,10 +8653,10 @@ module Aws::KMS
8240
8653
  # If the operation succeeds, it returns a JSON object with no
8241
8654
  # properties.
8242
8655
  #
8243
- # **Cross-account use**\: No. You cannot perform this operation on a
8656
+ # **Cross-account use**: No. You cannot perform this operation on a
8244
8657
  # custom key store in a different Amazon Web Services account.
8245
8658
  #
8246
- # **Required permissions**\: [kms:UpdateCustomKeyStore][2] (IAM policy)
8659
+ # **Required permissions**: [kms:UpdateCustomKeyStore][2] (IAM policy)
8247
8660
  #
8248
8661
  # **Related operations:**
8249
8662
  #
@@ -8272,6 +8685,10 @@ module Aws::KMS
8272
8685
  # you specify. The custom key store name must be unique in the Amazon
8273
8686
  # Web Services account.
8274
8687
  #
8688
+ # Do not include confidential or sensitive information in this field.
8689
+ # This field may be displayed in plaintext in CloudTrail logs and other
8690
+ # output.
8691
+ #
8275
8692
  # To change this value, an CloudHSM key store must be disconnected. An
8276
8693
  # external key store can be connected or disconnected.
8277
8694
  #
@@ -8425,7 +8842,7 @@ module Aws::KMS
8425
8842
  # # worked, use the DescribeCustomKeyStores operation.
8426
8843
  #
8427
8844
  # resp = client.update_custom_key_store({
8428
- # cloud_hsm_cluster_id: "cluster-1a23b4cdefg", # The ID of the AWS CloudHSM cluster that you want to associate with the custom key store. This cluster must be related to the original CloudHSM cluster for this key store.
8845
+ # cloud_hsm_cluster_id: "cluster-234abcdefABC", # The ID of the AWS CloudHSM cluster that you want to associate with the custom key store. This cluster must be related to the original CloudHSM cluster for this key store.
8429
8846
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store that you are updating.
8430
8847
  # })
8431
8848
  #
@@ -8516,10 +8933,10 @@ module Aws::KMS
8516
8933
  # key state. For details, see [Key states of KMS keys][1] in the *Key
8517
8934
  # Management Service Developer Guide*.
8518
8935
  #
8519
- # **Cross-account use**\: No. You cannot perform this operation on a KMS
8936
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
8520
8937
  # key in a different Amazon Web Services account.
8521
8938
  #
8522
- # **Required permissions**\: [kms:UpdateKeyDescription][2] (key policy)
8939
+ # **Required permissions**: [kms:UpdateKeyDescription][2] (key policy)
8523
8940
  #
8524
8941
  # **Related operations**
8525
8942
  #
@@ -8550,6 +8967,10 @@ module Aws::KMS
8550
8967
  # @option params [required, String] :description
8551
8968
  # New description for the KMS key.
8552
8969
  #
8970
+ # Do not include confidential or sensitive information in this field.
8971
+ # This field may be displayed in plaintext in CloudTrail logs and other
8972
+ # output.
8973
+ #
8553
8974
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
8554
8975
  #
8555
8976
  #
@@ -8632,10 +9053,10 @@ module Aws::KMS
8632
9053
  # This operation does not return any output. To verify that primary key
8633
9054
  # is changed, use the DescribeKey operation.
8634
9055
  #
8635
- # **Cross-account use**\: No. You cannot use this operation in a
9056
+ # **Cross-account use**: No. You cannot use this operation in a
8636
9057
  # different Amazon Web Services account.
8637
9058
  #
8638
- # **Required permissions**\:
9059
+ # **Required permissions**:
8639
9060
  #
8640
9061
  # * `kms:UpdatePrimaryRegion` on the current primary key (in the primary
8641
9062
  # key's Region). Include this permission primary key's key policy.
@@ -8735,9 +9156,12 @@ module Aws::KMS
8735
9156
  # keys, see [Asymmetric KMS keys][1] in the *Key Management Service
8736
9157
  # Developer Guide*.
8737
9158
  #
8738
- # To verify a digital signature, you can use the `Verify` operation.
8739
- # Specify the same asymmetric KMS key, message, and signing algorithm
8740
- # that were used to produce the signature.
9159
+ # To use the `Verify` operation, specify the same asymmetric KMS key,
9160
+ # message, and signing algorithm that were used to produce the
9161
+ # signature. The message type does not need to be the same as the one
9162
+ # used for signing, but it must indicate whether the value of the
9163
+ # `Message` parameter should be hashed as part of the verification
9164
+ # process.
8741
9165
  #
8742
9166
  # You can also verify the digital signature by using the public key of
8743
9167
  # the KMS key outside of KMS. Use the GetPublicKey operation to download
@@ -8758,13 +9182,13 @@ module Aws::KMS
8758
9182
  # key state. For details, see [Key states of KMS keys][3] in the *Key
8759
9183
  # Management Service Developer Guide*.
8760
9184
  #
8761
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
9185
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
8762
9186
  # in a different Amazon Web Services account, specify the key ARN or
8763
9187
  # alias ARN in the value of the `KeyId` parameter.
8764
9188
  #
8765
- # **Required permissions**\: [kms:Verify][4] (key policy)
9189
+ # **Required permissions**: [kms:Verify][4] (key policy)
8766
9190
  #
8767
- # **Related operations**\: Sign
9191
+ # **Related operations**: Sign
8768
9192
  #
8769
9193
  #
8770
9194
  #
@@ -8808,13 +9232,46 @@ module Aws::KMS
8808
9232
  # digest are considered to be the same message.
8809
9233
  #
8810
9234
  # @option params [String] :message_type
8811
- # Tells KMS whether the value of the `Message` parameter is a message or
8812
- # message digest. The default value, RAW, indicates a message. To
8813
- # indicate a message digest, enter `DIGEST`.
9235
+ # Tells KMS whether the value of the `Message` parameter should be
9236
+ # hashed as part of the signing algorithm. Use `RAW` for unhashed
9237
+ # messages; use `DIGEST` for message digests, which are already hashed.
9238
+ #
9239
+ # When the value of `MessageType` is `RAW`, KMS uses the standard
9240
+ # signing algorithm, which begins with a hash function. When the value
9241
+ # is `DIGEST`, KMS skips the hashing step in the signing algorithm.
8814
9242
  #
8815
9243
  # Use the `DIGEST` value only when the value of the `Message` parameter
8816
- # is a message digest. If you use the `DIGEST` value with a raw message,
8817
- # the security of the verification operation can be compromised.
9244
+ # is a message digest. If you use the `DIGEST` value with an unhashed
9245
+ # message, the security of the verification operation can be
9246
+ # compromised.
9247
+ #
9248
+ # When the value of `MessageType`is `DIGEST`, the length of the
9249
+ # `Message` value must match the length of hashed messages for the
9250
+ # specified signing algorithm.
9251
+ #
9252
+ # You can submit a message digest and omit the `MessageType` or specify
9253
+ # `RAW` so the digest is hashed again while signing. However, if the
9254
+ # signed message is hashed once while signing, but twice while
9255
+ # verifying, verification fails, even when the message hasn't changed.
9256
+ #
9257
+ # The hashing algorithm in that `Verify` uses is based on the
9258
+ # `SigningAlgorithm` value.
9259
+ #
9260
+ # * Signing algorithms that end in SHA\_256 use the SHA\_256 hashing
9261
+ # algorithm.
9262
+ #
9263
+ # * Signing algorithms that end in SHA\_384 use the SHA\_384 hashing
9264
+ # algorithm.
9265
+ #
9266
+ # * Signing algorithms that end in SHA\_512 use the SHA\_512 hashing
9267
+ # algorithm.
9268
+ #
9269
+ # * SM2DSA uses the SM3 hashing algorithm. For details, see [Offline
9270
+ # verification with SM2 key pairs][1].
9271
+ #
9272
+ #
9273
+ #
9274
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
8818
9275
  #
8819
9276
  # @option params [required, String, StringIO, File] :signature
8820
9277
  # The signature that the `Sign` operation generated.
@@ -8863,6 +9320,27 @@ module Aws::KMS
8863
9320
  # signing_algorithm: "ECDSA_SHA_384", # The signing algorithm that was used to verify the signature.
8864
9321
  # }
8865
9322
  #
9323
+ # @example Example: To use an asymmetric KMS key to verify a digital signature on a message digest
9324
+ #
9325
+ # # This operation uses the public key in an RSA asymmetric signing key pair to verify the digital signature of a message
9326
+ # # digest. Hashing a message into a digest before sending it to KMS lets you verify messages that exceed the 4096-byte
9327
+ # # message size limit. To indicate that the value of Message is a digest, use the MessageType parameter
9328
+ #
9329
+ # resp = client.verify({
9330
+ # key_id: "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321", # The asymmetric KMS key to be used to verify the digital signature. This example uses an alias to identify the KMS key.
9331
+ # message: "<message digest to be verified>", # The message that was signed.
9332
+ # message_type: "DIGEST", # Indicates whether the message is RAW or a DIGEST. When it is RAW, KMS hashes the message before signing. When it is DIGEST, KMS skips the hashing step and signs the Message value.
9333
+ # signature: "<binary data>", # The signature to be verified.
9334
+ # signing_algorithm: "RSASSA_PSS_SHA_512", # The signing algorithm to be used to verify the signature.
9335
+ # })
9336
+ #
9337
+ # resp.to_h outputs the following:
9338
+ # {
9339
+ # key_id: "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321", # The key ARN of the asymmetric KMS key that was used to verify the digital signature.
9340
+ # signature_valid: true, # A value of 'true' Indicates that the signature was verified. If verification fails, the call to Verify fails.
9341
+ # signing_algorithm: "RSASSA_PSS_SHA_512", # The signing algorithm that was used to verify the signature.
9342
+ # }
9343
+ #
8866
9344
  # @example Request syntax with placeholder values
8867
9345
  #
8868
9346
  # resp = client.verify({
@@ -8909,13 +9387,13 @@ module Aws::KMS
8909
9387
  # key state. For details, see [Key states of KMS keys][3] in the *Key
8910
9388
  # Management Service Developer Guide*.
8911
9389
  #
8912
- # **Cross-account use**\: Yes. To perform this operation with a KMS key
9390
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
8913
9391
  # in a different Amazon Web Services account, specify the key ARN or
8914
9392
  # alias ARN in the value of the `KeyId` parameter.
8915
9393
  #
8916
- # **Required permissions**\: [kms:VerifyMac][4] (key policy)
9394
+ # **Required permissions**: [kms:VerifyMac][4] (key policy)
8917
9395
  #
8918
- # **Related operations**\: GenerateMac
9396
+ # **Related operations**: GenerateMac
8919
9397
  #
8920
9398
  #
8921
9399
  #
@@ -9026,7 +9504,7 @@ module Aws::KMS
9026
9504
  params: params,
9027
9505
  config: config)
9028
9506
  context[:gem_name] = 'aws-sdk-kms'
9029
- context[:gem_version] = '1.62.0'
9507
+ context[:gem_version] = '1.64.0'
9030
9508
  Seahorse::Client::Request.new(handlers, context)
9031
9509
  end
9032
9510