aws-sdk-kms 1.142.0 → 1.144.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 +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-kms/client.rb +217 -30
- data/lib/aws-sdk-kms/client_api.rb +5 -0
- data/lib/aws-sdk-kms/types.rb +87 -9
- data/lib/aws-sdk-kms.rb +1 -1
- data/sig/client.rbs +2 -1
- data/sig/types.rbs +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b767a5b63519ee93575ad683f6ce3fff9abf3d62ffb95d30c47cd8bc67175f74
|
|
4
|
+
data.tar.gz: 35058c83a507b4cf465e7da3ddd1662d421425d57be3c45b112f4e5c16faed61
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d30b049cd539fb491e111788be52fd6e738e5cee932903a3fea4ad0a472901ee6730162998debbf5c53e16686f91a38130807828f0705f9e77a315b9894633b
|
|
7
|
+
data.tar.gz: 2675bd0de62bc860681f88a93a8d3cd48759eb9b3e21395815c36ec834bbe98310a925ec204560431e763f8816abf186647dfb48bba018d8d4c3432439453605
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
Unreleased Changes
|
|
2
2
|
------------------
|
|
3
3
|
|
|
4
|
+
1.144.0 (2026-11-16)
|
|
5
|
+
------------------
|
|
6
|
+
|
|
7
|
+
* Feature - AWS KMS now supports sharing KMS keys across AWS accounts using AWS Resource Access Manager (AWS RAM). This release adds the optional ResourceOwners parameter to ListKeys, which lists keys owned by the caller's account (SELF), keys shared with the account through AWS RAM, or both.
|
|
8
|
+
|
|
9
|
+
1.143.0 (2026-11-11)
|
|
10
|
+
------------------
|
|
11
|
+
|
|
12
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
|
13
|
+
|
|
4
14
|
1.142.0 (2026-11-10)
|
|
5
15
|
------------------
|
|
6
16
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.
|
|
1
|
+
1.144.0
|
data/lib/aws-sdk-kms/client.rb
CHANGED
|
@@ -6732,24 +6732,44 @@ module Aws::KMS
|
|
|
6732
6732
|
|
|
6733
6733
|
# Gets a key policy attached to the specified KMS key.
|
|
6734
6734
|
#
|
|
6735
|
+
# A KMS key can have two key policies. You manage the `default` key
|
|
6736
|
+
# policy. Resource Access Manager (RAM) manages the `AWS_RAM` key policy
|
|
6737
|
+
# for KMS keys that you share through RAM. You can use `GetKeyPolicy` to
|
|
6738
|
+
# view the `AWS_RAM` key policy, but you can't change it with
|
|
6739
|
+
# PutKeyPolicy. To get the `AWS_RAM` key policy, set the `PolicyName`
|
|
6740
|
+
# parameter to `AWS_RAM`. If the KMS key doesn't have an `AWS_RAM` key
|
|
6741
|
+
# policy, `GetKeyPolicy` returns a `NotFoundException`. For information
|
|
6742
|
+
# about sharing KMS keys, see [Sharing KMS keys with RAM][1] in the *Key
|
|
6743
|
+
# Management Service Developer Guide*. For information about RAM managed
|
|
6744
|
+
# permissions, see [Managing permissions in RAM][2] in the *RAM User
|
|
6745
|
+
# Guide*.
|
|
6746
|
+
#
|
|
6735
6747
|
# **Cross-account use**: No. You cannot perform this operation on a KMS
|
|
6736
6748
|
# key in a different Amazon Web Services account.
|
|
6737
6749
|
#
|
|
6738
|
-
# **Required permissions**: [kms:GetKeyPolicy][
|
|
6750
|
+
# **Required permissions**: [kms:GetKeyPolicy][3] (key policy)
|
|
6751
|
+
#
|
|
6752
|
+
# You can use the [kms:PolicyName][4] condition key to control access to
|
|
6753
|
+
# this operation based on the value of the `PolicyName` parameter in the
|
|
6754
|
+
# request. If the request doesn't include `PolicyName`, the value of
|
|
6755
|
+
# `kms:PolicyName` is `default`.
|
|
6739
6756
|
#
|
|
6740
|
-
# **Related operations**: [PutKeyPolicy][
|
|
6757
|
+
# **Related operations**: [PutKeyPolicy][5]
|
|
6741
6758
|
#
|
|
6742
6759
|
# **Eventual consistency**: The KMS API follows an eventual consistency
|
|
6743
|
-
# model. For more information, see [KMS eventual consistency][
|
|
6760
|
+
# model. For more information, see [KMS eventual consistency][6].
|
|
6744
6761
|
#
|
|
6745
6762
|
#
|
|
6746
6763
|
#
|
|
6747
|
-
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
|
6748
|
-
# [2]: https://docs.aws.amazon.com/
|
|
6749
|
-
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
|
6764
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-sharing-ram.html
|
|
6765
|
+
# [2]: https://docs.aws.amazon.com/ram/latest/userguide/security-ram-permissions.html
|
|
6766
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
|
6767
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-policy-name
|
|
6768
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
|
|
6769
|
+
# [6]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
|
|
6750
6770
|
#
|
|
6751
6771
|
# @option params [required, String] :key_id
|
|
6752
|
-
#
|
|
6772
|
+
# Identifies the KMS key whose key policy you want to get.
|
|
6753
6773
|
#
|
|
6754
6774
|
# Specify the key ID or key ARN of the KMS key.
|
|
6755
6775
|
#
|
|
@@ -6765,7 +6785,10 @@ module Aws::KMS
|
|
|
6765
6785
|
#
|
|
6766
6786
|
# @option params [String] :policy_name
|
|
6767
6787
|
# Specifies the name of the key policy. If no policy name is specified,
|
|
6768
|
-
# the default value is `default`.
|
|
6788
|
+
# the default value is `default`. Valid values are `default` and
|
|
6789
|
+
# `AWS_RAM`. Use `AWS_RAM` to get the key policy that RAM manages for a
|
|
6790
|
+
# KMS key that you share through RAM. If the KMS key doesn't have an
|
|
6791
|
+
# `AWS_RAM` key policy, the request fails with a `NotFoundException`. To
|
|
6769
6792
|
# get the names of key policies, use ListKeyPolicies.
|
|
6770
6793
|
#
|
|
6771
6794
|
# @return [Types::GetKeyPolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
@@ -6788,6 +6811,23 @@ module Aws::KMS
|
|
|
6788
6811
|
# policy: "{\n \"Version\" : \"2012-10-17\",\n \"Id\" : \"key-default-1\",\n \"Statement\" : [ {\n \"Sid\" : \"Enable IAM User Permissions\",\n \"Effect\" : \"Allow\",\n \"Principal\" : {\n \"AWS\" : \"arn:aws:iam::111122223333:root\"\n },\n \"Action\" : \"kms:*\",\n \"Resource\" : \"*\"\n } ]\n}", # The key policy document.
|
|
6789
6812
|
# }
|
|
6790
6813
|
#
|
|
6814
|
+
# @example Example: To retrieve the AWS_RAM key policy
|
|
6815
|
+
#
|
|
6816
|
+
# # The following example retrieves the AWS_RAM key policy for a KMS key that is shared with account 444455556666 through a
|
|
6817
|
+
# # resource share that uses a customer managed AWS RAM permission. AWS Resource Access Manager (AWS RAM) creates and
|
|
6818
|
+
# # manages the AWS_RAM key policy for KMS keys that you share through AWS RAM.
|
|
6819
|
+
#
|
|
6820
|
+
# resp = client.get_key_policy({
|
|
6821
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key whose key policy you want to retrieve. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
|
|
6822
|
+
# policy_name: "AWS_RAM", # The name of the key policy to retrieve. AWS_RAM gets the key policy that AWS RAM manages for the KMS key.
|
|
6823
|
+
# })
|
|
6824
|
+
#
|
|
6825
|
+
# resp.to_h outputs the following:
|
|
6826
|
+
# {
|
|
6827
|
+
# policy: "{\n \"Version\" : \"2012-10-17\",\n \"Id\" : \"a1b2c3d4-5678-90ab-cdef-EXAMPLE11111\",\n \"Statement\" : [ {\n \"Sid\" : \"ExampleKmsKeyPermission-external-principals\",\n \"Effect\" : \"Allow\",\n \"Principal\" : {\n \"AWS\" : \"arn:aws:iam::444455556666:root\"\n },\n \"Action\" : [ \"kms:DescribeKey\", \"kms:Encrypt\", \"kms:Decrypt\" ],\n \"Resource\" : \"arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab\"\n } ]\n}", # The AWS_RAM key policy document. Its statement allows the account that the KMS key is shared with to perform the actions that the AWS RAM permission allows.
|
|
6828
|
+
# policy_name: "AWS_RAM", # The name of the key policy.
|
|
6829
|
+
# }
|
|
6830
|
+
#
|
|
6791
6831
|
# @example Request syntax with placeholder values
|
|
6792
6832
|
#
|
|
6793
6833
|
# resp = client.get_key_policy({
|
|
@@ -8147,28 +8187,32 @@ module Aws::KMS
|
|
|
8147
8187
|
|
|
8148
8188
|
# Gets the names of the key policies that are attached to a KMS key.
|
|
8149
8189
|
# This operation is designed to get policy names that you can use in a
|
|
8150
|
-
# GetKeyPolicy operation.
|
|
8151
|
-
# `
|
|
8190
|
+
# GetKeyPolicy operation. The valid policy names are `default` and
|
|
8191
|
+
# `AWS_RAM`.
|
|
8192
|
+
#
|
|
8193
|
+
# For information about the `AWS_RAM` key policy, see [Sharing KMS keys
|
|
8194
|
+
# with RAM][1] in the *Key Management Service Developer Guide*.
|
|
8152
8195
|
#
|
|
8153
8196
|
# **Cross-account use**: No. You cannot perform this operation on a KMS
|
|
8154
8197
|
# key in a different Amazon Web Services account.
|
|
8155
8198
|
#
|
|
8156
|
-
# **Required permissions**: [kms:ListKeyPolicies][
|
|
8199
|
+
# **Required permissions**: [kms:ListKeyPolicies][2] (key policy)
|
|
8157
8200
|
#
|
|
8158
8201
|
# **Related operations:**
|
|
8159
8202
|
#
|
|
8160
8203
|
# * GetKeyPolicy
|
|
8161
8204
|
#
|
|
8162
|
-
# * [PutKeyPolicy][
|
|
8205
|
+
# * [PutKeyPolicy][3]
|
|
8163
8206
|
#
|
|
8164
8207
|
# **Eventual consistency**: The KMS API follows an eventual consistency
|
|
8165
|
-
# model. For more information, see [KMS eventual consistency][
|
|
8208
|
+
# model. For more information, see [KMS eventual consistency][4].
|
|
8166
8209
|
#
|
|
8167
8210
|
#
|
|
8168
8211
|
#
|
|
8169
|
-
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
|
8170
|
-
# [2]: https://docs.aws.amazon.com/kms/latest/
|
|
8171
|
-
# [3]: https://docs.aws.amazon.com/kms/latest/
|
|
8212
|
+
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-sharing-ram.html
|
|
8213
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
|
8214
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
|
|
8215
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
|
|
8172
8216
|
#
|
|
8173
8217
|
# @option params [required, String] :key_id
|
|
8174
8218
|
# Gets the names of key policies for the specified KMS key.
|
|
@@ -8194,7 +8238,7 @@ module Aws::KMS
|
|
|
8194
8238
|
# and 1000, inclusive. If you do not include a value, it defaults to
|
|
8195
8239
|
# 100.
|
|
8196
8240
|
#
|
|
8197
|
-
#
|
|
8241
|
+
# A KMS key can have at most two key policies, `default` and `AWS_RAM`.
|
|
8198
8242
|
#
|
|
8199
8243
|
# @option params [String] :marker
|
|
8200
8244
|
# Use this parameter in a subsequent request after you receive a
|
|
@@ -8226,6 +8270,24 @@ module Aws::KMS
|
|
|
8226
8270
|
# truncated: false, # A boolean that indicates whether there are more items in the list. Returns true when there are more items, or false when there are not.
|
|
8227
8271
|
# }
|
|
8228
8272
|
#
|
|
8273
|
+
# @example Example: To list key policies for a KMS key that has an AWS_RAM key policy
|
|
8274
|
+
#
|
|
8275
|
+
# # The following example lists key policies for a KMS key that has an AWS_RAM key policy. AWS Resource Access Manager (AWS
|
|
8276
|
+
# # RAM) manages the AWS_RAM key policy for KMS keys that you share through AWS RAM.
|
|
8277
|
+
#
|
|
8278
|
+
# resp = client.list_key_policies({
|
|
8279
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key whose key policies you want to list. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
|
|
8280
|
+
# })
|
|
8281
|
+
#
|
|
8282
|
+
# resp.to_h outputs the following:
|
|
8283
|
+
# {
|
|
8284
|
+
# policy_names: [
|
|
8285
|
+
# "AWS_RAM",
|
|
8286
|
+
# "default",
|
|
8287
|
+
# ], # A list of key policy names. The list includes AWS_RAM because the KMS key has an AWS_RAM key policy.
|
|
8288
|
+
# truncated: false, # A boolean that indicates whether there are more items in the list. Returns true when there are more items, or false when there are not.
|
|
8289
|
+
# }
|
|
8290
|
+
#
|
|
8229
8291
|
# @example Request syntax with placeholder values
|
|
8230
8292
|
#
|
|
8231
8293
|
# resp = client.list_key_policies({
|
|
@@ -8398,10 +8460,35 @@ module Aws::KMS
|
|
|
8398
8460
|
# Gets a list of all KMS keys in the caller's Amazon Web Services
|
|
8399
8461
|
# account and Region.
|
|
8400
8462
|
#
|
|
8401
|
-
#
|
|
8402
|
-
#
|
|
8463
|
+
# You can also use `ListKeys` to list KMS keys in the Region that other
|
|
8464
|
+
# Amazon Web Services accounts shared with the caller's Amazon Web
|
|
8465
|
+
# Services account through Resource Access Manager (RAM). To list them,
|
|
8466
|
+
# use the `ResourceOwners` parameter. If you omit `ResourceOwners`,
|
|
8467
|
+
# `ListKeys` lists only the KMS keys in the caller's Amazon Web
|
|
8468
|
+
# Services account.
|
|
8469
|
+
#
|
|
8470
|
+
# When `ResourceOwners` includes `OTHER_ACCOUNTS_VIA_RAM`, `ListKeys`
|
|
8471
|
+
# returns the KMS keys that other Amazon Web Services accounts currently
|
|
8472
|
+
# share with the caller's Amazon Web Services account through RAM. For
|
|
8473
|
+
# information about how and when a resource that another account shares
|
|
8474
|
+
# becomes available to your Amazon Web Services account, see [Access
|
|
8475
|
+
# Amazon Web Services resources shared with you][1] in the *RAM User
|
|
8476
|
+
# Guide*.
|
|
8477
|
+
#
|
|
8478
|
+
# **Cross-account use**: No. This operation doesn't take a KMS key
|
|
8479
|
+
# parameter, so you can't use it to list the KMS keys of a specific
|
|
8480
|
+
# Amazon Web Services account. The only KMS keys in other Amazon Web
|
|
8481
|
+
# Services accounts that `ListKeys` returns are the ones that other
|
|
8482
|
+
# accounts shared with the caller's Amazon Web Services account through
|
|
8483
|
+
# RAM. To list them, set the `ResourceOwners` parameter to include
|
|
8484
|
+
# `OTHER_ACCOUNTS_VIA_RAM`.
|
|
8403
8485
|
#
|
|
8404
|
-
# **Required permissions**: [kms:ListKeys][
|
|
8486
|
+
# **Required permissions**: [kms:ListKeys][2] (IAM policy)
|
|
8487
|
+
#
|
|
8488
|
+
# The same `kms:ListKeys` permission lets you list the KMS keys that
|
|
8489
|
+
# other accounts shared with you through RAM. KMS doesn't evaluate the
|
|
8490
|
+
# key policies of shared KMS keys when it lists them. To use a shared
|
|
8491
|
+
# KMS key, you need permission for each operation on that KMS key.
|
|
8405
8492
|
#
|
|
8406
8493
|
# **Related operations:**
|
|
8407
8494
|
#
|
|
@@ -8414,12 +8501,18 @@ module Aws::KMS
|
|
|
8414
8501
|
# * ListResourceTags
|
|
8415
8502
|
#
|
|
8416
8503
|
# **Eventual consistency**: The KMS API follows an eventual consistency
|
|
8417
|
-
# model. For more information, see [KMS eventual consistency][
|
|
8504
|
+
# model. For more information, see [KMS eventual consistency][3].
|
|
8418
8505
|
#
|
|
8506
|
+
# KMS keys that other Amazon Web Services accounts share with you can
|
|
8507
|
+
# take some time to appear in or disappear from `ListKeys` results after
|
|
8508
|
+
# changes to resource shares, such as accepting an invitation or
|
|
8509
|
+
# deleting a resource share.
|
|
8419
8510
|
#
|
|
8420
8511
|
#
|
|
8421
|
-
#
|
|
8422
|
-
# [
|
|
8512
|
+
#
|
|
8513
|
+
# [1]: https://docs.aws.amazon.com/ram/latest/userguide/working-with-shared.html
|
|
8514
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
|
8515
|
+
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
|
|
8423
8516
|
#
|
|
8424
8517
|
# @option params [Integer] :limit
|
|
8425
8518
|
# Use this parameter to specify the maximum number of items to return.
|
|
@@ -8435,6 +8528,45 @@ module Aws::KMS
|
|
|
8435
8528
|
# response with truncated results. Set it to the value of `NextMarker`
|
|
8436
8529
|
# from the truncated response you just received.
|
|
8437
8530
|
#
|
|
8531
|
+
# @option params [Array<String>] :resource_owners
|
|
8532
|
+
# Specifies whose KMS keys to list. Use this parameter to list KMS keys
|
|
8533
|
+
# that other Amazon Web Services accounts shared with your Amazon Web
|
|
8534
|
+
# Services account through Resource Access Manager (RAM).
|
|
8535
|
+
#
|
|
8536
|
+
# Specify one or two values. Valid values are:
|
|
8537
|
+
#
|
|
8538
|
+
# SELF
|
|
8539
|
+
#
|
|
8540
|
+
# : Lists the KMS keys in your Amazon Web Services account and Region.
|
|
8541
|
+
#
|
|
8542
|
+
# OTHER\_ACCOUNTS\_VIA\_RAM
|
|
8543
|
+
#
|
|
8544
|
+
# : Lists the KMS keys in the Region that other Amazon Web Services
|
|
8545
|
+
# accounts currently share with your Amazon Web Services account
|
|
8546
|
+
# through RAM. This list doesn't include KMS keys that your Amazon
|
|
8547
|
+
# Web Services account owns. For each of these KMS keys, the key ARN
|
|
8548
|
+
# in the response contains the account ID of the Amazon Web Services
|
|
8549
|
+
# account that owns the KMS key.
|
|
8550
|
+
#
|
|
8551
|
+
# If you omit this parameter, `ListKeys` lists only the KMS keys in your
|
|
8552
|
+
# Amazon Web Services account. If you specify both values, in either
|
|
8553
|
+
# order, `ListKeys` returns the KMS keys in your Amazon Web Services
|
|
8554
|
+
# account first, and then the KMS keys that other Amazon Web Services
|
|
8555
|
+
# accounts shared with you. A single response doesn't contain both
|
|
8556
|
+
# kinds of KMS keys.
|
|
8557
|
+
#
|
|
8558
|
+
# When `ResourceOwners` includes `OTHER_ACCOUNTS_VIA_RAM`, a response
|
|
8559
|
+
# can contain fewer KMS keys than the `Limit` value, or none, even when
|
|
8560
|
+
# `Truncated` is true. To get all of the KMS keys, continue calling
|
|
8561
|
+
# `ListKeys` with the `NextMarker` value from each response until
|
|
8562
|
+
# `Truncated` is false. Use a `NextMarker` value only in a request that
|
|
8563
|
+
# has the same `ResourceOwners` value as the request that returned it.
|
|
8564
|
+
# Otherwise, the request can fail with an `InvalidMarkerException`.
|
|
8565
|
+
#
|
|
8566
|
+
# KMS keys that other Amazon Web Services accounts share with you can
|
|
8567
|
+
# take some time to appear in or disappear from the results after
|
|
8568
|
+
# changes to resource shares.
|
|
8569
|
+
#
|
|
8438
8570
|
# @return [Types::ListKeysResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
|
8439
8571
|
#
|
|
8440
8572
|
# * {Types::ListKeysResponse#keys #keys} => Array<Types::KeyListEntry>
|
|
@@ -8486,11 +8618,38 @@ module Aws::KMS
|
|
|
8486
8618
|
# truncated: false, # A boolean that indicates whether there are more items in the list. Returns true when there are more items, or false when there are not.
|
|
8487
8619
|
# }
|
|
8488
8620
|
#
|
|
8621
|
+
# @example Example: To list KMS keys that other accounts shared with you through AWS RAM
|
|
8622
|
+
#
|
|
8623
|
+
# # The following example lists the KMS keys in the Region that other AWS accounts shared with your AWS account through AWS
|
|
8624
|
+
# # Resource Access Manager (AWS RAM).
|
|
8625
|
+
#
|
|
8626
|
+
# resp = client.list_keys({
|
|
8627
|
+
# resource_owners: [
|
|
8628
|
+
# "OTHER_ACCOUNTS_VIA_RAM",
|
|
8629
|
+
# ], # Specifies whose KMS keys to list. OTHER_ACCOUNTS_VIA_RAM lists the KMS keys that other AWS accounts shared with your AWS account through AWS RAM.
|
|
8630
|
+
# })
|
|
8631
|
+
#
|
|
8632
|
+
# resp.to_h outputs the following:
|
|
8633
|
+
# {
|
|
8634
|
+
# keys: [
|
|
8635
|
+
# {
|
|
8636
|
+
# key_arn: "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
8637
|
+
# key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
8638
|
+
# },
|
|
8639
|
+
# {
|
|
8640
|
+
# key_arn: "arn:aws:kms:us-east-2:444455556666:key/0987dcba-09fe-87dc-65ba-ab0987654321",
|
|
8641
|
+
# key_id: "0987dcba-09fe-87dc-65ba-ab0987654321",
|
|
8642
|
+
# },
|
|
8643
|
+
# ], # A list of KMS keys, including the key ID and Amazon Resource Name (ARN) of each one. The key ARN contains the account ID of the AWS account that owns the KMS key.
|
|
8644
|
+
# truncated: false, # A boolean that indicates whether there are more items in the list. Returns true when there are more items, or false when there are not.
|
|
8645
|
+
# }
|
|
8646
|
+
#
|
|
8489
8647
|
# @example Request syntax with placeholder values
|
|
8490
8648
|
#
|
|
8491
8649
|
# resp = client.list_keys({
|
|
8492
8650
|
# limit: 1,
|
|
8493
8651
|
# marker: "MarkerType",
|
|
8652
|
+
# resource_owners: ["SELF"], # accepts SELF, OTHER_ACCOUNTS_VIA_RAM
|
|
8494
8653
|
# })
|
|
8495
8654
|
#
|
|
8496
8655
|
# @example Response structure
|
|
@@ -8841,7 +9000,8 @@ module Aws::KMS
|
|
|
8841
9000
|
req.send_request(options)
|
|
8842
9001
|
end
|
|
8843
9002
|
|
|
8844
|
-
# Attaches a key policy to the specified KMS key.
|
|
9003
|
+
# Attaches a key policy to the specified KMS key. You can use this
|
|
9004
|
+
# operation to set only the `default` key policy.
|
|
8845
9005
|
#
|
|
8846
9006
|
# For more information about key policies, see [Key Policies][1] in the
|
|
8847
9007
|
# *Key Management Service Developer Guide*. For help writing and
|
|
@@ -8852,23 +9012,39 @@ module Aws::KMS
|
|
|
8852
9012
|
# Services SDK or CLI][3] in the *Key Management Service Developer
|
|
8853
9013
|
# Guide*.
|
|
8854
9014
|
#
|
|
9015
|
+
# A KMS key can also have an `AWS_RAM` key policy, which Resource Access
|
|
9016
|
+
# Manager (RAM) manages for KMS keys that you share through RAM. You
|
|
9017
|
+
# can't use `PutKeyPolicy` to create, change, or delete the `AWS_RAM`
|
|
9018
|
+
# key policy. If you set `PolicyName` to `AWS_RAM`, the request fails
|
|
9019
|
+
# with a `ValidationException` and the message `The AWS_RAM policy can
|
|
9020
|
+
# only be managed by the RAM service.` To view the `AWS_RAM` key policy,
|
|
9021
|
+
# use GetKeyPolicy. For information about sharing KMS keys, see [Sharing
|
|
9022
|
+
# KMS keys with RAM][4] in the *Key Management Service Developer Guide*.
|
|
9023
|
+
#
|
|
8855
9024
|
# **Cross-account use**: No. You cannot perform this operation on a KMS
|
|
8856
9025
|
# key in a different Amazon Web Services account.
|
|
8857
9026
|
#
|
|
8858
|
-
# **Required permissions**: [kms:PutKeyPolicy][
|
|
9027
|
+
# **Required permissions**: [kms:PutKeyPolicy][5] (key policy)
|
|
9028
|
+
#
|
|
9029
|
+
# You can use the [kms:PolicyName][6] condition key to control access to
|
|
9030
|
+
# this operation based on the value of the `PolicyName` parameter in the
|
|
9031
|
+
# request. If the request doesn't include `PolicyName`, the value of
|
|
9032
|
+
# `kms:PolicyName` is `default`.
|
|
8859
9033
|
#
|
|
8860
9034
|
# **Related operations**: GetKeyPolicy
|
|
8861
9035
|
#
|
|
8862
9036
|
# **Eventual consistency**: The KMS API follows an eventual consistency
|
|
8863
|
-
# model. For more information, see [KMS eventual consistency][
|
|
9037
|
+
# model. For more information, see [KMS eventual consistency][7].
|
|
8864
9038
|
#
|
|
8865
9039
|
#
|
|
8866
9040
|
#
|
|
8867
9041
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
|
|
8868
9042
|
# [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
|
|
8869
9043
|
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_PutKeyPolicy_section.html
|
|
8870
|
-
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
|
8871
|
-
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
|
9044
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-sharing-ram.html
|
|
9045
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
|
9046
|
+
# [6]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-policy-name
|
|
9047
|
+
# [7]: https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency
|
|
8872
9048
|
#
|
|
8873
9049
|
# @option params [required, String] :key_id
|
|
8874
9050
|
# Sets the key policy on the specified KMS key.
|
|
@@ -8887,7 +9063,12 @@ module Aws::KMS
|
|
|
8887
9063
|
#
|
|
8888
9064
|
# @option params [String] :policy_name
|
|
8889
9065
|
# The name of the key policy. If no policy name is specified, the
|
|
8890
|
-
# default value is `default`.
|
|
9066
|
+
# default value is `default`. Valid values are `default` and `AWS_RAM`,
|
|
9067
|
+
# but you can set only the `default` key policy. RAM manages the
|
|
9068
|
+
# `AWS_RAM` key policy for KMS keys that you share through RAM. If you
|
|
9069
|
+
# specify `AWS_RAM`, the request fails with a `ValidationException`, or
|
|
9070
|
+
# with an `AccessDeniedException` if you don't have permission to call
|
|
9071
|
+
# `PutKeyPolicy` with that policy name.
|
|
8891
9072
|
#
|
|
8892
9073
|
# @option params [required, String] :policy
|
|
8893
9074
|
# The key policy to attach to the KMS key.
|
|
@@ -8964,6 +9145,12 @@ module Aws::KMS
|
|
|
8964
9145
|
# is making the request from making a subsequent [PutKeyPolicy][2]
|
|
8965
9146
|
# request on the KMS key.
|
|
8966
9147
|
#
|
|
9148
|
+
# The key policy lockout safety check and the
|
|
9149
|
+
# `BypassPolicyLockoutSafetyCheck` parameter apply only to the `default`
|
|
9150
|
+
# key policy. The check evaluates only the new `default` key policy,
|
|
9151
|
+
# with `kms:PolicyName` set to `default`. It doesn't consider
|
|
9152
|
+
# permissions in the `AWS_RAM` key policy.
|
|
9153
|
+
#
|
|
8967
9154
|
#
|
|
8968
9155
|
#
|
|
8969
9156
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
|
|
@@ -11917,7 +12104,7 @@ module Aws::KMS
|
|
|
11917
12104
|
tracer: tracer
|
|
11918
12105
|
)
|
|
11919
12106
|
context[:gem_name] = 'aws-sdk-kms'
|
|
11920
|
-
context[:gem_version] = '1.
|
|
12107
|
+
context[:gem_version] = '1.144.0'
|
|
11921
12108
|
Seahorse::Client::Request.new(handlers, context)
|
|
11922
12109
|
end
|
|
11923
12110
|
|
|
@@ -214,6 +214,8 @@ module Aws::KMS
|
|
|
214
214
|
RegionType = Shapes::StringShape.new(name: 'RegionType')
|
|
215
215
|
ReplicateKeyRequest = Shapes::StructureShape.new(name: 'ReplicateKeyRequest')
|
|
216
216
|
ReplicateKeyResponse = Shapes::StructureShape.new(name: 'ReplicateKeyResponse')
|
|
217
|
+
ResourceOwnerType = Shapes::StringShape.new(name: 'ResourceOwnerType')
|
|
218
|
+
ResourceOwnersList = Shapes::ListShape.new(name: 'ResourceOwnersList')
|
|
217
219
|
RetireGrantRequest = Shapes::StructureShape.new(name: 'RetireGrantRequest')
|
|
218
220
|
RevokeGrantRequest = Shapes::StructureShape.new(name: 'RevokeGrantRequest')
|
|
219
221
|
RotateKeyOnDemandRequest = Shapes::StructureShape.new(name: 'RotateKeyOnDemandRequest')
|
|
@@ -844,6 +846,7 @@ module Aws::KMS
|
|
|
844
846
|
|
|
845
847
|
ListKeysRequest.add_member(:limit, Shapes::ShapeRef.new(shape: LimitType, location_name: "Limit"))
|
|
846
848
|
ListKeysRequest.add_member(:marker, Shapes::ShapeRef.new(shape: MarkerType, location_name: "Marker"))
|
|
849
|
+
ListKeysRequest.add_member(:resource_owners, Shapes::ShapeRef.new(shape: ResourceOwnersList, location_name: "ResourceOwners"))
|
|
847
850
|
ListKeysRequest.struct_class = Types::ListKeysRequest
|
|
848
851
|
|
|
849
852
|
ListKeysResponse.add_member(:keys, Shapes::ShapeRef.new(shape: KeyList, location_name: "Keys"))
|
|
@@ -932,6 +935,8 @@ module Aws::KMS
|
|
|
932
935
|
ReplicateKeyResponse.add_member(:replica_tags, Shapes::ShapeRef.new(shape: TagList, location_name: "ReplicaTags"))
|
|
933
936
|
ReplicateKeyResponse.struct_class = Types::ReplicateKeyResponse
|
|
934
937
|
|
|
938
|
+
ResourceOwnersList.member = Shapes::ShapeRef.new(shape: ResourceOwnerType)
|
|
939
|
+
|
|
935
940
|
RetireGrantRequest.add_member(:grant_token, Shapes::ShapeRef.new(shape: GrantTokenType, location_name: "GrantToken"))
|
|
936
941
|
RetireGrantRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, location_name: "KeyId"))
|
|
937
942
|
RetireGrantRequest.add_member(:grant_id, Shapes::ShapeRef.new(shape: GrantIdType, location_name: "GrantId"))
|
data/lib/aws-sdk-kms/types.rb
CHANGED
|
@@ -3759,7 +3759,7 @@ module Aws::KMS
|
|
|
3759
3759
|
end
|
|
3760
3760
|
|
|
3761
3761
|
# @!attribute [rw] key_id
|
|
3762
|
-
#
|
|
3762
|
+
# Identifies the KMS key whose key policy you want to get.
|
|
3763
3763
|
#
|
|
3764
3764
|
# Specify the key ID or key ARN of the KMS key.
|
|
3765
3765
|
#
|
|
@@ -3776,8 +3776,12 @@ module Aws::KMS
|
|
|
3776
3776
|
#
|
|
3777
3777
|
# @!attribute [rw] policy_name
|
|
3778
3778
|
# Specifies the name of the key policy. If no policy name is
|
|
3779
|
-
# specified, the default value is `default`.
|
|
3780
|
-
# `default`.
|
|
3779
|
+
# specified, the default value is `default`. Valid values are
|
|
3780
|
+
# `default` and `AWS_RAM`. Use `AWS_RAM` to get the key policy that
|
|
3781
|
+
# RAM manages for a KMS key that you share through RAM. If the KMS key
|
|
3782
|
+
# doesn't have an `AWS_RAM` key policy, the request fails with a
|
|
3783
|
+
# `NotFoundException`. To get the names of key policies, use
|
|
3784
|
+
# ListKeyPolicies.
|
|
3781
3785
|
# @return [String]
|
|
3782
3786
|
#
|
|
3783
3787
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyPolicyRequest AWS API Documentation
|
|
@@ -3794,7 +3798,16 @@ module Aws::KMS
|
|
|
3794
3798
|
# @return [String]
|
|
3795
3799
|
#
|
|
3796
3800
|
# @!attribute [rw] policy_name
|
|
3797
|
-
# The name of the key policy.
|
|
3801
|
+
# The name of the key policy. Valid values are:
|
|
3802
|
+
#
|
|
3803
|
+
# default
|
|
3804
|
+
#
|
|
3805
|
+
# : The key policy that you manage.
|
|
3806
|
+
#
|
|
3807
|
+
# AWS\_RAM
|
|
3808
|
+
#
|
|
3809
|
+
# : The key policy that RAM manages for KMS keys that you share
|
|
3810
|
+
# through RAM.
|
|
3798
3811
|
# @return [String]
|
|
3799
3812
|
#
|
|
3800
3813
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyPolicyResponse AWS API Documentation
|
|
@@ -5310,7 +5323,8 @@ module Aws::KMS
|
|
|
5310
5323
|
# and 1000, inclusive. If you do not include a value, it defaults to
|
|
5311
5324
|
# 100.
|
|
5312
5325
|
#
|
|
5313
|
-
#
|
|
5326
|
+
# A KMS key can have at most two key policies, `default` and
|
|
5327
|
+
# `AWS_RAM`.
|
|
5314
5328
|
# @return [Integer]
|
|
5315
5329
|
#
|
|
5316
5330
|
# @!attribute [rw] marker
|
|
@@ -5330,7 +5344,16 @@ module Aws::KMS
|
|
|
5330
5344
|
end
|
|
5331
5345
|
|
|
5332
5346
|
# @!attribute [rw] policy_names
|
|
5333
|
-
# A list of key policy names.
|
|
5347
|
+
# A list of key policy names. Valid values are:
|
|
5348
|
+
#
|
|
5349
|
+
# default
|
|
5350
|
+
#
|
|
5351
|
+
# : The key policy that you manage.
|
|
5352
|
+
#
|
|
5353
|
+
# AWS\_RAM
|
|
5354
|
+
#
|
|
5355
|
+
# : The key policy that RAM manages for KMS keys that you share
|
|
5356
|
+
# through RAM.
|
|
5334
5357
|
# @return [Array<String>]
|
|
5335
5358
|
#
|
|
5336
5359
|
# @!attribute [rw] next_marker
|
|
@@ -5455,17 +5478,61 @@ module Aws::KMS
|
|
|
5455
5478
|
# from the truncated response you just received.
|
|
5456
5479
|
# @return [String]
|
|
5457
5480
|
#
|
|
5481
|
+
# @!attribute [rw] resource_owners
|
|
5482
|
+
# Specifies whose KMS keys to list. Use this parameter to list KMS
|
|
5483
|
+
# keys that other Amazon Web Services accounts shared with your Amazon
|
|
5484
|
+
# Web Services account through Resource Access Manager (RAM).
|
|
5485
|
+
#
|
|
5486
|
+
# Specify one or two values. Valid values are:
|
|
5487
|
+
#
|
|
5488
|
+
# SELF
|
|
5489
|
+
#
|
|
5490
|
+
# : Lists the KMS keys in your Amazon Web Services account and Region.
|
|
5491
|
+
#
|
|
5492
|
+
# OTHER\_ACCOUNTS\_VIA\_RAM
|
|
5493
|
+
#
|
|
5494
|
+
# : Lists the KMS keys in the Region that other Amazon Web Services
|
|
5495
|
+
# accounts currently share with your Amazon Web Services account
|
|
5496
|
+
# through RAM. This list doesn't include KMS keys that your Amazon
|
|
5497
|
+
# Web Services account owns. For each of these KMS keys, the key ARN
|
|
5498
|
+
# in the response contains the account ID of the Amazon Web Services
|
|
5499
|
+
# account that owns the KMS key.
|
|
5500
|
+
#
|
|
5501
|
+
# If you omit this parameter, `ListKeys` lists only the KMS keys in
|
|
5502
|
+
# your Amazon Web Services account. If you specify both values, in
|
|
5503
|
+
# either order, `ListKeys` returns the KMS keys in your Amazon Web
|
|
5504
|
+
# Services account first, and then the KMS keys that other Amazon Web
|
|
5505
|
+
# Services accounts shared with you. A single response doesn't
|
|
5506
|
+
# contain both kinds of KMS keys.
|
|
5507
|
+
#
|
|
5508
|
+
# When `ResourceOwners` includes `OTHER_ACCOUNTS_VIA_RAM`, a response
|
|
5509
|
+
# can contain fewer KMS keys than the `Limit` value, or none, even
|
|
5510
|
+
# when `Truncated` is true. To get all of the KMS keys, continue
|
|
5511
|
+
# calling `ListKeys` with the `NextMarker` value from each response
|
|
5512
|
+
# until `Truncated` is false. Use a `NextMarker` value only in a
|
|
5513
|
+
# request that has the same `ResourceOwners` value as the request that
|
|
5514
|
+
# returned it. Otherwise, the request can fail with an
|
|
5515
|
+
# `InvalidMarkerException`.
|
|
5516
|
+
#
|
|
5517
|
+
# KMS keys that other Amazon Web Services accounts share with you can
|
|
5518
|
+
# take some time to appear in or disappear from the results after
|
|
5519
|
+
# changes to resource shares.
|
|
5520
|
+
# @return [Array<String>]
|
|
5521
|
+
#
|
|
5458
5522
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeysRequest AWS API Documentation
|
|
5459
5523
|
#
|
|
5460
5524
|
class ListKeysRequest < Struct.new(
|
|
5461
5525
|
:limit,
|
|
5462
|
-
:marker
|
|
5526
|
+
:marker,
|
|
5527
|
+
:resource_owners)
|
|
5463
5528
|
SENSITIVE = []
|
|
5464
5529
|
include Aws::Structure
|
|
5465
5530
|
end
|
|
5466
5531
|
|
|
5467
5532
|
# @!attribute [rw] keys
|
|
5468
|
-
# A list of KMS keys.
|
|
5533
|
+
# A list of KMS keys. For a KMS key that another Amazon Web Services
|
|
5534
|
+
# account shared with you through RAM, the key ARN contains the
|
|
5535
|
+
# account ID of the Amazon Web Services account that owns the KMS key.
|
|
5469
5536
|
# @return [Array<Types::KeyListEntry>]
|
|
5470
5537
|
#
|
|
5471
5538
|
# @!attribute [rw] next_marker
|
|
@@ -5725,7 +5792,12 @@ module Aws::KMS
|
|
|
5725
5792
|
#
|
|
5726
5793
|
# @!attribute [rw] policy_name
|
|
5727
5794
|
# The name of the key policy. If no policy name is specified, the
|
|
5728
|
-
# default value is `default`.
|
|
5795
|
+
# default value is `default`. Valid values are `default` and
|
|
5796
|
+
# `AWS_RAM`, but you can set only the `default` key policy. RAM
|
|
5797
|
+
# manages the `AWS_RAM` key policy for KMS keys that you share through
|
|
5798
|
+
# RAM. If you specify `AWS_RAM`, the request fails with a
|
|
5799
|
+
# `ValidationException`, or with an `AccessDeniedException` if you
|
|
5800
|
+
# don't have permission to call `PutKeyPolicy` with that policy name.
|
|
5729
5801
|
# @return [String]
|
|
5730
5802
|
#
|
|
5731
5803
|
# @!attribute [rw] policy
|
|
@@ -5807,6 +5879,12 @@ module Aws::KMS
|
|
|
5807
5879
|
# that is making the request from making a subsequent
|
|
5808
5880
|
# [PutKeyPolicy][2] request on the KMS key.
|
|
5809
5881
|
#
|
|
5882
|
+
# The key policy lockout safety check and the
|
|
5883
|
+
# `BypassPolicyLockoutSafetyCheck` parameter apply only to the
|
|
5884
|
+
# `default` key policy. The check evaluates only the new `default` key
|
|
5885
|
+
# policy, with `kms:PolicyName` set to `default`. It doesn't consider
|
|
5886
|
+
# permissions in the `AWS_RAM` key policy.
|
|
5887
|
+
#
|
|
5810
5888
|
#
|
|
5811
5889
|
#
|
|
5812
5890
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
|
data/lib/aws-sdk-kms.rb
CHANGED
data/sig/client.rbs
CHANGED
|
@@ -634,7 +634,8 @@ module Aws
|
|
|
634
634
|
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/KMS/Client.html#list_keys-instance_method
|
|
635
635
|
def list_keys: (
|
|
636
636
|
?limit: ::Integer,
|
|
637
|
-
?marker: ::String
|
|
637
|
+
?marker: ::String,
|
|
638
|
+
?resource_owners: Array[("SELF" | "OTHER_ACCOUNTS_VIA_RAM")]
|
|
638
639
|
) -> _ListKeysResponseSuccess
|
|
639
640
|
| (?Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ListKeysResponseSuccess
|
|
640
641
|
|
data/sig/types.rbs
CHANGED
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.
|
|
4
|
+
version: 1.144.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Amazon Web Services
|
|
@@ -18,7 +18,7 @@ dependencies:
|
|
|
18
18
|
version: '3'
|
|
19
19
|
- - ">="
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 3.
|
|
21
|
+
version: 3.269.0
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -28,7 +28,7 @@ dependencies:
|
|
|
28
28
|
version: '3'
|
|
29
29
|
- - ">="
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
|
-
version: 3.
|
|
31
|
+
version: 3.269.0
|
|
32
32
|
- !ruby/object:Gem::Dependency
|
|
33
33
|
name: aws-sigv4
|
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|