aws-sdk-kms 1.77.0 → 1.79.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-kms/client.rb +366 -36
- data/lib/aws-sdk-kms/client_api.rb +88 -2
- data/lib/aws-sdk-kms/endpoints.rb +28 -0
- data/lib/aws-sdk-kms/errors.rb +16 -0
- data/lib/aws-sdk-kms/plugins/endpoints.rb +4 -0
- data/lib/aws-sdk-kms/types.rb +241 -17
- data/lib/aws-sdk-kms.rb +1 -1
- data/sig/client.rbs +33 -3
- data/sig/errors.rbs +3 -0
- data/sig/types.rbs +42 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb0ea5ff70a205cb81c13f9eb12fb8c102c7d6ca4236bf9734d31f58e7bc7a13
|
4
|
+
data.tar.gz: 3c19d24f24485fe2e0191a68dbdee8eb339b295ecb85ad3c3f88b45f4c36efc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e94f92e6eeb788d1574f75acb13f89073893991927054c01ba19948676541e213edc6d14dc0f6e817a2e9c8b84cb84ee688c2159e1e19aa7b9a67f9ae0f429d
|
7
|
+
data.tar.gz: dcdaa1ca50c6d7ae1f2bdafe17945045d0791de691ae48e20b142107a602509c1d16016fda26c29185e9c5b1cc10b0e346030b0524164ca7ddb2ebda1ae8fb21
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.79.0 (2024-04-12)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - This feature supports the ability to specify a custom rotation period for automatic key rotations, the ability to perform on-demand key rotations, and visibility into your key material rotations.
|
8
|
+
|
9
|
+
1.78.0 (2024-03-18)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Adds the ability to use the default policy name by omitting the policyName parameter in calls to PutKeyPolicy and GetKeyPolicy
|
13
|
+
|
4
14
|
1.77.0 (2024-01-26)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.79.0
|
data/lib/aws-sdk-kms/client.rb
CHANGED
@@ -3619,6 +3619,10 @@ module Aws::KMS
|
|
3619
3619
|
#
|
3620
3620
|
# * GetKeyRotationStatus
|
3621
3621
|
#
|
3622
|
+
# * ListKeyRotations
|
3623
|
+
#
|
3624
|
+
# * RotateKeyOnDemand
|
3625
|
+
#
|
3622
3626
|
# **Eventual consistency**: The KMS API follows an eventual consistency
|
3623
3627
|
# model. For more information, see [KMS eventual consistency][12].
|
3624
3628
|
#
|
@@ -3851,12 +3855,20 @@ module Aws::KMS
|
|
3851
3855
|
# Enables [automatic rotation of the key material][1] of the specified
|
3852
3856
|
# symmetric encryption KMS key.
|
3853
3857
|
#
|
3854
|
-
#
|
3855
|
-
# KMS rotates the key material of the KMS key one year
|
3856
|
-
# 365 days) from the enable date and every year
|
3857
|
-
#
|
3858
|
-
#
|
3859
|
-
#
|
3858
|
+
# By default, when you enable automatic rotation of a [customer managed
|
3859
|
+
# KMS key][2], KMS rotates the key material of the KMS key one year
|
3860
|
+
# (approximately 365 days) from the enable date and every year
|
3861
|
+
# thereafter. You can use the optional `RotationPeriodInDays` parameter
|
3862
|
+
# to specify a custom rotation period when you enable key rotation, or
|
3863
|
+
# you can use `RotationPeriodInDays` to modify the rotation period of a
|
3864
|
+
# key that you previously enabled automatic key rotation on.
|
3865
|
+
#
|
3866
|
+
# You can monitor rotation of the key material for your KMS keys in
|
3867
|
+
# CloudTrail and Amazon CloudWatch. To disable rotation of the key
|
3868
|
+
# material in a customer managed KMS key, use the DisableKeyRotation
|
3869
|
+
# operation. You can use the GetKeyRotationStatus operation to identify
|
3870
|
+
# any in progress rotations. You can use the ListKeyRotations operation
|
3871
|
+
# to view the details of completed rotations.
|
3860
3872
|
#
|
3861
3873
|
# Automatic key rotation is supported only on [symmetric encryption KMS
|
3862
3874
|
# keys][3]. You cannot enable automatic rotation of [asymmetric KMS
|
@@ -3865,10 +3877,11 @@ module Aws::KMS
|
|
3865
3877
|
# disable automatic rotation of a set of related [multi-Region keys][8],
|
3866
3878
|
# set the property on the primary key.
|
3867
3879
|
#
|
3868
|
-
# You cannot enable or disable automatic rotation [Amazon Web
|
3869
|
-
# managed KMS keys][9]. KMS always rotates the key material of
|
3870
|
-
# Web Services managed keys every year. Rotation of [Amazon Web
|
3871
|
-
# owned KMS keys][10]
|
3880
|
+
# You cannot enable or disable automatic rotation of [Amazon Web
|
3881
|
+
# Services managed KMS keys][9]. KMS always rotates the key material of
|
3882
|
+
# Amazon Web Services managed keys every year. Rotation of [Amazon Web
|
3883
|
+
# Services owned KMS keys][10] is managed by the Amazon Web Services
|
3884
|
+
# service that owns the key.
|
3872
3885
|
#
|
3873
3886
|
# <note markdown="1"> In May 2022, KMS changed the rotation schedule for Amazon Web Services
|
3874
3887
|
# managed keys from every three years (approximately 1,095 days) to
|
@@ -3897,12 +3910,22 @@ module Aws::KMS
|
|
3897
3910
|
#
|
3898
3911
|
# * GetKeyRotationStatus
|
3899
3912
|
#
|
3913
|
+
# * ListKeyRotations
|
3914
|
+
#
|
3915
|
+
# * RotateKeyOnDemand
|
3916
|
+
#
|
3917
|
+
# <note markdown="1"> You can perform on-demand (RotateKeyOnDemand) rotation of the key
|
3918
|
+
# material in customer managed KMS keys, regardless of whether or not
|
3919
|
+
# automatic key rotation is enabled.
|
3920
|
+
#
|
3921
|
+
# </note>
|
3922
|
+
#
|
3900
3923
|
# **Eventual consistency**: The KMS API follows an eventual consistency
|
3901
3924
|
# model. For more information, see [KMS eventual consistency][13].
|
3902
3925
|
#
|
3903
3926
|
#
|
3904
3927
|
#
|
3905
|
-
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
|
3928
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-enable-disable
|
3906
3929
|
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
|
3907
3930
|
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
|
3908
3931
|
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
|
@@ -3943,21 +3966,42 @@ module Aws::KMS
|
|
3943
3966
|
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
|
3944
3967
|
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
|
3945
3968
|
#
|
3969
|
+
# @option params [Integer] :rotation_period_in_days
|
3970
|
+
# Use this parameter to specify a custom period of time between each
|
3971
|
+
# rotation date. If no value is specified, the default value is 365
|
3972
|
+
# days.
|
3973
|
+
#
|
3974
|
+
# The rotation period defines the number of days after you enable
|
3975
|
+
# automatic key rotation that KMS will rotate your key material, and the
|
3976
|
+
# number of days between each automatic rotation thereafter.
|
3977
|
+
#
|
3978
|
+
# You can use the [ `kms:RotationPeriodInDays` ][1] condition key to
|
3979
|
+
# further constrain the values that principals can specify in the
|
3980
|
+
# `RotationPeriodInDays` parameter.
|
3981
|
+
#
|
3982
|
+
#
|
3983
|
+
#
|
3984
|
+
#
|
3985
|
+
#
|
3986
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-rotation-period-in-days
|
3987
|
+
#
|
3946
3988
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
3947
3989
|
#
|
3948
3990
|
#
|
3949
3991
|
# @example Example: To enable automatic rotation of key material
|
3950
3992
|
#
|
3951
|
-
# # The following example enables automatic
|
3993
|
+
# # The following example enables automatic rotation with a rotation period of 365 days for the specified KMS key.
|
3952
3994
|
#
|
3953
3995
|
# resp = client.enable_key_rotation({
|
3954
|
-
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key whose key material will be rotated
|
3996
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key whose key material will be automatically rotated. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
|
3997
|
+
# rotation_period_in_days: 365, # The number of days between each rotation date. Specify a value between 9 and 2560. If no value is specified, the default value is 365 days.
|
3955
3998
|
# })
|
3956
3999
|
#
|
3957
4000
|
# @example Request syntax with placeholder values
|
3958
4001
|
#
|
3959
4002
|
# resp = client.enable_key_rotation({
|
3960
4003
|
# key_id: "KeyIdType", # required
|
4004
|
+
# rotation_period_in_days: 1,
|
3961
4005
|
# })
|
3962
4006
|
#
|
3963
4007
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKeyRotation AWS API Documentation
|
@@ -5583,13 +5627,15 @@ module Aws::KMS
|
|
5583
5627
|
# To get the key ID and key ARN for a KMS key, use ListKeys or
|
5584
5628
|
# DescribeKey.
|
5585
5629
|
#
|
5586
|
-
# @option params [
|
5587
|
-
# Specifies the name of the key policy.
|
5588
|
-
# `default`.
|
5630
|
+
# @option params [String] :policy_name
|
5631
|
+
# Specifies the name of the key policy. If no policy name is specified,
|
5632
|
+
# the default value is `default`. The only valid name is `default`. To
|
5633
|
+
# get the names of key policies, use ListKeyPolicies.
|
5589
5634
|
#
|
5590
5635
|
# @return [Types::GetKeyPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
5591
5636
|
#
|
5592
5637
|
# * {Types::GetKeyPolicyResponse#policy #policy} => String
|
5638
|
+
# * {Types::GetKeyPolicyResponse#policy_name #policy_name} => String
|
5593
5639
|
#
|
5594
5640
|
#
|
5595
5641
|
# @example Example: To retrieve a key policy
|
@@ -5610,12 +5656,13 @@ module Aws::KMS
|
|
5610
5656
|
#
|
5611
5657
|
# resp = client.get_key_policy({
|
5612
5658
|
# key_id: "KeyIdType", # required
|
5613
|
-
# policy_name: "PolicyNameType",
|
5659
|
+
# policy_name: "PolicyNameType",
|
5614
5660
|
# })
|
5615
5661
|
#
|
5616
5662
|
# @example Response structure
|
5617
5663
|
#
|
5618
5664
|
# resp.policy #=> String
|
5665
|
+
# resp.policy_name #=> String
|
5619
5666
|
#
|
5620
5667
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyPolicy AWS API Documentation
|
5621
5668
|
#
|
@@ -5626,14 +5673,10 @@ module Aws::KMS
|
|
5626
5673
|
req.send_request(options)
|
5627
5674
|
end
|
5628
5675
|
|
5629
|
-
#
|
5630
|
-
# key material][1] is
|
5631
|
-
#
|
5632
|
-
#
|
5633
|
-
# KMS rotates the key material of the KMS key one year (approximately
|
5634
|
-
# 365 days) from the enable date and every year thereafter. You can
|
5635
|
-
# monitor rotation of the key material for your KMS keys in CloudTrail
|
5636
|
-
# and Amazon CloudWatch.
|
5676
|
+
# Provides detailed information about the rotation status for a KMS key,
|
5677
|
+
# including whether [automatic rotation of the key material][1] is
|
5678
|
+
# enabled for the specified KMS key, the [rotation period][2], and the
|
5679
|
+
# next scheduled rotation date.
|
5637
5680
|
#
|
5638
5681
|
# Automatic key rotation is supported only on [symmetric encryption KMS
|
5639
5682
|
# keys][3]. You cannot enable automatic rotation of [asymmetric KMS
|
@@ -5649,6 +5692,13 @@ module Aws::KMS
|
|
5649
5692
|
# Services managed KMS keys every year. The key rotation status for
|
5650
5693
|
# Amazon Web Services managed KMS keys is always `true`.
|
5651
5694
|
#
|
5695
|
+
# You can perform on-demand (RotateKeyOnDemand) rotation of the key
|
5696
|
+
# material in customer managed KMS keys, regardless of whether or not
|
5697
|
+
# automatic key rotation is enabled. You can use GetKeyRotationStatus to
|
5698
|
+
# identify the date and time that an in progress on-demand rotation was
|
5699
|
+
# initiated. You can use ListKeyRotations to view the details of
|
5700
|
+
# completed rotations.
|
5701
|
+
#
|
5652
5702
|
# <note markdown="1"> In May 2022, KMS changed the rotation schedule for Amazon Web Services
|
5653
5703
|
# managed keys from every three years to every year. For details, see
|
5654
5704
|
# EnableKeyRotation.
|
@@ -5685,13 +5735,17 @@ module Aws::KMS
|
|
5685
5735
|
#
|
5686
5736
|
# * EnableKeyRotation
|
5687
5737
|
#
|
5738
|
+
# * ListKeyRotations
|
5739
|
+
#
|
5740
|
+
# * RotateKeyOnDemand
|
5741
|
+
#
|
5688
5742
|
# **Eventual consistency**: The KMS API follows an eventual consistency
|
5689
5743
|
# model. For more information, see [KMS eventual consistency][12].
|
5690
5744
|
#
|
5691
5745
|
#
|
5692
5746
|
#
|
5693
5747
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
|
5694
|
-
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
5748
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotation-period
|
5695
5749
|
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
|
5696
5750
|
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
|
5697
5751
|
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
|
@@ -5722,11 +5776,16 @@ module Aws::KMS
|
|
5722
5776
|
# @return [Types::GetKeyRotationStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
5723
5777
|
#
|
5724
5778
|
# * {Types::GetKeyRotationStatusResponse#key_rotation_enabled #key_rotation_enabled} => Boolean
|
5779
|
+
# * {Types::GetKeyRotationStatusResponse#key_id #key_id} => String
|
5780
|
+
# * {Types::GetKeyRotationStatusResponse#rotation_period_in_days #rotation_period_in_days} => Integer
|
5781
|
+
# * {Types::GetKeyRotationStatusResponse#next_rotation_date #next_rotation_date} => Time
|
5782
|
+
# * {Types::GetKeyRotationStatusResponse#on_demand_rotation_start_date #on_demand_rotation_start_date} => Time
|
5725
5783
|
#
|
5726
5784
|
#
|
5727
5785
|
# @example Example: To retrieve the rotation status for a KMS key
|
5728
5786
|
#
|
5729
|
-
# # The following example retrieves
|
5787
|
+
# # The following example retrieves detailed information about the rotation status for a KMS key, including whether
|
5788
|
+
# # automatic key rotation is enabled for the specified KMS key, the rotation period, and the next scheduled rotation date.
|
5730
5789
|
#
|
5731
5790
|
# resp = client.get_key_rotation_status({
|
5732
5791
|
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key whose key material rotation status you want to retrieve. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
|
@@ -5734,7 +5793,11 @@ module Aws::KMS
|
|
5734
5793
|
#
|
5735
5794
|
# resp.to_h outputs the following:
|
5736
5795
|
# {
|
5737
|
-
#
|
5796
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # Identifies the specified symmetric encryption KMS key.
|
5797
|
+
# key_rotation_enabled: true, # A boolean that indicates the key material rotation status. Returns true when automatic rotation of the key material is enabled, or false when it is not.
|
5798
|
+
# next_rotation_date: Time.parse("2024-04-05T15:14:47.757000+00:00"), # The next date that the key material will be automatically rotated.
|
5799
|
+
# on_demand_rotation_start_date: Time.parse("2024-03-02T10:11:36.564000+00:00"), # Identifies the date and time that an in progress on-demand rotation was initiated.
|
5800
|
+
# rotation_period_in_days: 365, # The number of days between each automatic rotation. The default value is 365 days.
|
5738
5801
|
# }
|
5739
5802
|
#
|
5740
5803
|
# @example Request syntax with placeholder values
|
@@ -5746,6 +5809,10 @@ module Aws::KMS
|
|
5746
5809
|
# @example Response structure
|
5747
5810
|
#
|
5748
5811
|
# resp.key_rotation_enabled #=> Boolean
|
5812
|
+
# resp.key_id #=> String
|
5813
|
+
# resp.rotation_period_in_days #=> Integer
|
5814
|
+
# resp.next_rotation_date #=> Time
|
5815
|
+
# resp.on_demand_rotation_start_date #=> Time
|
5749
5816
|
#
|
5750
5817
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyRotationStatus AWS API Documentation
|
5751
5818
|
#
|
@@ -6196,9 +6263,7 @@ module Aws::KMS
|
|
6196
6263
|
# import different key material. You might reimport key material to
|
6197
6264
|
# replace key material that expired or key material that you deleted.
|
6198
6265
|
# You might also reimport key material to change the expiration model or
|
6199
|
-
# expiration date of the key material.
|
6200
|
-
# if necessary, call DeleteImportedKeyMaterial to delete the current
|
6201
|
-
# imported key material.
|
6266
|
+
# expiration date of the key material.
|
6202
6267
|
#
|
6203
6268
|
# Each time you import key material into KMS, you can determine whether
|
6204
6269
|
# (`ExpirationModel`) and when (`ValidTo`) the key material expires. To
|
@@ -6896,6 +6961,129 @@ module Aws::KMS
|
|
6896
6961
|
req.send_request(options)
|
6897
6962
|
end
|
6898
6963
|
|
6964
|
+
# Returns information about all completed key material rotations for the
|
6965
|
+
# specified KMS key.
|
6966
|
+
#
|
6967
|
+
# You must specify the KMS key in all requests. You can refine the key
|
6968
|
+
# rotations list by limiting the number of rotations returned.
|
6969
|
+
#
|
6970
|
+
# For detailed information about automatic and on-demand key rotations,
|
6971
|
+
# see [Rotating KMS keys][1] in the *Key Management Service Developer
|
6972
|
+
# Guide*.
|
6973
|
+
#
|
6974
|
+
# **Cross-account use**: No. You cannot perform this operation on a KMS
|
6975
|
+
# key in a different Amazon Web Services account.
|
6976
|
+
#
|
6977
|
+
# **Required permissions**: [kms:ListKeyRotations][2] (key policy)
|
6978
|
+
#
|
6979
|
+
# **Related operations:**
|
6980
|
+
#
|
6981
|
+
# * EnableKeyRotation
|
6982
|
+
#
|
6983
|
+
# * DisableKeyRotation
|
6984
|
+
#
|
6985
|
+
# * GetKeyRotationStatus
|
6986
|
+
#
|
6987
|
+
# * RotateKeyOnDemand
|
6988
|
+
#
|
6989
|
+
# **Eventual consistency**: The KMS API follows an eventual consistency
|
6990
|
+
# model. For more information, see [KMS eventual consistency][3].
|
6991
|
+
#
|
6992
|
+
#
|
6993
|
+
#
|
6994
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
|
6995
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
6996
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
|
6997
|
+
#
|
6998
|
+
# @option params [required, String] :key_id
|
6999
|
+
# Gets the key rotations for the specified KMS key.
|
7000
|
+
#
|
7001
|
+
# Specify the key ID or key ARN of the KMS key.
|
7002
|
+
#
|
7003
|
+
# For example:
|
7004
|
+
#
|
7005
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
7006
|
+
#
|
7007
|
+
# * Key ARN:
|
7008
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
7009
|
+
#
|
7010
|
+
# To get the key ID and key ARN for a KMS key, use ListKeys or
|
7011
|
+
# DescribeKey.
|
7012
|
+
#
|
7013
|
+
# @option params [Integer] :limit
|
7014
|
+
# Use this parameter to specify the maximum number of items to return.
|
7015
|
+
# When this value is present, KMS does not return more than the
|
7016
|
+
# specified number of items, but it might return fewer.
|
7017
|
+
#
|
7018
|
+
# This value is optional. If you include a value, it must be between 1
|
7019
|
+
# and 1000, inclusive. If you do not include a value, it defaults to
|
7020
|
+
# 100.
|
7021
|
+
#
|
7022
|
+
# @option params [String] :marker
|
7023
|
+
# Use this parameter in a subsequent request after you receive a
|
7024
|
+
# response with truncated results. Set it to the value of `NextMarker`
|
7025
|
+
# from the truncated response you just received.
|
7026
|
+
#
|
7027
|
+
# @return [Types::ListKeyRotationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
7028
|
+
#
|
7029
|
+
# * {Types::ListKeyRotationsResponse#rotations #rotations} => Array<Types::RotationsListEntry>
|
7030
|
+
# * {Types::ListKeyRotationsResponse#next_marker #next_marker} => String
|
7031
|
+
# * {Types::ListKeyRotationsResponse#truncated #truncated} => Boolean
|
7032
|
+
#
|
7033
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
7034
|
+
#
|
7035
|
+
#
|
7036
|
+
# @example Example: To retrieve information about all completed key material rotations
|
7037
|
+
#
|
7038
|
+
# # The following example returns information about all completed key material rotations for the specified KMS key.
|
7039
|
+
#
|
7040
|
+
# resp = client.list_key_rotations({
|
7041
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
|
7042
|
+
# })
|
7043
|
+
#
|
7044
|
+
# resp.to_h outputs the following:
|
7045
|
+
# {
|
7046
|
+
# rotations: [
|
7047
|
+
# {
|
7048
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
|
7049
|
+
# rotation_date: Time.parse("2024-03-02T10:11:36.564000+00:00"),
|
7050
|
+
# rotation_type: "AUTOMATIC",
|
7051
|
+
# },
|
7052
|
+
# {
|
7053
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
|
7054
|
+
# rotation_date: Time.parse("2024-04-05T15:14:47.757000+00:00"),
|
7055
|
+
# rotation_type: "ON_DEMAND",
|
7056
|
+
# },
|
7057
|
+
# ], # A list of key rotations.
|
7058
|
+
# truncated: false, # A flag that indicates whether there are more items in the list. When the value is true, the list in this response is truncated. To get more items, pass the value of the NextMarker element in this response to the Marker parameter in a subsequent request.
|
7059
|
+
# }
|
7060
|
+
#
|
7061
|
+
# @example Request syntax with placeholder values
|
7062
|
+
#
|
7063
|
+
# resp = client.list_key_rotations({
|
7064
|
+
# key_id: "KeyIdType", # required
|
7065
|
+
# limit: 1,
|
7066
|
+
# marker: "MarkerType",
|
7067
|
+
# })
|
7068
|
+
#
|
7069
|
+
# @example Response structure
|
7070
|
+
#
|
7071
|
+
# resp.rotations #=> Array
|
7072
|
+
# resp.rotations[0].key_id #=> String
|
7073
|
+
# resp.rotations[0].rotation_date #=> Time
|
7074
|
+
# resp.rotations[0].rotation_type #=> String, one of "AUTOMATIC", "ON_DEMAND"
|
7075
|
+
# resp.next_marker #=> String
|
7076
|
+
# resp.truncated #=> Boolean
|
7077
|
+
#
|
7078
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeyRotations AWS API Documentation
|
7079
|
+
#
|
7080
|
+
# @overload list_key_rotations(params = {})
|
7081
|
+
# @param [Hash] params ({})
|
7082
|
+
def list_key_rotations(params = {}, options = {})
|
7083
|
+
req = build_request(:list_key_rotations, params)
|
7084
|
+
req.send_request(options)
|
7085
|
+
end
|
7086
|
+
|
6899
7087
|
# Gets a list of all KMS keys in the caller's Amazon Web Services
|
6900
7088
|
# account and Region.
|
6901
7089
|
#
|
@@ -7333,8 +7521,9 @@ module Aws::KMS
|
|
7333
7521
|
# To get the key ID and key ARN for a KMS key, use ListKeys or
|
7334
7522
|
# DescribeKey.
|
7335
7523
|
#
|
7336
|
-
# @option params [
|
7337
|
-
# The name of the key policy.
|
7524
|
+
# @option params [String] :policy_name
|
7525
|
+
# The name of the key policy. If no policy name is specified, the
|
7526
|
+
# default value is `default`. The only valid value is `default`.
|
7338
7527
|
#
|
7339
7528
|
# @option params [required, String] :policy
|
7340
7529
|
# The key policy to attach to the KMS key.
|
@@ -7416,7 +7605,7 @@ module Aws::KMS
|
|
7416
7605
|
#
|
7417
7606
|
# resp = client.put_key_policy({
|
7418
7607
|
# key_id: "KeyIdType", # required
|
7419
|
-
# policy_name: "PolicyNameType",
|
7608
|
+
# policy_name: "PolicyNameType",
|
7420
7609
|
# policy: "PolicyType", # required
|
7421
7610
|
# bypass_policy_lockout_safety_check: false,
|
7422
7611
|
# })
|
@@ -8302,7 +8491,7 @@ module Aws::KMS
|
|
8302
8491
|
#
|
8303
8492
|
#
|
8304
8493
|
#
|
8305
|
-
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
8494
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
|
8306
8495
|
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency
|
8307
8496
|
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
|
8308
8497
|
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
|
@@ -8370,6 +8559,147 @@ module Aws::KMS
|
|
8370
8559
|
req.send_request(options)
|
8371
8560
|
end
|
8372
8561
|
|
8562
|
+
# Immediately initiates rotation of the key material of the specified
|
8563
|
+
# symmetric encryption KMS key.
|
8564
|
+
#
|
8565
|
+
# You can perform [on-demand rotation][1] of the key material in
|
8566
|
+
# customer managed KMS keys, regardless of whether or not [automatic key
|
8567
|
+
# rotation][2] is enabled. On-demand rotations do not change existing
|
8568
|
+
# automatic rotation schedules. For example, consider a KMS key that has
|
8569
|
+
# automatic key rotation enabled with a rotation period of 730 days. If
|
8570
|
+
# the key is scheduled to automatically rotate on April 14, 2024, and
|
8571
|
+
# you perform an on-demand rotation on April 10, 2024, the key will
|
8572
|
+
# automatically rotate, as scheduled, on April 14, 2024 and every 730
|
8573
|
+
# days thereafter.
|
8574
|
+
#
|
8575
|
+
# <note markdown="1"> You can perform on-demand key rotation a **maximum of 10 times** per
|
8576
|
+
# KMS key. You can use the KMS console to view the number of remaining
|
8577
|
+
# on-demand rotations available for a KMS key.
|
8578
|
+
#
|
8579
|
+
# </note>
|
8580
|
+
#
|
8581
|
+
# You can use GetKeyRotationStatus to identify any in progress on-demand
|
8582
|
+
# rotations. You can use ListKeyRotations to identify the date that
|
8583
|
+
# completed on-demand rotations were performed. You can monitor rotation
|
8584
|
+
# of the key material for your KMS keys in CloudTrail and Amazon
|
8585
|
+
# CloudWatch.
|
8586
|
+
#
|
8587
|
+
# On-demand key rotation is supported only on [symmetric encryption KMS
|
8588
|
+
# keys][3]. You cannot perform on-demand rotation of [asymmetric KMS
|
8589
|
+
# keys][4], [HMAC KMS keys][5], KMS keys with [imported key
|
8590
|
+
# material][6], or KMS keys in a [custom key store][7]. To perform
|
8591
|
+
# on-demand rotation of a set of related [multi-Region keys][8], invoke
|
8592
|
+
# the on-demand rotation on the primary key.
|
8593
|
+
#
|
8594
|
+
# You cannot initiate on-demand rotation of [Amazon Web Services managed
|
8595
|
+
# KMS keys][9]. KMS always rotates the key material of Amazon Web
|
8596
|
+
# Services managed keys every year. Rotation of [Amazon Web Services
|
8597
|
+
# owned KMS keys][10] is managed by the Amazon Web Services service that
|
8598
|
+
# owns the key.
|
8599
|
+
#
|
8600
|
+
# The KMS key that you use for this operation must be in a compatible
|
8601
|
+
# key state. For details, see [Key states of KMS keys][11] in the *Key
|
8602
|
+
# Management Service Developer Guide*.
|
8603
|
+
#
|
8604
|
+
# **Cross-account use**: No. You cannot perform this operation on a KMS
|
8605
|
+
# key in a different Amazon Web Services account.
|
8606
|
+
#
|
8607
|
+
# **Required permissions**: [kms:RotateKeyOnDemand][12] (key policy)
|
8608
|
+
#
|
8609
|
+
# **Related operations:**
|
8610
|
+
#
|
8611
|
+
# * EnableKeyRotation
|
8612
|
+
#
|
8613
|
+
# * DisableKeyRotation
|
8614
|
+
#
|
8615
|
+
# * GetKeyRotationStatus
|
8616
|
+
#
|
8617
|
+
# * ListKeyRotations
|
8618
|
+
#
|
8619
|
+
# **Eventual consistency**: The KMS API follows an eventual consistency
|
8620
|
+
# model. For more information, see [KMS eventual consistency][13].
|
8621
|
+
#
|
8622
|
+
#
|
8623
|
+
#
|
8624
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-on-demand
|
8625
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-enable-disable
|
8626
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
|
8627
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
|
8628
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
|
8629
|
+
# [6]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
|
8630
|
+
# [7]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
|
8631
|
+
# [8]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
|
8632
|
+
# [9]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
8633
|
+
# [10]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
|
8634
|
+
# [11]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
|
8635
|
+
# [12]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
8636
|
+
# [13]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
|
8637
|
+
#
|
8638
|
+
# @option params [required, String] :key_id
|
8639
|
+
# Identifies a symmetric encryption KMS key. You cannot perform
|
8640
|
+
# on-demand rotation of [asymmetric KMS keys][1], [HMAC KMS keys][2],
|
8641
|
+
# KMS keys with [imported key material][3], or KMS keys in a [custom key
|
8642
|
+
# store][4]. To perform on-demand rotation of a set of related
|
8643
|
+
# [multi-Region keys][5], invoke the on-demand rotation on the primary
|
8644
|
+
# key.
|
8645
|
+
#
|
8646
|
+
# Specify the key ID or key ARN of the KMS key.
|
8647
|
+
#
|
8648
|
+
# For example:
|
8649
|
+
#
|
8650
|
+
# * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
|
8651
|
+
#
|
8652
|
+
# * Key ARN:
|
8653
|
+
# `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
8654
|
+
#
|
8655
|
+
# To get the key ID and key ARN for a KMS key, use ListKeys or
|
8656
|
+
# DescribeKey.
|
8657
|
+
#
|
8658
|
+
#
|
8659
|
+
#
|
8660
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
|
8661
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
|
8662
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
|
8663
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
|
8664
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
|
8665
|
+
#
|
8666
|
+
# @return [Types::RotateKeyOnDemandResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
8667
|
+
#
|
8668
|
+
# * {Types::RotateKeyOnDemandResponse#key_id #key_id} => String
|
8669
|
+
#
|
8670
|
+
#
|
8671
|
+
# @example Example: To perform on-demand rotation of key material
|
8672
|
+
#
|
8673
|
+
# # The following example immediately initiates rotation of the key material for the specified KMS key.
|
8674
|
+
#
|
8675
|
+
# resp = client.rotate_key_on_demand({
|
8676
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key whose key material you want to initiate on-demand rotation on. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
|
8677
|
+
# })
|
8678
|
+
#
|
8679
|
+
# resp.to_h outputs the following:
|
8680
|
+
# {
|
8681
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The KMS key that you initiated on-demand rotation on.
|
8682
|
+
# }
|
8683
|
+
#
|
8684
|
+
# @example Request syntax with placeholder values
|
8685
|
+
#
|
8686
|
+
# resp = client.rotate_key_on_demand({
|
8687
|
+
# key_id: "KeyIdType", # required
|
8688
|
+
# })
|
8689
|
+
#
|
8690
|
+
# @example Response structure
|
8691
|
+
#
|
8692
|
+
# resp.key_id #=> String
|
8693
|
+
#
|
8694
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RotateKeyOnDemand AWS API Documentation
|
8695
|
+
#
|
8696
|
+
# @overload rotate_key_on_demand(params = {})
|
8697
|
+
# @param [Hash] params ({})
|
8698
|
+
def rotate_key_on_demand(params = {}, options = {})
|
8699
|
+
req = build_request(:rotate_key_on_demand, params)
|
8700
|
+
req.send_request(options)
|
8701
|
+
end
|
8702
|
+
|
8373
8703
|
# Schedules the deletion of a KMS key. By default, KMS applies a waiting
|
8374
8704
|
# period of 30 days, but you can specify a waiting period of 7-30 days.
|
8375
8705
|
# When this operation is successful, the key state of the KMS key
|
@@ -10103,7 +10433,7 @@ module Aws::KMS
|
|
10103
10433
|
params: params,
|
10104
10434
|
config: config)
|
10105
10435
|
context[:gem_name] = 'aws-sdk-kms'
|
10106
|
-
context[:gem_version] = '1.
|
10436
|
+
context[:gem_version] = '1.79.0'
|
10107
10437
|
Seahorse::Client::Request.new(handlers, context)
|
10108
10438
|
end
|
10109
10439
|
|