aws-sdk-kms 1.123.0 → 1.124.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81e60e410223f2b2cbb99309fbad50439886f9e7db3e7f1f7cbe1f76725742f6
4
- data.tar.gz: c6a2b9ed15729a65d456aba409399830d4d86bb5a7b2767441829b7c09e56cbf
3
+ metadata.gz: d8ae88408d0f29e3d59ef7764a134e301ca0c7f48c530c10abbca84debfc4ea5
4
+ data.tar.gz: 2eab4b5e20787e47b6032882a862dbd986ead218b68ba01b25ebe1b8d2a5084d
5
5
  SHA512:
6
- metadata.gz: 92ccf453c5e58f7d7284ab5b358ef9aa55587ee3b0fbbc63d7d86cffef4ef6daad83b9d9442a60d3fc024684e2cf50327e615b137ceb073d37524bc5ee6a57c0
7
- data.tar.gz: a84b166adb6ced12a7695b79938361c2774dbd18b14c3c23b52972fc1de0a7c9eddc902845310281f7dec8068c9e66ae6b4daa60caed5924cd34b75e19de6c5b
6
+ metadata.gz: 6beb9fd959cdd8ecbf3c8728ba6fdbc845b419a51d59bdf714bffe26ebee99b3fc3082de29ab85e0aa4a5c21ad7c22120520205f9fee6355c8f37b070e962977
7
+ data.tar.gz: 3eaddf3b69a40da8a41cbff482806bc8d87531de90ab6abb07be1268bde8e91f8211d4d842007b5f376348d9c5c1553d08187e1ceaee2c2f98640049bce0c782
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.124.0 (2026-04-27)
5
+ ------------------
6
+
7
+ * Feature - KMS GetKeyLastUsage API provides information on the last successful cryptographic operation performed on KMS keys. This new API provides KMS customers with the last timestamp, CloudTrail eventId, and the cryptographic operation that was performed on the key.
8
+
4
9
  1.123.0 (2026-03-18)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.123.0
1
+ 1.124.0
@@ -2560,11 +2560,13 @@ module Aws::KMS
2560
2560
  # key state. For details, see [Key states of KMS keys][8] in the *Key
2561
2561
  # Management Service Developer Guide*.
2562
2562
  #
2563
- # **Cross-account use**: Yes. If you use the `KeyId` parameter to
2564
- # identify a KMS key in a different Amazon Web Services account, specify
2565
- # the key ARN or the alias ARN of the KMS key.
2563
+ # **Cross-account use**: Yes. To specify a KMS key in a different Amazon
2564
+ # Web Services account, use the [key ARN][9] or [alias ARN][10]. A short
2565
+ # [key ID][11] is also acceptable when decrypting symmetric ciphertexts,
2566
+ # though using a full key ARN is recommended to be more explicit about
2567
+ # the intended KMS key.
2566
2568
  #
2567
- # **Required permissions**: [kms:Decrypt][9] (key policy)
2569
+ # **Required permissions**: [kms:Decrypt][12] (key policy)
2568
2570
  #
2569
2571
  # **Related operations:**
2570
2572
  #
@@ -2577,7 +2579,7 @@ module Aws::KMS
2577
2579
  # * ReEncrypt
2578
2580
  #
2579
2581
  # **Eventual consistency**: The KMS API follows an eventual consistency
2580
- # model. For more information, see [KMS eventual consistency][10].
2582
+ # model. For more information, see [KMS eventual consistency][13].
2581
2583
  #
2582
2584
  #
2583
2585
  #
@@ -2589,8 +2591,11 @@ module Aws::KMS
2589
2591
  # [6]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
2590
2592
  # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/cryptographic-attestation.html
2591
2593
  # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2592
- # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2593
- # [10]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
2594
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
2595
+ # [10]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-alias-ARN
2596
+ # [11]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id
2597
+ # [12]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2598
+ # [13]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
2594
2599
  #
2595
2600
  # @option params [String, StringIO, File] :ciphertext_blob
2596
2601
  # Ciphertext to be decrypted. The blob includes metadata.
@@ -2651,7 +2656,7 @@ module Aws::KMS
2651
2656
  #
2652
2657
  # To specify a KMS key, use its key ID, key ARN, alias name, or alias
2653
2658
  # ARN. When using an alias name, prefix it with `"alias/"`. To specify a
2654
- # KMS key in a different Amazon Web Services account, you must use the
2659
+ # KMS key in a different Amazon Web Services account, you should use the
2655
2660
  # key ARN or alias ARN.
2656
2661
  #
2657
2662
  # For example:
@@ -6152,6 +6157,143 @@ module Aws::KMS
6152
6157
  req.send_request(options)
6153
6158
  end
6154
6159
 
6160
+ # Returns usage information about the last successful cryptographic
6161
+ # operation performed with a specified KMS key, including the operation
6162
+ # type, timestamp, and associated CloudTrail event ID.
6163
+ #
6164
+ # The `TrackingStartDate` in the `GetKeyLastUsage` response indicates
6165
+ # the date from which KMS began recording cryptographic activity for a
6166
+ # given key. Use this value together with `KeyCreationDate` to
6167
+ # understand the key's usage history:
6168
+ #
6169
+ # * If the `KeyLastUsage` response element is *present*, the key has
6170
+ # been used for a successful cryptographic operation since the
6171
+ # `TrackingStartDate`. The response includes the operation type,
6172
+ # timestamp, and associated CloudTrail event ID.
6173
+ #
6174
+ # * If the `KeyLastUsage` response element is *empty* and
6175
+ # `KeyCreationDate` is on or after `TrackingStartDate`, the key has
6176
+ # not been used for a successful cryptographic operation since it was
6177
+ # created.
6178
+ #
6179
+ # * If the `KeyLastUsage` response element is *empty* and
6180
+ # `KeyCreationDate` is before `TrackingStartDate`, there is no record
6181
+ # of the key being used for a successful cryptographic operation since
6182
+ # the `TrackingStartDate`. However, the key may have been used before
6183
+ # tracking began. To determine whether the key was used before the
6184
+ # `TrackingStartDate`, examine your past CloudTrail logs.
6185
+ #
6186
+ # For multi-Region KMS keys, primary and replica keys track last usage
6187
+ # independently. Each key in a multi-Region key set maintains its own
6188
+ # usage information.
6189
+ #
6190
+ # The `ReEncrypt` operation uses two keys: a source key for decryption
6191
+ # and a destination key for encryption. Usage information is recorded
6192
+ # for both keys independently, each with the CloudTrail event ID from
6193
+ # the respective key owner's account.
6194
+ #
6195
+ # <note markdown="1"> Do not use `GetKeyLastUsage` as the sole indicator when scheduling a
6196
+ # key for deletion. Instead, first [disable the key][1] and monitor
6197
+ # CloudTrail for `DisabledException` entries, as there could be
6198
+ # infrequent workflows that are dependent on the key. By looking for
6199
+ # this exception, you can identify potential dependencies and workload
6200
+ # failures before they occur.
6201
+ #
6202
+ # </note>
6203
+ #
6204
+ # **Cross-account use**: No. You cannot perform this operation on a KMS
6205
+ # key in a different Amazon Web Services account.
6206
+ #
6207
+ # **Required permissions**: [kms:GetKeyLastUsage][2] (key policy)
6208
+ #
6209
+ # **Related operations:**
6210
+ #
6211
+ # * DescribeKey
6212
+ #
6213
+ # * DisableKey
6214
+ #
6215
+ # * ScheduleKeyDeletion
6216
+ #
6217
+ # **Eventual consistency**: The KMS API follows an eventual consistency
6218
+ # model. For more information, see [KMS eventual consistency][3].
6219
+ #
6220
+ #
6221
+ #
6222
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/enabling-keys.html
6223
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
6224
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
6225
+ #
6226
+ # @option params [required, String] :key_id
6227
+ # Identifies the KMS key to get usage information for. To specify a KMS
6228
+ # key, use its key ID or key ARN. Alias names are not supported.
6229
+ #
6230
+ # Specify the key ID or key ARN of the KMS key.
6231
+ #
6232
+ # For example:
6233
+ #
6234
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
6235
+ #
6236
+ # * Key ARN:
6237
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
6238
+ #
6239
+ # To get the key ID and key ARN for a KMS key, use ListKeys or
6240
+ # DescribeKey.
6241
+ #
6242
+ # @return [Types::GetKeyLastUsageResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
6243
+ #
6244
+ # * {Types::GetKeyLastUsageResponse#key_id #key_id} => String
6245
+ # * {Types::GetKeyLastUsageResponse#key_last_usage #key_last_usage} => Types::KeyLastUsageData
6246
+ # * {Types::GetKeyLastUsageResponse#tracking_start_date #tracking_start_date} => Time
6247
+ # * {Types::GetKeyLastUsageResponse#key_creation_date #key_creation_date} => Time
6248
+ #
6249
+ #
6250
+ # @example Example: To retrieve the last usage for a KMS key
6251
+ #
6252
+ # # The following example retrieves usage information about the last successful cryptographic operation performed with the
6253
+ # # specified KMS key, including the operation type, timestamp, and associated AWS CloudTrail event ID.
6254
+ #
6255
+ # resp = client.get_key_last_usage({
6256
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key to get usage information for. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key. Alias names are not supported.
6257
+ # })
6258
+ #
6259
+ # resp.to_h outputs the following:
6260
+ # {
6261
+ # key_creation_date: Time.parse(1773253425.56), # The date and time when the KMS key was created.
6262
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The globally unique identifier for the KMS key.
6263
+ # key_last_usage: {
6264
+ # cloud_trail_event_id: "2cfd5892-ea8c-4342-ad49-4b9594b06a8b",
6265
+ # kms_request_id: "040cce3e-9ef3-4651-b8cf-e47c9bafdc9b",
6266
+ # operation: "Encrypt",
6267
+ # timestamp: Time.parse(1773253497.0),
6268
+ # }, # Contains usage information about the last time the KMS key was used for a successful cryptographic operation.
6269
+ # tracking_start_date: Time.parse(1773253425.56), # The date from which AWS KMS began recording cryptographic activity for this key, or the date the KMS key was created, whichever is later.
6270
+ # }
6271
+ #
6272
+ # @example Request syntax with placeholder values
6273
+ #
6274
+ # resp = client.get_key_last_usage({
6275
+ # key_id: "KeyIdType", # required
6276
+ # })
6277
+ #
6278
+ # @example Response structure
6279
+ #
6280
+ # resp.key_id #=> String
6281
+ # resp.key_last_usage.operation #=> String, one of "Decrypt", "DeriveSharedSecret", "Encrypt", "GenerateDataKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateDataKeyWithoutPlaintext", "GenerateMac", "ReEncrypt", "Sign", "Verify", "VerifyMac"
6282
+ # resp.key_last_usage.timestamp #=> Time
6283
+ # resp.key_last_usage.cloud_trail_event_id #=> String
6284
+ # resp.key_last_usage.kms_request_id #=> String
6285
+ # resp.tracking_start_date #=> Time
6286
+ # resp.key_creation_date #=> Time
6287
+ #
6288
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyLastUsage AWS API Documentation
6289
+ #
6290
+ # @overload get_key_last_usage(params = {})
6291
+ # @param [Hash] params ({})
6292
+ def get_key_last_usage(params = {}, options = {})
6293
+ req = build_request(:get_key_last_usage, params)
6294
+ req.send_request(options)
6295
+ end
6296
+
6155
6297
  # Gets a key policy attached to the specified KMS key.
6156
6298
  #
6157
6299
  # **Cross-account use**: No. You cannot perform this operation on a KMS
@@ -8379,21 +8521,25 @@ module Aws::KMS
8379
8521
  # **Cross-account use**: Yes. The source KMS key and destination KMS key
8380
8522
  # can be in different Amazon Web Services accounts. Either or both KMS
8381
8523
  # keys can be in a different account than the caller. To specify a KMS
8382
- # key in a different account, you must use its key ARN or alias ARN.
8524
+ # key in a different account, use the [key ARN][7] or [alias ARN][8]. A
8525
+ # short [key ID][9] is also acceptable for the source key when
8526
+ # decrypting symmetric ciphertexts, though using a full key ARN is
8527
+ # recommended to be more explicit about the intended KMS key.
8383
8528
  #
8384
8529
  # **Required permissions**:
8385
8530
  #
8386
- # * [kms:ReEncryptFrom][7] permission on the source KMS key (key policy)
8531
+ # * [kms:ReEncryptFrom][10] permission on the source KMS key (key
8532
+ # policy)
8387
8533
  #
8388
- # * [kms:ReEncryptTo][7] permission on the destination KMS key (key
8534
+ # * [kms:ReEncryptTo][10] permission on the destination KMS key (key
8389
8535
  # policy)
8390
8536
  #
8391
8537
  # To permit reencryption from or to a KMS key, include the
8392
- # `"kms:ReEncrypt*"` permission in your [key policy][8]. This permission
8393
- # is automatically included in the key policy when you use the console
8394
- # to create a KMS key. But you must include it manually when you create
8395
- # a KMS key programmatically or when you use the PutKeyPolicy operation
8396
- # to set a key policy.
8538
+ # `"kms:ReEncrypt*"` permission in your [key policy][11]. This
8539
+ # permission is automatically included in the key policy when you use
8540
+ # the console to create a KMS key. But you must include it manually when
8541
+ # you create a KMS key programmatically or when you use the PutKeyPolicy
8542
+ # operation to set a key policy.
8397
8543
  #
8398
8544
  # **Related operations:**
8399
8545
  #
@@ -8406,7 +8552,7 @@ module Aws::KMS
8406
8552
  # * GenerateDataKeyPair
8407
8553
  #
8408
8554
  # **Eventual consistency**: The KMS API follows an eventual consistency
8409
- # model. For more information, see [KMS eventual consistency][9].
8555
+ # model. For more information, see [KMS eventual consistency][12].
8410
8556
  #
8411
8557
  #
8412
8558
  #
@@ -8416,9 +8562,12 @@ module Aws::KMS
8416
8562
  # [4]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
8417
8563
  # [5]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
8418
8564
  # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
8419
- # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
8420
- # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
8421
- # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
8565
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
8566
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-alias-ARN
8567
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id
8568
+ # [10]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
8569
+ # [11]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
8570
+ # [12]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
8422
8571
  #
8423
8572
  # @option params [String, StringIO, File] :ciphertext_blob
8424
8573
  # Ciphertext of the data to reencrypt.
@@ -8464,7 +8613,7 @@ module Aws::KMS
8464
8613
  #
8465
8614
  # To specify a KMS key, use its key ID, key ARN, alias name, or alias
8466
8615
  # ARN. When using an alias name, prefix it with `"alias/"`. To specify a
8467
- # KMS key in a different Amazon Web Services account, you must use the
8616
+ # KMS key in a different Amazon Web Services account, you should use the
8468
8617
  # key ARN or alias ARN.
8469
8618
  #
8470
8619
  # For example:
@@ -9699,6 +9848,11 @@ module Aws::KMS
9699
9848
  # * ED25519\_PH\_SHA\_512 signing algorithm requires KMS
9700
9849
  # `MessageType:DIGEST`
9701
9850
  #
9851
+ # When you specify the ED25519\_PH\_SHA\_512 signing algorithm with
9852
+ # `MessageType:DIGEST`, KMS still performs the SHA-512 prehash described
9853
+ # in [Step 1 of Section 7.8.1 in FIPS 186-5][1]. This means the input is
9854
+ # hashed twice: once by you and once by KMS.
9855
+ #
9702
9856
  # When the value of `MessageType` is `DIGEST`, the length of the
9703
9857
  # `Message` value must match the length of hashed messages for the
9704
9858
  # specified signing algorithm.
@@ -9727,11 +9881,12 @@ module Aws::KMS
9727
9881
  # algorithm.
9728
9882
  #
9729
9883
  # * SM2DSA uses the SM3 hashing algorithm. For details, see [Offline
9730
- # verification with SM2 key pairs][1].
9884
+ # verification with SM2 key pairs][2].
9731
9885
  #
9732
9886
  #
9733
9887
  #
9734
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
9888
+ # [1]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf#page=39
9889
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
9735
9890
  #
9736
9891
  # @option params [Array<String>] :grant_tokens
9737
9892
  # A list of grant tokens.
@@ -10239,8 +10394,10 @@ module Aws::KMS
10239
10394
  # about a change to the `kmsuser` crypto user password
10240
10395
  # (`KeyStorePassword`), or to associate the custom key store with a
10241
10396
  # different, but related, CloudHSM cluster (`CloudHsmClusterId`). To
10242
- # update any property of an CloudHSM key store, the `ConnectionState` of
10243
- # the CloudHSM key store must be `DISCONNECTED`.
10397
+ # update most properties of an CloudHSM key store, the `ConnectionState`
10398
+ # of the CloudHSM key store must be `DISCONNECTED`. However, you can
10399
+ # update the `CustomKeyStoreName` of an AWS CloudHSM key store when it
10400
+ # is in the `CONNECTED` or `DISCONNECTED` state.
10244
10401
  #
10245
10402
  # For an external key store, you can use this operation to change the
10246
10403
  # custom key store friendly name (`NewCustomKeyStoreName`), or to tell
@@ -10313,8 +10470,8 @@ module Aws::KMS
10313
10470
  # This field may be displayed in plaintext in CloudTrail logs and other
10314
10471
  # output.
10315
10472
  #
10316
- # To change this value, an CloudHSM key store must be disconnected. An
10317
- # external key store can be connected or disconnected.
10473
+ # To change this value, the custom key store can be connected or
10474
+ # disconnected.
10318
10475
  #
10319
10476
  # @option params [String] :key_store_password
10320
10477
  # Enter the current password of the `kmsuser` crypto user (CU) in the
@@ -10902,6 +11059,11 @@ module Aws::KMS
10902
11059
  # * ED25519\_PH\_SHA\_512 signing algorithm requires KMS
10903
11060
  # `MessageType:DIGEST`
10904
11061
  #
11062
+ # When you specify the ED25519\_PH\_SHA\_512 signing algorithm with
11063
+ # `MessageType:DIGEST`, KMS still performs the SHA-512 prehash described
11064
+ # in [Step 1 of Section 7.8.1 in FIPS 186-5][1]. This means the input is
11065
+ # hashed twice: once by you and once by KMS.
11066
+ #
10905
11067
  # When the value of `MessageType` is `DIGEST`, the length of the
10906
11068
  # `Message` value must match the length of hashed messages for the
10907
11069
  # specified signing algorithm.
@@ -10930,11 +11092,12 @@ module Aws::KMS
10930
11092
  # algorithm.
10931
11093
  #
10932
11094
  # * SM2DSA uses the SM3 hashing algorithm. For details, see [Offline
10933
- # verification with SM2 key pairs][1].
11095
+ # verification with SM2 key pairs][2].
10934
11096
  #
10935
11097
  #
10936
11098
  #
10937
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
11099
+ # [1]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf#page=39
11100
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
10938
11101
  #
10939
11102
  # @option params [required, String, StringIO, File] :signature
10940
11103
  # The signature that the `Sign` operation generated.
@@ -11200,7 +11363,7 @@ module Aws::KMS
11200
11363
  tracer: tracer
11201
11364
  )
11202
11365
  context[:gem_name] = 'aws-sdk-kms'
11203
- context[:gem_version] = '1.123.0'
11366
+ context[:gem_version] = '1.124.0'
11204
11367
  Seahorse::Client::Request.new(handlers, context)
11205
11368
  end
11206
11369
 
@@ -35,6 +35,7 @@ module Aws::KMS
35
35
  CloudHsmClusterNotActiveException = Shapes::StructureShape.new(name: 'CloudHsmClusterNotActiveException')
36
36
  CloudHsmClusterNotFoundException = Shapes::StructureShape.new(name: 'CloudHsmClusterNotFoundException')
37
37
  CloudHsmClusterNotRelatedException = Shapes::StructureShape.new(name: 'CloudHsmClusterNotRelatedException')
38
+ CloudTrailEventIdType = Shapes::StringShape.new(name: 'CloudTrailEventIdType')
38
39
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
39
40
  ConnectCustomKeyStoreRequest = Shapes::StructureShape.new(name: 'ConnectCustomKeyStoreRequest')
40
41
  ConnectCustomKeyStoreResponse = Shapes::StructureShape.new(name: 'ConnectCustomKeyStoreResponse')
@@ -107,6 +108,8 @@ module Aws::KMS
107
108
  GenerateMacResponse = Shapes::StructureShape.new(name: 'GenerateMacResponse')
108
109
  GenerateRandomRequest = Shapes::StructureShape.new(name: 'GenerateRandomRequest')
109
110
  GenerateRandomResponse = Shapes::StructureShape.new(name: 'GenerateRandomResponse')
111
+ GetKeyLastUsageRequest = Shapes::StructureShape.new(name: 'GetKeyLastUsageRequest')
112
+ GetKeyLastUsageResponse = Shapes::StructureShape.new(name: 'GetKeyLastUsageResponse')
110
113
  GetKeyPolicyRequest = Shapes::StructureShape.new(name: 'GetKeyPolicyRequest')
111
114
  GetKeyPolicyResponse = Shapes::StructureShape.new(name: 'GetKeyPolicyResponse')
112
115
  GetKeyRotationStatusRequest = Shapes::StructureShape.new(name: 'GetKeyRotationStatusRequest')
@@ -148,6 +151,8 @@ module Aws::KMS
148
151
  KeyAgreementAlgorithmSpecList = Shapes::ListShape.new(name: 'KeyAgreementAlgorithmSpecList')
149
152
  KeyEncryptionMechanism = Shapes::StringShape.new(name: 'KeyEncryptionMechanism')
150
153
  KeyIdType = Shapes::StringShape.new(name: 'KeyIdType')
154
+ KeyLastUsageData = Shapes::StructureShape.new(name: 'KeyLastUsageData')
155
+ KeyLastUsageTrackingOperation = Shapes::StringShape.new(name: 'KeyLastUsageTrackingOperation')
151
156
  KeyList = Shapes::ListShape.new(name: 'KeyList')
152
157
  KeyListEntry = Shapes::StructureShape.new(name: 'KeyListEntry')
153
158
  KeyManagerType = Shapes::StringShape.new(name: 'KeyManagerType')
@@ -159,6 +164,7 @@ module Aws::KMS
159
164
  KeyStorePasswordType = Shapes::StringShape.new(name: 'KeyStorePasswordType')
160
165
  KeyUnavailableException = Shapes::StructureShape.new(name: 'KeyUnavailableException')
161
166
  KeyUsageType = Shapes::StringShape.new(name: 'KeyUsageType')
167
+ KmsRequestIdType = Shapes::StringShape.new(name: 'KmsRequestIdType')
162
168
  LimitExceededException = Shapes::StructureShape.new(name: 'LimitExceededException')
163
169
  LimitType = Shapes::IntegerShape.new(name: 'LimitType')
164
170
  ListAliasesRequest = Shapes::StructureShape.new(name: 'ListAliasesRequest')
@@ -571,6 +577,15 @@ module Aws::KMS
571
577
  GenerateRandomResponse.add_member(:ciphertext_for_recipient, Shapes::ShapeRef.new(shape: CiphertextType, location_name: "CiphertextForRecipient"))
572
578
  GenerateRandomResponse.struct_class = Types::GenerateRandomResponse
573
579
 
580
+ GetKeyLastUsageRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
581
+ GetKeyLastUsageRequest.struct_class = Types::GetKeyLastUsageRequest
582
+
583
+ GetKeyLastUsageResponse.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
584
+ GetKeyLastUsageResponse.add_member(:key_last_usage, Shapes::ShapeRef.new(shape: KeyLastUsageData, location_name: "KeyLastUsage"))
585
+ GetKeyLastUsageResponse.add_member(:tracking_start_date, Shapes::ShapeRef.new(shape: DateType, location_name: "TrackingStartDate"))
586
+ GetKeyLastUsageResponse.add_member(:key_creation_date, Shapes::ShapeRef.new(shape: DateType, location_name: "KeyCreationDate"))
587
+ GetKeyLastUsageResponse.struct_class = Types::GetKeyLastUsageResponse
588
+
574
589
  GetKeyPolicyRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
575
590
  GetKeyPolicyRequest.add_member(:policy_name, Shapes::ShapeRef.new(shape: PolicyNameType, location_name: "PolicyName"))
576
591
  GetKeyPolicyRequest.struct_class = Types::GetKeyPolicyRequest
@@ -696,6 +711,12 @@ module Aws::KMS
696
711
 
697
712
  KeyAgreementAlgorithmSpecList.member = Shapes::ShapeRef.new(shape: KeyAgreementAlgorithmSpec)
698
713
 
714
+ KeyLastUsageData.add_member(:operation, Shapes::ShapeRef.new(shape: KeyLastUsageTrackingOperation, location_name: "Operation"))
715
+ KeyLastUsageData.add_member(:timestamp, Shapes::ShapeRef.new(shape: DateType, location_name: "Timestamp"))
716
+ KeyLastUsageData.add_member(:cloud_trail_event_id, Shapes::ShapeRef.new(shape: CloudTrailEventIdType, location_name: "CloudTrailEventId"))
717
+ KeyLastUsageData.add_member(:kms_request_id, Shapes::ShapeRef.new(shape: KmsRequestIdType, location_name: "KmsRequestId"))
718
+ KeyLastUsageData.struct_class = Types::KeyLastUsageData
719
+
699
720
  KeyList.member = Shapes::ShapeRef.new(shape: KeyListEntry)
700
721
 
701
722
  KeyListEntry.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
@@ -1462,6 +1483,18 @@ module Aws::KMS
1462
1483
  o.errors << Shapes::ShapeRef.new(shape: CustomKeyStoreInvalidStateException)
1463
1484
  end)
1464
1485
 
1486
+ api.add_operation(:get_key_last_usage, Seahorse::Model::Operation.new.tap do |o|
1487
+ o.name = "GetKeyLastUsage"
1488
+ o.http_method = "POST"
1489
+ o.http_request_uri = "/"
1490
+ o.input = Shapes::ShapeRef.new(shape: GetKeyLastUsageRequest)
1491
+ o.output = Shapes::ShapeRef.new(shape: GetKeyLastUsageResponse)
1492
+ o.errors << Shapes::ShapeRef.new(shape: NotFoundException)
1493
+ o.errors << Shapes::ShapeRef.new(shape: InvalidArnException)
1494
+ o.errors << Shapes::ShapeRef.new(shape: DependencyTimeoutException)
1495
+ o.errors << Shapes::ShapeRef.new(shape: KMSInternalException)
1496
+ end)
1497
+
1465
1498
  api.add_operation(:get_key_policy, Seahorse::Model::Operation.new.tap do |o|
1466
1499
  o.name = "GetKeyPolicy"
1467
1500
  o.http_method = "POST"
@@ -1245,9 +1245,11 @@ module Aws::KMS
1245
1245
  # This operation is valid for all other `ConnectionState` values.
1246
1246
  #
1247
1247
  # * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore
1248
- # operation on a custom key store that is not disconnected. This
1249
- # operation is valid only when the custom key store `ConnectionState`
1250
- # is `DISCONNECTED`.
1248
+ # operation on a custom key store that is not disconnected.
1249
+ # `UpdateCustomKeyStore` can be called on a custom key store in the
1250
+ # `CONNECTED` state only to update `NewCustomKeyStoreName`. For all
1251
+ # other properties, the custom key store `ConnectionState` must be
1252
+ # `DISCONNECTED`.
1251
1253
  #
1252
1254
  # * You requested the GenerateRandom operation in an CloudHSM key store
1253
1255
  # that is not connected. This operation is valid only when the
@@ -1619,7 +1621,7 @@ module Aws::KMS
1619
1621
  #
1620
1622
  # To specify a KMS key, use its key ID, key ARN, alias name, or alias
1621
1623
  # ARN. When using an alias name, prefix it with `"alias/"`. To specify
1622
- # a KMS key in a different Amazon Web Services account, you must use
1624
+ # a KMS key in a different Amazon Web Services account, you should use
1623
1625
  # the key ARN or alias ARN.
1624
1626
  #
1625
1627
  # For example:
@@ -3425,6 +3427,61 @@ module Aws::KMS
3425
3427
  include Aws::Structure
3426
3428
  end
3427
3429
 
3430
+ # @!attribute [rw] key_id
3431
+ # Identifies the KMS key to get usage information for. To specify a
3432
+ # KMS key, use its key ID or key ARN. Alias names are not supported.
3433
+ #
3434
+ # Specify the key ID or key ARN of the KMS key.
3435
+ #
3436
+ # For example:
3437
+ #
3438
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
3439
+ #
3440
+ # * Key ARN:
3441
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
3442
+ #
3443
+ # To get the key ID and key ARN for a KMS key, use ListKeys or
3444
+ # DescribeKey.
3445
+ # @return [String]
3446
+ #
3447
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyLastUsageRequest AWS API Documentation
3448
+ #
3449
+ class GetKeyLastUsageRequest < Struct.new(
3450
+ :key_id)
3451
+ SENSITIVE = []
3452
+ include Aws::Structure
3453
+ end
3454
+
3455
+ # @!attribute [rw] key_id
3456
+ # The globally unique identifier for the KMS key.
3457
+ # @return [String]
3458
+ #
3459
+ # @!attribute [rw] key_last_usage
3460
+ # Contains usage information about the last time the KMS key was used
3461
+ # for a successful cryptographic operation. If the key has not been
3462
+ # used since tracking began, this response element is empty.
3463
+ # @return [Types::KeyLastUsageData]
3464
+ #
3465
+ # @!attribute [rw] tracking_start_date
3466
+ # The date from which KMS began recording cryptographic activity for
3467
+ # this key, or the date the KMS key was created, whichever is later.
3468
+ # @return [Time]
3469
+ #
3470
+ # @!attribute [rw] key_creation_date
3471
+ # The date and time when the KMS key was created.
3472
+ # @return [Time]
3473
+ #
3474
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyLastUsageResponse AWS API Documentation
3475
+ #
3476
+ class GetKeyLastUsageResponse < Struct.new(
3477
+ :key_id,
3478
+ :key_last_usage,
3479
+ :tracking_start_date,
3480
+ :key_creation_date)
3481
+ SENSITIVE = []
3482
+ include Aws::Structure
3483
+ end
3484
+
3428
3485
  # @!attribute [rw] key_id
3429
3486
  # Gets the key policy for the specified KMS key.
3430
3487
  #
@@ -4356,6 +4413,43 @@ module Aws::KMS
4356
4413
  include Aws::Structure
4357
4414
  end
4358
4415
 
4416
+ # Contains usage information about the last time the KMS key was used
4417
+ # for a successful cryptographic operation.
4418
+ #
4419
+ # @!attribute [rw] operation
4420
+ # The last successful cryptographic operation the KMS key was used
4421
+ # for. Absent if the key has not been used since KMS began tracking.
4422
+ # @return [String]
4423
+ #
4424
+ # @!attribute [rw] timestamp
4425
+ # The date and time when the KMS key was most recently used for a
4426
+ # successful cryptographic operation. Absent if the key has not been
4427
+ # used since KMS began tracking.
4428
+ # @return [Time]
4429
+ #
4430
+ # @!attribute [rw] cloud_trail_event_id
4431
+ # The CloudTrail `eventId` associated with the last successful
4432
+ # cryptographic operation. Absent if the key has not been used since
4433
+ # KMS began tracking.
4434
+ # @return [String]
4435
+ #
4436
+ # @!attribute [rw] kms_request_id
4437
+ # The KMS request ID associated with the last successful cryptographic
4438
+ # operation. Absent if the key has not been used since KMS began
4439
+ # tracking.
4440
+ # @return [String]
4441
+ #
4442
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/KeyLastUsageData AWS API Documentation
4443
+ #
4444
+ class KeyLastUsageData < Struct.new(
4445
+ :operation,
4446
+ :timestamp,
4447
+ :cloud_trail_event_id,
4448
+ :kms_request_id)
4449
+ SENSITIVE = []
4450
+ include Aws::Structure
4451
+ end
4452
+
4359
4453
  # Contains information about each entry in the key list.
4360
4454
  #
4361
4455
  # @!attribute [rw] key_id
@@ -5407,7 +5501,7 @@ module Aws::KMS
5407
5501
  #
5408
5502
  # To specify a KMS key, use its key ID, key ARN, alias name, or alias
5409
5503
  # ARN. When using an alias name, prefix it with `"alias/"`. To specify
5410
- # a KMS key in a different Amazon Web Services account, you must use
5504
+ # a KMS key in a different Amazon Web Services account, you should use
5411
5505
  # the key ARN or alias ARN.
5412
5506
  #
5413
5507
  # For example:
@@ -6277,6 +6371,11 @@ module Aws::KMS
6277
6371
  # * ED25519\_PH\_SHA\_512 signing algorithm requires KMS
6278
6372
  # `MessageType:DIGEST`
6279
6373
  #
6374
+ # When you specify the ED25519\_PH\_SHA\_512 signing algorithm with
6375
+ # `MessageType:DIGEST`, KMS still performs the SHA-512 prehash
6376
+ # described in [Step 1 of Section 7.8.1 in FIPS 186-5][1]. This means
6377
+ # the input is hashed twice: once by you and once by KMS.
6378
+ #
6280
6379
  # When the value of `MessageType` is `DIGEST`, the length of the
6281
6380
  # `Message` value must match the length of hashed messages for the
6282
6381
  # specified signing algorithm.
@@ -6305,11 +6404,12 @@ module Aws::KMS
6305
6404
  # hashing algorithm.
6306
6405
  #
6307
6406
  # * SM2DSA uses the SM3 hashing algorithm. For details, see [Offline
6308
- # verification with SM2 key pairs][1].
6407
+ # verification with SM2 key pairs][2].
6309
6408
  #
6310
6409
  #
6311
6410
  #
6312
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
6411
+ # [1]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf#page=39
6412
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
6313
6413
  # @return [String]
6314
6414
  #
6315
6415
  # @!attribute [rw] grant_tokens
@@ -6597,8 +6697,8 @@ module Aws::KMS
6597
6697
  # This field may be displayed in plaintext in CloudTrail logs and
6598
6698
  # other output.
6599
6699
  #
6600
- # To change this value, an CloudHSM key store must be disconnected. An
6601
- # external key store can be connected or disconnected.
6700
+ # To change this value, the custom key store can be connected or
6701
+ # disconnected.
6602
6702
  # @return [String]
6603
6703
  #
6604
6704
  # @!attribute [rw] key_store_password
@@ -6978,6 +7078,11 @@ module Aws::KMS
6978
7078
  # * ED25519\_PH\_SHA\_512 signing algorithm requires KMS
6979
7079
  # `MessageType:DIGEST`
6980
7080
  #
7081
+ # When you specify the ED25519\_PH\_SHA\_512 signing algorithm with
7082
+ # `MessageType:DIGEST`, KMS still performs the SHA-512 prehash
7083
+ # described in [Step 1 of Section 7.8.1 in FIPS 186-5][1]. This means
7084
+ # the input is hashed twice: once by you and once by KMS.
7085
+ #
6981
7086
  # When the value of `MessageType` is `DIGEST`, the length of the
6982
7087
  # `Message` value must match the length of hashed messages for the
6983
7088
  # specified signing algorithm.
@@ -7007,11 +7112,12 @@ module Aws::KMS
7007
7112
  # hashing algorithm.
7008
7113
  #
7009
7114
  # * SM2DSA uses the SM3 hashing algorithm. For details, see [Offline
7010
- # verification with SM2 key pairs][1].
7115
+ # verification with SM2 key pairs][2].
7011
7116
  #
7012
7117
  #
7013
7118
  #
7014
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
7119
+ # [1]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf#page=39
7120
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification
7015
7121
  # @return [String]
7016
7122
  #
7017
7123
  # @!attribute [rw] signature
data/lib/aws-sdk-kms.rb CHANGED
@@ -54,7 +54,7 @@ module Aws::KMS
54
54
  autoload :EndpointProvider, 'aws-sdk-kms/endpoint_provider'
55
55
  autoload :Endpoints, 'aws-sdk-kms/endpoints'
56
56
 
57
- GEM_VERSION = '1.123.0'
57
+ GEM_VERSION = '1.124.0'
58
58
 
59
59
  end
60
60
 
data/sig/client.rbs CHANGED
@@ -438,6 +438,19 @@ module Aws
438
438
  ) -> _GenerateRandomResponseSuccess
439
439
  | (?Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GenerateRandomResponseSuccess
440
440
 
441
+ interface _GetKeyLastUsageResponseSuccess
442
+ include ::Seahorse::Client::_ResponseSuccess[Types::GetKeyLastUsageResponse]
443
+ def key_id: () -> ::String
444
+ def key_last_usage: () -> Types::KeyLastUsageData
445
+ def tracking_start_date: () -> ::Time
446
+ def key_creation_date: () -> ::Time
447
+ end
448
+ # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/KMS/Client.html#get_key_last_usage-instance_method
449
+ def get_key_last_usage: (
450
+ key_id: ::String
451
+ ) -> _GetKeyLastUsageResponseSuccess
452
+ | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _GetKeyLastUsageResponseSuccess
453
+
441
454
  interface _GetKeyPolicyResponseSuccess
442
455
  include ::Seahorse::Client::_ResponseSuccess[Types::GetKeyPolicyResponse]
443
456
  def policy: () -> ::String
data/sig/types.rbs CHANGED
@@ -429,6 +429,19 @@ module Aws::KMS
429
429
  SENSITIVE: [:plaintext]
430
430
  end
431
431
 
432
+ class GetKeyLastUsageRequest
433
+ attr_accessor key_id: ::String
434
+ SENSITIVE: []
435
+ end
436
+
437
+ class GetKeyLastUsageResponse
438
+ attr_accessor key_id: ::String
439
+ attr_accessor key_last_usage: Types::KeyLastUsageData
440
+ attr_accessor tracking_start_date: ::Time
441
+ attr_accessor key_creation_date: ::Time
442
+ SENSITIVE: []
443
+ end
444
+
432
445
  class GetKeyPolicyRequest
433
446
  attr_accessor key_id: ::String
434
447
  attr_accessor policy_name: ::String
@@ -600,6 +613,14 @@ module Aws::KMS
600
613
  SENSITIVE: []
601
614
  end
602
615
 
616
+ class KeyLastUsageData
617
+ attr_accessor operation: ("Decrypt" | "DeriveSharedSecret" | "Encrypt" | "GenerateDataKey" | "GenerateDataKeyPair" | "GenerateDataKeyPairWithoutPlaintext" | "GenerateDataKeyWithoutPlaintext" | "GenerateMac" | "ReEncrypt" | "Sign" | "Verify" | "VerifyMac")
618
+ attr_accessor timestamp: ::Time
619
+ attr_accessor cloud_trail_event_id: ::String
620
+ attr_accessor kms_request_id: ::String
621
+ SENSITIVE: []
622
+ end
623
+
603
624
  class KeyListEntry
604
625
  attr_accessor key_id: ::String
605
626
  attr_accessor key_arn: ::String
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-kms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.123.0
4
+ version: 1.124.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services