aws-sdk-kms 1.125.0 → 1.128.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: 44466e74f7e07d9f61fcbee606018257fba134bf9c92db73acf9fe5a92215868
4
- data.tar.gz: 3f566bc6ab1342aeec3493816de438632f95af581ffbf4ebaf80224f1bf0b102
3
+ metadata.gz: 73210444b9fa683dcdacac83f659ddf907506ad8e74e6cacf39421dde614383a
4
+ data.tar.gz: 247f1d057d4a3b9f397ab499769ee97095a355ec15463c6ad91d82967a498287
5
5
  SHA512:
6
- metadata.gz: 267934fc68e734fb9f762aab74a4fa8a9c4b1dfad9bbdf284d8880da0835e28e51e8e52b8808c5e2b95ff57b823bf16d6e0d51d045e479416da40bbf0520bfa2
7
- data.tar.gz: 68e3b0cbb7c0caa85d35ed59f62d49265cfcf7c9fe2b9157e5b7cdbc89764ea2da3468476c3042df5132e6502e89fd5f7eaed16c49b5a0084b2842ea72e898c8
6
+ metadata.gz: 7fd145827e2919287e137f20f3145b7daa1b648f1f1da435f4f29a5eeeb2b3354de6a35383b24075cd3e471aeac58ef017dcee6f4a6f2d14fea6e7e748cd2ada
7
+ data.tar.gz: 63b5bda764beef1d9bb4da0f14fe562569531912198bd3fea13859fd222b1a35f8c86c0b8ee9fa4f2f3a96aabfa1ccaf3dcd1207e763d52f7b7af4fb3a9e703e
data/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.128.0 (2026-05-21)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.127.0 (2026-05-20)
10
+ ------------------
11
+
12
+ * Feature - AWS KMS now supports creating grants for AWS service principals using new GranteeServicePrincipal and RetiringServicePrincipal parameters. This release adds SourceArn grant constraint and three condition keys for controlling CreateGrant access. For more information, see Grants in AWS KMS.
13
+
14
+ 1.126.0 (2026-05-19)
15
+ ------------------
16
+
17
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
18
+
4
19
  1.125.0 (2026-05-13)
5
20
  ------------------
6
21
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.125.0
1
+ 1.128.0
@@ -199,7 +199,7 @@ module Aws::KMS
199
199
  # the required types.
200
200
  #
201
201
  # @option options [Boolean] :correct_clock_skew (true)
202
- # Used only in `standard` and adaptive retry modes. Specifies whether to apply
202
+ # Used only in `standard` and `adaptive` retry modes. Specifies whether to apply
203
203
  # a clock skew correction and retry requests with skewed client clocks.
204
204
  #
205
205
  # @option options [String] :defaults_mode ("legacy")
@@ -323,17 +323,15 @@ module Aws::KMS
323
323
  # @option options [String] :retry_mode ("legacy")
324
324
  # Specifies which retry algorithm to use. Values are:
325
325
  #
326
- # * `legacy` - The pre-existing retry behavior. This is default value if
327
- # no retry mode is provided.
326
+ # * `legacy` - The pre-existing retry behavior. This is the default
327
+ # value if no retry mode is provided.
328
328
  #
329
329
  # * `standard` - A standardized set of retry rules across the AWS SDKs.
330
330
  # This includes support for retry quotas, which limit the number of
331
331
  # unsuccessful retries a client can make.
332
332
  #
333
- # * `adaptive` - An experimental retry mode that includes all the
334
- # functionality of `standard` mode along with automatic client side
335
- # throttling. This is a provisional mode that may change behavior
336
- # in the future.
333
+ # * `adaptive` - A retry mode that includes all the functionality of
334
+ # `standard` mode along with automatic client side throttling.
337
335
  #
338
336
  # @option options [String] :sdk_ua_app_id
339
337
  # A unique and opaque application ID that is appended to the
@@ -1247,6 +1245,12 @@ module Aws::KMS
1247
1245
  # temporary permissions because you can create one, use its permissions,
1248
1246
  # and delete it without changing your key policies or IAM policies.
1249
1247
  #
1248
+ # You can create a grant for an Amazon Web Services principal (IAM user,
1249
+ # IAM role, or Amazon Web Services account) by specifying the
1250
+ # `GranteePrincipal` parameter. You can also create a grant for an
1251
+ # Amazon Web Services service principal by specifying the
1252
+ # `GranteeServicePrincipal` parameter.
1253
+ #
1250
1254
  # For detailed information about grants, including grant terminology,
1251
1255
  # see [Grants in KMS][1] in the <i> <i>Key Management Service Developer
1252
1256
  # Guide</i> </i>. For examples of creating grants in several programming
@@ -1320,7 +1324,7 @@ module Aws::KMS
1320
1324
  # To get the key ID and key ARN for a KMS key, use ListKeys or
1321
1325
  # DescribeKey.
1322
1326
  #
1323
- # @option params [required, String] :grantee_principal
1327
+ # @option params [String] :grantee_principal
1324
1328
  # The identity that gets the permissions specified in the grant.
1325
1329
  #
1326
1330
  # To specify the grantee principal, use the Amazon Resource Name (ARN)
@@ -1330,6 +1334,9 @@ module Aws::KMS
1330
1334
  # [IAM ARNs][1] in the <i> <i>Identity and Access Management User
1331
1335
  # Guide</i> </i>.
1332
1336
  #
1337
+ # You must specify either `GranteePrincipal` or
1338
+ # `GranteeServicePrincipal`, but not both.
1339
+ #
1333
1340
  #
1334
1341
  #
1335
1342
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
@@ -1350,6 +1357,9 @@ module Aws::KMS
1350
1357
  # see RevokeGrant and [Retiring and revoking grants][3] in the *Key
1351
1358
  # Management Service Developer Guide*.
1352
1359
  #
1360
+ # You can specify either `RetiringPrincipal` or
1361
+ # `RetiringServicePrincipal`, but not both.
1362
+ #
1353
1363
  #
1354
1364
  #
1355
1365
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
@@ -1378,39 +1388,52 @@ module Aws::KMS
1378
1388
  # This field may be displayed in plaintext in CloudTrail logs and other
1379
1389
  # output.
1380
1390
  #
1381
- # KMS supports the `EncryptionContextEquals` and
1382
- # `EncryptionContextSubset` grant constraints, which allow the
1383
- # permissions in the grant only when the encryption context in the
1384
- # request matches (`EncryptionContextEquals`) or includes
1385
- # (`EncryptionContextSubset`) the encryption context specified in the
1386
- # constraint.
1387
- #
1388
- # The encryption context grant constraints are supported only on [grant
1389
- # operations][1] that include an `EncryptionContext` parameter, such as
1390
- # cryptographic operations on symmetric encryption KMS keys. Grants with
1391
- # grant constraints can include the DescribeKey and RetireGrant
1392
- # operations, but the constraint doesn't apply to these operations. If
1393
- # a grant with a grant constraint includes the `CreateGrant` operation,
1394
- # the constraint requires that any grants created with the `CreateGrant`
1395
- # permission have an equally strict or stricter encryption context
1396
- # constraint.
1397
- #
1398
- # You cannot use an encryption context grant constraint for
1399
- # cryptographic operations with asymmetric KMS keys or HMAC KMS keys.
1400
- # Operations with these keys don't support an encryption context.
1401
- #
1402
- # Each constraint value can include up to 8 encryption context pairs.
1403
- # The encryption context value in each constraint cannot exceed 384
1404
- # characters. For information about grant constraints, see [Using grant
1405
- # constraints][2] in the *Key Management Service Developer Guide*. For
1406
- # more information about encryption context, see [Encryption context][3]
1407
- # in the <i> <i>Key Management Service Developer Guide</i> </i>.
1391
+ # KMS supports the following grant constraints.
1392
+ #
1393
+ # * `EncryptionContextEquals` and `EncryptionContextSubset` These
1394
+ # encryption context grant constraints allow the permissions in the
1395
+ # grant only when the encryption context in the request matches
1396
+ # (`EncryptionContextEquals`) or includes (`EncryptionContextSubset`)
1397
+ # the encryption context specified in the constraint.
1398
+ #
1399
+ # Encryption context grant constraints are supported only on [grant
1400
+ # operations][1] that include an `EncryptionContext` parameter, such
1401
+ # as cryptographic operations on symmetric encryption KMS keys. You
1402
+ # cannot use an encryption context grant constraint for cryptographic
1403
+ # operations with asymmetric KMS keys or HMAC KMS keys. Operations
1404
+ # with these keys don't support an encryption context. Grants with
1405
+ # encryption context grant constraints can include the DescribeKey and
1406
+ # RetireGrant operations, but the constraint doesn't apply to these
1407
+ # operations. If a grant with an encryption context grant constraint
1408
+ # includes the `CreateGrant` operation, the constraint requires that
1409
+ # any grants created with the `CreateGrant` permission have an equally
1410
+ # strict or stricter encryption context constraint.
1411
+ #
1412
+ # Each constraint value can include up to 8 encryption context pairs.
1413
+ # The encryption context value in each constraint cannot exceed 384
1414
+ # characters. For more information about encryption context, see
1415
+ # [Encryption context][2] in the <i> <i>Key Management Service
1416
+ # Developer Guide</i> </i>.
1417
+ #
1418
+ # * `SourceArn` — This grant constraint allows the permissions in the
1419
+ # grant only when the request is made on behalf of a specific Amazon
1420
+ # Web Services resource, identified by its [Amazon Resource Name
1421
+ # (ARN)][3]. This is effectively the same as having the
1422
+ # [aws:SourceArn][4] global condition key in the grant. The SourceArn
1423
+ # constraint is supported on grants for all types of KMS keys and can
1424
+ # also be applied to the DescribeKey operation when specified in the
1425
+ # request. However, it does not apply to RetireGrant operation.
1426
+ #
1427
+ # For information about grant constraints, see [Using grant
1428
+ # constraints][5] in the *Key Management Service Developer Guide*.
1408
1429
  #
1409
1430
  #
1410
1431
  #
1411
1432
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations
1412
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
1413
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
1433
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
1434
+ # [3]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1435
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn
1436
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
1414
1437
  #
1415
1438
  # @option params [Array<String>] :grant_tokens
1416
1439
  # A list of grant tokens.
@@ -1456,6 +1479,32 @@ module Aws::KMS
1456
1479
  #
1457
1480
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
1458
1481
  #
1482
+ # @option params [String] :grantee_service_principal
1483
+ # The Amazon Web Services [service principal][1] that gets the
1484
+ # permissions specified in the grant.
1485
+ #
1486
+ # When you specify a `GranteeServicePrincipal`, you must also specify a
1487
+ # `SourceArn` grant constraint. In addition, you must specify either a
1488
+ # `RetiringPrincipal` or a `RetiringServicePrincipal`.
1489
+ #
1490
+ # You must specify either `GranteePrincipal` or
1491
+ # `GranteeServicePrincipal`, but not both.
1492
+ #
1493
+ #
1494
+ #
1495
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
1496
+ #
1497
+ # @option params [String] :retiring_service_principal
1498
+ # The Amazon Web Services [service principal][1] that has permission to
1499
+ # use the RetireGrant operation to retire the grant.
1500
+ #
1501
+ # You can specify either `RetiringPrincipal` or
1502
+ # `RetiringServicePrincipal`, but not both.
1503
+ #
1504
+ #
1505
+ #
1506
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
1507
+ #
1459
1508
  # @return [Types::CreateGrantResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1460
1509
  #
1461
1510
  # * {Types::CreateGrantResponse#grant_token #grant_token} => String
@@ -1481,11 +1530,38 @@ module Aws::KMS
1481
1530
  # grant_token: "AQpAM2RhZTk1MGMyNTk2ZmZmMzEyYWVhOWViN2I1MWM4Mzc0MWFiYjc0ZDE1ODkyNGFlNTIzODZhMzgyZjBlNGY3NiKIAgEBAgB4Pa6VDCWW__MSrqnre1HIN0Grt00ViSSuUjhqOC8OT3YAAADfMIHcBgkqhkiG9w0BBwaggc4wgcsCAQAwgcUGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMmqLyBTAegIn9XlK5AgEQgIGXZQjkBcl1dykDdqZBUQ6L1OfUivQy7JVYO2-ZJP7m6f1g8GzV47HX5phdtONAP7K_HQIflcgpkoCqd_fUnE114mSmiagWkbQ5sqAVV3ov-VeqgrvMe5ZFEWLMSluvBAqdjHEdMIkHMlhlj4ENZbzBfo9Wxk8b8SnwP4kc4gGivedzFXo-dwN8fxjjq_ZZ9JFOj2ijIbj5FyogDCN0drOfi8RORSEuCEmPvjFRMFAwcmwFkN2NPp89amA", # The grant token.
1482
1531
  # }
1483
1532
  #
1533
+ # @example Example: To create a grant for a service principal
1534
+ #
1535
+ # # The following example creates a grant that allows the specified AWS service principal to encrypt and decrypt data with
1536
+ # # the specified KMS key. The grant includes a SourceArn constraint that restricts the grant permissions to requests
1537
+ # # associated with the specified DynamoDB table.
1538
+ #
1539
+ # resp = client.create_grant({
1540
+ # constraints: {
1541
+ # source_arn: "arn:aws:dynamodb:us-east-2:444455556666:table/ExampleTable",
1542
+ # }, # The SourceArn grant constraint restricts the grant permissions to requests associated with the specified AWS resource.
1543
+ # grantee_service_principal: "service-name.amazonaws.com", # The AWS service principal that is given permission to perform the operations specified in the grant.
1544
+ # key_id: "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key to which the grant applies. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
1545
+ # operations: [
1546
+ # "Encrypt",
1547
+ # "Decrypt",
1548
+ # "GenerateDataKey",
1549
+ # "DescribeKey",
1550
+ # ], # A list of operations that the grant allows.
1551
+ # retiring_service_principal: "service-name.amazonaws.com", # The AWS service principal that can retire the grant.
1552
+ # })
1553
+ #
1554
+ # resp.to_h outputs the following:
1555
+ # {
1556
+ # grant_id: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2", # The unique identifier of the grant.
1557
+ # grant_token: "AQpAM2RhZTk1MGMyNTk2ZmZmMzEyYWVhOWViN2I1MWM4Mzc0MWFiYjc0ZDE1ODkyNGFlNTIzODZhMzgyZjBlNGY3NiKIAgEBAgB4Pa6VDCWW...", # The grant token.
1558
+ # }
1559
+ #
1484
1560
  # @example Request syntax with placeholder values
1485
1561
  #
1486
1562
  # resp = client.create_grant({
1487
1563
  # key_id: "KeyIdType", # required
1488
- # grantee_principal: "PrincipalIdType", # required
1564
+ # grantee_principal: "PrincipalIdType",
1489
1565
  # retiring_principal: "PrincipalIdType",
1490
1566
  # operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, Sign, Verify, GetPublicKey, CreateGrant, RetireGrant, DescribeKey, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, GenerateMac, VerifyMac, DeriveSharedSecret
1491
1567
  # constraints: {
@@ -1495,10 +1571,13 @@ module Aws::KMS
1495
1571
  # encryption_context_equals: {
1496
1572
  # "EncryptionContextKey" => "EncryptionContextValue",
1497
1573
  # },
1574
+ # source_arn: "GrantConstraintSourceArnType",
1498
1575
  # },
1499
1576
  # grant_tokens: ["GrantTokenType"],
1500
1577
  # name: "GrantNameType",
1501
1578
  # dry_run: false,
1579
+ # grantee_service_principal: "ServicePrincipalType",
1580
+ # retiring_service_principal: "ServicePrincipalType",
1502
1581
  # })
1503
1582
  #
1504
1583
  # @example Response structure
@@ -7456,7 +7535,7 @@ module Aws::KMS
7456
7535
  # Gets a list of all grants for the specified KMS key.
7457
7536
  #
7458
7537
  # You must specify the KMS key in all requests. You can filter the grant
7459
- # list by grant ID or grantee principal.
7538
+ # list by grant ID, grantee principal, or grantee service principal.
7460
7539
  #
7461
7540
  # For detailed information about grants, including grant terminology,
7462
7541
  # see [Grants in KMS][1] in the <i> <i>Key Management Service Developer
@@ -7464,12 +7543,18 @@ module Aws::KMS
7464
7543
  # languages, see [Use CreateGrant with an Amazon Web Services SDK or
7465
7544
  # CLI][2].
7466
7545
  #
7467
- # <note markdown="1"> The `GranteePrincipal` field in the `ListGrants` response usually
7468
- # contains the user or role designated as the grantee principal in the
7469
- # grant. However, when the grantee principal in the grant is an Amazon
7470
- # Web Services service, the `GranteePrincipal` field contains the
7471
- # [service principal][3], which might represent several different
7472
- # grantee principals.
7546
+ # <note markdown="1"> When a grant is created with the `GranteePrincipal` field, the
7547
+ # `ListGrants` response usually contains the user or role designated as
7548
+ # the grantee principal in the grant. However, if the grantee principal
7549
+ # is an Amazon Web Services service, the `GranteePrincipal` field
7550
+ # contains an Amazon Web Services [service principal][3], which might
7551
+ # correspond to several different grantee principals, such as an IAM
7552
+ # user, IAM role, or Amazon Web Services account.
7553
+ #
7554
+ # When a grant is created with the `GranteeServicePrincipal` field, the
7555
+ # `ListGrants` response always includes a `GranteeServicePrincipal` that
7556
+ # indicates the grantee is actually an Amazon Web Services [service
7557
+ # principal][3].
7473
7558
  #
7474
7559
  # </note>
7475
7560
  #
@@ -7538,6 +7623,17 @@ module Aws::KMS
7538
7623
  # Returns only grants where the specified principal is the grantee
7539
7624
  # principal for the grant.
7540
7625
  #
7626
+ # You can specify either `GranteePrincipal` or
7627
+ # `GranteeServicePrincipal`, but not both.
7628
+ #
7629
+ # @option params [String] :grantee_service_principal
7630
+ # Returns only grants where the specified Amazon Web Services service
7631
+ # principal is the grantee service principal for the grant. This filter
7632
+ # is only usable by callers in a service principal.
7633
+ #
7634
+ # You can specify either `GranteePrincipal` or
7635
+ # `GranteeServicePrincipal`, but not both.
7636
+ #
7541
7637
  # @return [Types::ListGrantsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
7542
7638
  #
7543
7639
  # * {Types::ListGrantsResponse#grants #grants} => Array&lt;Types::GrantListEntry&gt;
@@ -7613,6 +7709,40 @@ module Aws::KMS
7613
7709
  # truncated: true, # 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.
7614
7710
  # }
7615
7711
  #
7712
+ # @example Example: To list grants for a grantee service principal
7713
+ #
7714
+ # # The following example lists grants for the specified KMS key that were created with a GranteeServicePrincipal. The
7715
+ # # response includes the GranteeServicePrincipal, RetiringServicePrincipal, and SourceArn constraint fields.
7716
+ #
7717
+ # resp = client.list_grants({
7718
+ # grantee_service_principal: "service-name.amazonaws.com", # Returns only grants where the specified AWS service principal is the grantee service principal.
7719
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the KMS key whose grants you want to list. You can use the key ID or the Amazon Resource Name (ARN) of the KMS key.
7720
+ # })
7721
+ #
7722
+ # resp.to_h outputs the following:
7723
+ # {
7724
+ # grants: [
7725
+ # {
7726
+ # constraints: {
7727
+ # source_arn: "arn:aws:dynamodb:us-east-2:111122223333:table/ExampleTable",
7728
+ # },
7729
+ # creation_date: Time.parse("2026-03-06T10:15:00-08:00"),
7730
+ # grant_id: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
7731
+ # grantee_service_principal: "service-name.amazonaws.com",
7732
+ # issuing_account: "arn:aws:iam::111122223333:root",
7733
+ # key_id: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
7734
+ # operations: [
7735
+ # "Encrypt",
7736
+ # "Decrypt",
7737
+ # "GenerateDataKey",
7738
+ # "DescribeKey",
7739
+ # ],
7740
+ # retiring_service_principal: "service-name.amazonaws.com",
7741
+ # },
7742
+ # ], # A list of grants.
7743
+ # 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.
7744
+ # }
7745
+ #
7616
7746
  # @example Request syntax with placeholder values
7617
7747
  #
7618
7748
  # resp = client.list_grants({
@@ -7621,6 +7751,7 @@ module Aws::KMS
7621
7751
  # key_id: "KeyIdType", # required
7622
7752
  # grant_id: "GrantIdType",
7623
7753
  # grantee_principal: "PrincipalIdType",
7754
+ # grantee_service_principal: "ServicePrincipalType",
7624
7755
  # })
7625
7756
  #
7626
7757
  # @example Response structure
@@ -7639,6 +7770,9 @@ module Aws::KMS
7639
7770
  # resp.grants[0].constraints.encryption_context_subset["EncryptionContextKey"] #=> String
7640
7771
  # resp.grants[0].constraints.encryption_context_equals #=> Hash
7641
7772
  # resp.grants[0].constraints.encryption_context_equals["EncryptionContextKey"] #=> String
7773
+ # resp.grants[0].constraints.source_arn #=> String
7774
+ # resp.grants[0].grantee_service_principal #=> String
7775
+ # resp.grants[0].retiring_service_principal #=> String
7642
7776
  # resp.next_marker #=> String
7643
7777
  # resp.truncated #=> Boolean
7644
7778
  #
@@ -8141,7 +8275,8 @@ module Aws::KMS
8141
8275
  end
8142
8276
 
8143
8277
  # Returns information about all grants in the Amazon Web Services
8144
- # account and Region that have the specified retiring principal.
8278
+ # account and Region that have the specified retiring principal or
8279
+ # retiring service principal.
8145
8280
  #
8146
8281
  # You can specify any principal in your Amazon Web Services account. The
8147
8282
  # grants that are returned include grants for KMS keys in your Amazon
@@ -8166,12 +8301,16 @@ module Aws::KMS
8166
8301
  # **Required permissions**: [kms:ListRetirableGrants][3] (IAM policy) in
8167
8302
  # your Amazon Web Services account.
8168
8303
  #
8169
- # <note markdown="1"> KMS authorizes `ListRetirableGrants` requests by evaluating the caller
8170
- # account's kms:ListRetirableGrants permissions. The authorized
8171
- # resource in `ListRetirableGrants` calls is the retiring principal
8172
- # specified in the request. KMS does not evaluate the caller's
8173
- # permissions to verify their access to any KMS keys or grants that
8174
- # might be returned by the `ListRetirableGrants` call.
8304
+ # <note markdown="1"> When listing retirable grants by `RetiringPrincipal`, KMS authorizes
8305
+ # `ListRetirableGrants` requests by evaluating the caller account's
8306
+ # kms:ListRetirableGrants permissions. The authorized resource in
8307
+ # `ListRetirableGrants` calls is the retiring principal specified in the
8308
+ # request. KMS does not evaluate the caller's permissions to verify
8309
+ # their access to any KMS keys or grants that might be returned by the
8310
+ # `ListRetirableGrants` call.
8311
+ #
8312
+ # The `RetiringServicePrincipal` filter is only usable by callers in a
8313
+ # service principal.
8175
8314
  #
8176
8315
  # </note>
8177
8316
  #
@@ -8208,7 +8347,7 @@ module Aws::KMS
8208
8347
  # response with truncated results. Set it to the value of `NextMarker`
8209
8348
  # from the truncated response you just received.
8210
8349
  #
8211
- # @option params [required, String] :retiring_principal
8350
+ # @option params [String] :retiring_principal
8212
8351
  # The retiring principal for which to list grants. Enter a principal in
8213
8352
  # your Amazon Web Services account.
8214
8353
  #
@@ -8219,11 +8358,21 @@ module Aws::KMS
8219
8358
  # principal, see [IAM ARNs][2] in the <i> <i>Identity and Access
8220
8359
  # Management User Guide</i> </i>.
8221
8360
  #
8361
+ # You must specify either `RetiringPrincipal` or
8362
+ # `RetiringServicePrincipal`, but not both.
8363
+ #
8222
8364
  #
8223
8365
  #
8224
8366
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
8225
8367
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
8226
8368
  #
8369
+ # @option params [String] :retiring_service_principal
8370
+ # The retiring service principal for which to list grants. This filter
8371
+ # is only usable by callers in a service principal.
8372
+ #
8373
+ # You must specify either `RetiringPrincipal` or
8374
+ # `RetiringServicePrincipal`, but not both.
8375
+ #
8227
8376
  # @return [Types::ListGrantsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
8228
8377
  #
8229
8378
  # * {Types::ListGrantsResponse#grants #grants} => Array&lt;Types::GrantListEntry&gt;
@@ -8260,12 +8409,45 @@ module Aws::KMS
8260
8409
  # 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.
8261
8410
  # }
8262
8411
  #
8412
+ # @example Example: To list grants that the specified service principal can retire
8413
+ #
8414
+ # # The following example lists the grants that the specified AWS service principal can retire.
8415
+ #
8416
+ # resp = client.list_retirable_grants({
8417
+ # retiring_service_principal: "service-name.amazonaws.com", # The retiring service principal whose grants you want to list. Use the AWS service principal name of the service (for example, service-name.amazonaws.com).
8418
+ # })
8419
+ #
8420
+ # resp.to_h outputs the following:
8421
+ # {
8422
+ # grants: [
8423
+ # {
8424
+ # constraints: {
8425
+ # source_arn: "arn:aws:dynamodb:us-east-2:444455556666:table/ExampleTable",
8426
+ # },
8427
+ # creation_date: Time.parse("2026-03-06T10:15:00-08:00"),
8428
+ # grant_id: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
8429
+ # grantee_service_principal: "service-name.amazonaws.com",
8430
+ # issuing_account: "arn:aws:iam::444455556666:root",
8431
+ # key_id: "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab",
8432
+ # operations: [
8433
+ # "Encrypt",
8434
+ # "Decrypt",
8435
+ # "GenerateDataKey",
8436
+ # "DescribeKey",
8437
+ # ],
8438
+ # retiring_service_principal: "service-name.amazonaws.com",
8439
+ # },
8440
+ # ], # A list of grants that the specified service principal can retire.
8441
+ # 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.
8442
+ # }
8443
+ #
8263
8444
  # @example Request syntax with placeholder values
8264
8445
  #
8265
8446
  # resp = client.list_retirable_grants({
8266
8447
  # limit: 1,
8267
8448
  # marker: "MarkerType",
8268
- # retiring_principal: "PrincipalIdType", # required
8449
+ # retiring_principal: "PrincipalIdType",
8450
+ # retiring_service_principal: "ServicePrincipalType",
8269
8451
  # })
8270
8452
  #
8271
8453
  # @example Response structure
@@ -8284,6 +8466,9 @@ module Aws::KMS
8284
8466
  # resp.grants[0].constraints.encryption_context_subset["EncryptionContextKey"] #=> String
8285
8467
  # resp.grants[0].constraints.encryption_context_equals #=> Hash
8286
8468
  # resp.grants[0].constraints.encryption_context_equals["EncryptionContextKey"] #=> String
8469
+ # resp.grants[0].constraints.source_arn #=> String
8470
+ # resp.grants[0].grantee_service_principal #=> String
8471
+ # resp.grants[0].retiring_service_principal #=> String
8287
8472
  # resp.next_marker #=> String
8288
8473
  # resp.truncated #=> Boolean
8289
8474
  #
@@ -8518,6 +8703,13 @@ module Aws::KMS
8518
8703
  # key state. For details, see [Key states of KMS keys][6] in the *Key
8519
8704
  # Management Service Developer Guide*.
8520
8705
  #
8706
+ # <note markdown="1"> When using grants with `SourceArn` constraints for `ReEncrypt`
8707
+ # operations, the grants on both the source KMS key (for
8708
+ # `ReEncryptFrom`) and the destination KMS key (for `ReEncryptTo`) must
8709
+ # specify the same `SourceArn` value.
8710
+ #
8711
+ # </note>
8712
+ #
8521
8713
  # **Cross-account use**: Yes. The source KMS key and destination KMS key
8522
8714
  # can be in different Amazon Web Services accounts. Either or both KMS
8523
8715
  # keys can be in a different account than the caller. To specify a KMS
@@ -11363,7 +11555,7 @@ module Aws::KMS
11363
11555
  tracer: tracer
11364
11556
  )
11365
11557
  context[:gem_name] = 'aws-sdk-kms'
11366
- context[:gem_version] = '1.125.0'
11558
+ context[:gem_version] = '1.128.0'
11367
11559
  Seahorse::Client::Request.new(handlers, context)
11368
11560
  end
11369
11561
 
@@ -118,6 +118,7 @@ module Aws::KMS
118
118
  GetParametersForImportResponse = Shapes::StructureShape.new(name: 'GetParametersForImportResponse')
119
119
  GetPublicKeyRequest = Shapes::StructureShape.new(name: 'GetPublicKeyRequest')
120
120
  GetPublicKeyResponse = Shapes::StructureShape.new(name: 'GetPublicKeyResponse')
121
+ GrantConstraintSourceArnType = Shapes::StringShape.new(name: 'GrantConstraintSourceArnType')
121
122
  GrantConstraints = Shapes::StructureShape.new(name: 'GrantConstraints')
122
123
  GrantIdType = Shapes::StringShape.new(name: 'GrantIdType')
123
124
  GrantList = Shapes::ListShape.new(name: 'GrantList')
@@ -217,6 +218,7 @@ module Aws::KMS
217
218
  RotationsListEntry = Shapes::StructureShape.new(name: 'RotationsListEntry')
218
219
  ScheduleKeyDeletionRequest = Shapes::StructureShape.new(name: 'ScheduleKeyDeletionRequest')
219
220
  ScheduleKeyDeletionResponse = Shapes::StructureShape.new(name: 'ScheduleKeyDeletionResponse')
221
+ ServicePrincipalType = Shapes::StringShape.new(name: 'ServicePrincipalType')
220
222
  SignRequest = Shapes::StructureShape.new(name: 'SignRequest')
221
223
  SignResponse = Shapes::StructureShape.new(name: 'SignResponse')
222
224
  SigningAlgorithmSpec = Shapes::StringShape.new(name: 'SigningAlgorithmSpec')
@@ -326,13 +328,15 @@ module Aws::KMS
326
328
  CreateCustomKeyStoreResponse.struct_class = Types::CreateCustomKeyStoreResponse
327
329
 
328
330
  CreateGrantRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
329
- CreateGrantRequest.add_member(:grantee_principal, Shapes::ShapeRef.new(shape: PrincipalIdType, required: true, location_name: "GranteePrincipal"))
331
+ CreateGrantRequest.add_member(:grantee_principal, Shapes::ShapeRef.new(shape: PrincipalIdType, location_name: "GranteePrincipal"))
330
332
  CreateGrantRequest.add_member(:retiring_principal, Shapes::ShapeRef.new(shape: PrincipalIdType, location_name: "RetiringPrincipal"))
331
333
  CreateGrantRequest.add_member(:operations, Shapes::ShapeRef.new(shape: GrantOperationList, required: true, location_name: "Operations"))
332
334
  CreateGrantRequest.add_member(:constraints, Shapes::ShapeRef.new(shape: GrantConstraints, location_name: "Constraints"))
333
335
  CreateGrantRequest.add_member(:grant_tokens, Shapes::ShapeRef.new(shape: GrantTokenList, location_name: "GrantTokens"))
334
336
  CreateGrantRequest.add_member(:name, Shapes::ShapeRef.new(shape: GrantNameType, location_name: "Name"))
335
337
  CreateGrantRequest.add_member(:dry_run, Shapes::ShapeRef.new(shape: NullableBooleanType, location_name: "DryRun"))
338
+ CreateGrantRequest.add_member(:grantee_service_principal, Shapes::ShapeRef.new(shape: ServicePrincipalType, location_name: "GranteeServicePrincipal"))
339
+ CreateGrantRequest.add_member(:retiring_service_principal, Shapes::ShapeRef.new(shape: ServicePrincipalType, location_name: "RetiringServicePrincipal"))
336
340
  CreateGrantRequest.struct_class = Types::CreateGrantRequest
337
341
 
338
342
  CreateGrantResponse.add_member(:grant_token, Shapes::ShapeRef.new(shape: GrantTokenType, location_name: "GrantToken"))
@@ -631,6 +635,7 @@ module Aws::KMS
631
635
 
632
636
  GrantConstraints.add_member(:encryption_context_subset, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContextSubset"))
633
637
  GrantConstraints.add_member(:encryption_context_equals, Shapes::ShapeRef.new(shape: EncryptionContextType, location_name: "EncryptionContextEquals"))
638
+ GrantConstraints.add_member(:source_arn, Shapes::ShapeRef.new(shape: GrantConstraintSourceArnType, location_name: "SourceArn"))
634
639
  GrantConstraints.struct_class = Types::GrantConstraints
635
640
 
636
641
  GrantList.member = Shapes::ShapeRef.new(shape: GrantListEntry)
@@ -644,6 +649,8 @@ module Aws::KMS
644
649
  GrantListEntry.add_member(:issuing_account, Shapes::ShapeRef.new(shape: PrincipalIdType, location_name: "IssuingAccount"))
645
650
  GrantListEntry.add_member(:operations, Shapes::ShapeRef.new(shape: GrantOperationList, location_name: "Operations"))
646
651
  GrantListEntry.add_member(:constraints, Shapes::ShapeRef.new(shape: GrantConstraints, location_name: "Constraints"))
652
+ GrantListEntry.add_member(:grantee_service_principal, Shapes::ShapeRef.new(shape: ServicePrincipalType, location_name: "GranteeServicePrincipal"))
653
+ GrantListEntry.add_member(:retiring_service_principal, Shapes::ShapeRef.new(shape: ServicePrincipalType, location_name: "RetiringServicePrincipal"))
647
654
  GrantListEntry.struct_class = Types::GrantListEntry
648
655
 
649
656
  GrantOperationList.member = Shapes::ShapeRef.new(shape: GrantOperation)
@@ -772,6 +779,7 @@ module Aws::KMS
772
779
  ListGrantsRequest.add_member(:key_id, Shapes::ShapeRef.new(shape: KeyIdType, required: true, location_name: "KeyId"))
773
780
  ListGrantsRequest.add_member(:grant_id, Shapes::ShapeRef.new(shape: GrantIdType, location_name: "GrantId"))
774
781
  ListGrantsRequest.add_member(:grantee_principal, Shapes::ShapeRef.new(shape: PrincipalIdType, location_name: "GranteePrincipal"))
782
+ ListGrantsRequest.add_member(:grantee_service_principal, Shapes::ShapeRef.new(shape: ServicePrincipalType, location_name: "GranteeServicePrincipal"))
775
783
  ListGrantsRequest.struct_class = Types::ListGrantsRequest
776
784
 
777
785
  ListGrantsResponse.add_member(:grants, Shapes::ShapeRef.new(shape: GrantList, location_name: "Grants"))
@@ -821,7 +829,8 @@ module Aws::KMS
821
829
 
822
830
  ListRetirableGrantsRequest.add_member(:limit, Shapes::ShapeRef.new(shape: LimitType, location_name: "Limit"))
823
831
  ListRetirableGrantsRequest.add_member(:marker, Shapes::ShapeRef.new(shape: MarkerType, location_name: "Marker"))
824
- ListRetirableGrantsRequest.add_member(:retiring_principal, Shapes::ShapeRef.new(shape: PrincipalIdType, required: true, location_name: "RetiringPrincipal"))
832
+ ListRetirableGrantsRequest.add_member(:retiring_principal, Shapes::ShapeRef.new(shape: PrincipalIdType, location_name: "RetiringPrincipal"))
833
+ ListRetirableGrantsRequest.add_member(:retiring_service_principal, Shapes::ShapeRef.new(shape: ServicePrincipalType, location_name: "RetiringServicePrincipal"))
825
834
  ListRetirableGrantsRequest.struct_class = Types::ListRetirableGrantsRequest
826
835
 
827
836
  MacAlgorithmSpecList.member = Shapes::ShapeRef.new(shape: MacAlgorithmSpec)
@@ -605,6 +605,9 @@ module Aws::KMS
605
605
  # see [IAM ARNs][1] in the <i> <i>Identity and Access Management User
606
606
  # Guide</i> </i>.
607
607
  #
608
+ # You must specify either `GranteePrincipal` or
609
+ # `GranteeServicePrincipal`, but not both.
610
+ #
608
611
  #
609
612
  #
610
613
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
@@ -626,6 +629,9 @@ module Aws::KMS
626
629
  # details, see RevokeGrant and [Retiring and revoking grants][3] in
627
630
  # the *Key Management Service Developer Guide*.
628
631
  #
632
+ # You can specify either `RetiringPrincipal` or
633
+ # `RetiringServicePrincipal`, but not both.
634
+ #
629
635
  #
630
636
  #
631
637
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
@@ -656,40 +662,55 @@ module Aws::KMS
656
662
  # This field may be displayed in plaintext in CloudTrail logs and
657
663
  # other output.
658
664
  #
659
- # KMS supports the `EncryptionContextEquals` and
660
- # `EncryptionContextSubset` grant constraints, which allow the
661
- # permissions in the grant only when the encryption context in the
662
- # request matches (`EncryptionContextEquals`) or includes
663
- # (`EncryptionContextSubset`) the encryption context specified in the
664
- # constraint.
665
- #
666
- # The encryption context grant constraints are supported only on
667
- # [grant operations][1] that include an `EncryptionContext` parameter,
668
- # such as cryptographic operations on symmetric encryption KMS keys.
669
- # Grants with grant constraints can include the DescribeKey and
670
- # RetireGrant operations, but the constraint doesn't apply to these
671
- # operations. If a grant with a grant constraint includes the
672
- # `CreateGrant` operation, the constraint requires that any grants
673
- # created with the `CreateGrant` permission have an equally strict or
674
- # stricter encryption context constraint.
675
- #
676
- # You cannot use an encryption context grant constraint for
677
- # cryptographic operations with asymmetric KMS keys or HMAC KMS keys.
678
- # Operations with these keys don't support an encryption context.
679
- #
680
- # Each constraint value can include up to 8 encryption context pairs.
681
- # The encryption context value in each constraint cannot exceed 384
682
- # characters. For information about grant constraints, see [Using
683
- # grant constraints][2] in the *Key Management Service Developer
684
- # Guide*. For more information about encryption context, see
685
- # [Encryption context][3] in the <i> <i>Key Management Service
686
- # Developer Guide</i> </i>.
665
+ # KMS supports the following grant constraints.
666
+ #
667
+ # * `EncryptionContextEquals` and `EncryptionContextSubset` These
668
+ # encryption context grant constraints allow the permissions in the
669
+ # grant only when the encryption context in the request matches
670
+ # (`EncryptionContextEquals`) or includes
671
+ # (`EncryptionContextSubset`) the encryption context specified in
672
+ # the constraint.
673
+ #
674
+ # Encryption context grant constraints are supported only on [grant
675
+ # operations][1] that include an `EncryptionContext` parameter, such
676
+ # as cryptographic operations on symmetric encryption KMS keys. You
677
+ # cannot use an encryption context grant constraint for
678
+ # cryptographic operations with asymmetric KMS keys or HMAC KMS
679
+ # keys. Operations with these keys don't support an encryption
680
+ # context. Grants with encryption context grant constraints can
681
+ # include the DescribeKey and RetireGrant operations, but the
682
+ # constraint doesn't apply to these operations. If a grant with an
683
+ # encryption context grant constraint includes the `CreateGrant`
684
+ # operation, the constraint requires that any grants created with
685
+ # the `CreateGrant` permission have an equally strict or stricter
686
+ # encryption context constraint.
687
+ #
688
+ # Each constraint value can include up to 8 encryption context
689
+ # pairs. The encryption context value in each constraint cannot
690
+ # exceed 384 characters. For more information about encryption
691
+ # context, see [Encryption context][2] in the <i> <i>Key Management
692
+ # Service Developer Guide</i> </i>.
693
+ #
694
+ # * `SourceArn` — This grant constraint allows the permissions in the
695
+ # grant only when the request is made on behalf of a specific Amazon
696
+ # Web Services resource, identified by its [Amazon Resource Name
697
+ # (ARN)][3]. This is effectively the same as having the
698
+ # [aws:SourceArn][4] global condition key in the grant. The
699
+ # SourceArn constraint is supported on grants for all types of KMS
700
+ # keys and can also be applied to the DescribeKey operation when
701
+ # specified in the request. However, it does not apply to
702
+ # RetireGrant operation.
703
+ #
704
+ # For information about grant constraints, see [Using grant
705
+ # constraints][5] in the *Key Management Service Developer Guide*.
687
706
  #
688
707
  #
689
708
  #
690
709
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations
691
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
692
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
710
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
711
+ # [3]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
712
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn
713
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
693
714
  # @return [Types::GrantConstraints]
694
715
  #
695
716
  # @!attribute [rw] grant_tokens
@@ -739,6 +760,34 @@ module Aws::KMS
739
760
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
740
761
  # @return [Boolean]
741
762
  #
763
+ # @!attribute [rw] grantee_service_principal
764
+ # The Amazon Web Services [service principal][1] that gets the
765
+ # permissions specified in the grant.
766
+ #
767
+ # When you specify a `GranteeServicePrincipal`, you must also specify
768
+ # a `SourceArn` grant constraint. In addition, you must specify either
769
+ # a `RetiringPrincipal` or a `RetiringServicePrincipal`.
770
+ #
771
+ # You must specify either `GranteePrincipal` or
772
+ # `GranteeServicePrincipal`, but not both.
773
+ #
774
+ #
775
+ #
776
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
777
+ # @return [String]
778
+ #
779
+ # @!attribute [rw] retiring_service_principal
780
+ # The Amazon Web Services [service principal][1] that has permission
781
+ # to use the RetireGrant operation to retire the grant.
782
+ #
783
+ # You can specify either `RetiringPrincipal` or
784
+ # `RetiringServicePrincipal`, but not both.
785
+ #
786
+ #
787
+ #
788
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
789
+ # @return [String]
790
+ #
742
791
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateGrantRequest AWS API Documentation
743
792
  #
744
793
  class CreateGrantRequest < Struct.new(
@@ -749,7 +798,9 @@ module Aws::KMS
749
798
  :constraints,
750
799
  :grant_tokens,
751
800
  :name,
752
- :dry_run)
801
+ :dry_run,
802
+ :grantee_service_principal,
803
+ :retiring_service_principal)
753
804
  SENSITIVE = []
754
805
  include Aws::Structure
755
806
  end
@@ -3851,36 +3902,49 @@ module Aws::KMS
3851
3902
  end
3852
3903
 
3853
3904
  # Use this structure to allow [cryptographic operations][1] in the grant
3854
- # only when the operation request includes the specified [encryption
3855
- # context][2].
3905
+ # only when the operation request meets the specified constraints.
3856
3906
  #
3857
- # KMS applies the grant constraints only to cryptographic operations
3858
- # that support an encryption context, that is, all cryptographic
3859
- # operations with a symmetric KMS key. Grant constraints are not applied
3860
- # to operations that do not support an encryption context, such as
3861
- # cryptographic operations with asymmetric KMS keys and management
3862
- # operations, such as DescribeKey or RetireGrant.
3907
+ # KMS supports the following grant constraints:
3863
3908
  #
3864
- # In a cryptographic operation, the encryption context in the decryption
3865
- # operation must be an exact, case-sensitive match for the keys and
3866
- # values in the encryption context of the encryption operation. Only the
3867
- # order of the pairs can vary.
3909
+ # * `EncryptionContextEquals` and `EncryptionContextSubset` These
3910
+ # encryption context constraints apply only to cryptographic
3911
+ # operations that support an encryption context, that is, all
3912
+ # cryptographic operations with a symmetric KMS key. Encryption
3913
+ # context grant constraints are not applied to operations that do not
3914
+ # support an encryption context, such as cryptographic operations with
3915
+ # asymmetric KMS keys and management operations, such as DescribeKey
3916
+ # or RetireGrant.
3868
3917
  #
3869
- # However, in a grant constraint, the key in each key-value pair is not
3870
- # case sensitive, but the value is case sensitive.
3918
+ # In a cryptographic operation, the encryption context in the
3919
+ # decryption operation must be an exact, case-sensitive match for the
3920
+ # keys and values in the encryption context of the encryption
3921
+ # operation. Only the order of the pairs can vary.
3871
3922
  #
3872
- # To avoid confusion, do not use multiple encryption context pairs that
3873
- # differ only by case. To require a fully case-sensitive encryption
3874
- # context, use the `kms:EncryptionContext:` and
3875
- # `kms:EncryptionContextKeys` conditions in an IAM or key policy. For
3876
- # details, see [kms:EncryptionContext:context-key][3] in the <i> <i>Key
3877
- # Management Service Developer Guide</i> </i>.
3923
+ # However, in a grant constraint, the key in each key-value pair is
3924
+ # not case sensitive, but the value is case sensitive.
3925
+ #
3926
+ # To avoid confusion, do not use multiple encryption context pairs
3927
+ # that differ only by case. To require a fully case-sensitive
3928
+ # encryption context, use the `kms:EncryptionContext:` and
3929
+ # `kms:EncryptionContextKeys` conditions in an IAM or key policy. For
3930
+ # details, see [kms:EncryptionContext:context-key][2] in the <i>
3931
+ # <i>Key Management Service Developer Guide</i> </i>.
3932
+ #
3933
+ # * `SourceArn` — This grant constraint allows the permissions in the
3934
+ # grant only when the request is made on behalf of a specific Amazon
3935
+ # Web Services resource, identified by its [Amazon Resource Name
3936
+ # (ARN)][3]. This is effectively the same as having the
3937
+ # [aws:SourceArn][4] global condition key in the grant. The SourceArn
3938
+ # constraint is supported on grants for all types of KMS keys and can
3939
+ # also be applied to the DescribeKey operation when specified in the
3940
+ # request. However, it does not apply to RetireGrant operation.
3878
3941
  #
3879
3942
  #
3880
3943
  #
3881
3944
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
3882
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/encrypt_context.html
3883
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-encryption-context
3945
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-encryption-context
3946
+ # [3]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
3947
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn
3884
3948
  #
3885
3949
  # @!attribute [rw] encryption_context_subset
3886
3950
  # A list of key-value pairs that must be included in the encryption
@@ -3905,11 +3969,26 @@ module Aws::KMS
3905
3969
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations
3906
3970
  # @return [Hash<String,String>]
3907
3971
  #
3972
+ # @!attribute [rw] source_arn
3973
+ # The [ Amazon Resource Name (ARN)][1] of an Amazon Web Services
3974
+ # resource on behalf of which the request is made. This is effectively
3975
+ # the same as having the [aws:SourceArn][2] global condition key in
3976
+ # the grant. The SourceArn constraint ensures that the principal can
3977
+ # use the KMS key only when the request is made on behalf of the
3978
+ # specified resource.
3979
+ #
3980
+ #
3981
+ #
3982
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
3983
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn
3984
+ # @return [String]
3985
+ #
3908
3986
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GrantConstraints AWS API Documentation
3909
3987
  #
3910
3988
  class GrantConstraints < Struct.new(
3911
3989
  :encryption_context_subset,
3912
- :encryption_context_equals)
3990
+ :encryption_context_equals,
3991
+ :source_arn)
3913
3992
  SENSITIVE = []
3914
3993
  include Aws::Structure
3915
3994
  end
@@ -3937,12 +4016,13 @@ module Aws::KMS
3937
4016
  # @!attribute [rw] grantee_principal
3938
4017
  # The identity that gets the permissions in the grant.
3939
4018
  #
3940
- # The `GranteePrincipal` field in the `ListGrants` response usually
3941
- # contains the user or role designated as the grantee principal in the
3942
- # grant. However, when the grantee principal in the grant is an Amazon
3943
- # Web Services service, the `GranteePrincipal` field contains the
3944
- # [service principal][1], which might represent several different
3945
- # grantee principals.
4019
+ # When a grant is created with the `GranteePrincipal` field, the
4020
+ # `ListGrants` response usually contains the user or role designated
4021
+ # as the grantee principal in the grant. However, if the grantee
4022
+ # principal is an Amazon Web Services service, the `GranteePrincipal`
4023
+ # field contains an Amazon Web Services [service principal][1], which
4024
+ # might correspond to several different grantee principals, such as an
4025
+ # IAM user, IAM role, or Amazon Web Services account.
3946
4026
  #
3947
4027
  #
3948
4028
  #
@@ -3962,10 +4042,28 @@ module Aws::KMS
3962
4042
  # @return [Array<String>]
3963
4043
  #
3964
4044
  # @!attribute [rw] constraints
3965
- # A list of key-value pairs that must be present in the encryption
3966
- # context of certain subsequent operations that the grant allows.
4045
+ # The constraints on the grant, such as encryption context pairs or a
4046
+ # SourceArn, that restrict the subsequent operations the grant allows.
3967
4047
  # @return [Types::GrantConstraints]
3968
4048
  #
4049
+ # @!attribute [rw] grantee_service_principal
4050
+ # The Amazon Web Services [service principal][1] that gets the
4051
+ # permissions in the grant.
4052
+ #
4053
+ #
4054
+ #
4055
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
4056
+ # @return [String]
4057
+ #
4058
+ # @!attribute [rw] retiring_service_principal
4059
+ # The Amazon Web Services [service principal][1] that can retire the
4060
+ # grant.
4061
+ #
4062
+ #
4063
+ #
4064
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
4065
+ # @return [String]
4066
+ #
3969
4067
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GrantListEntry AWS API Documentation
3970
4068
  #
3971
4069
  class GrantListEntry < Struct.new(
@@ -3977,7 +4075,9 @@ module Aws::KMS
3977
4075
  :retiring_principal,
3978
4076
  :issuing_account,
3979
4077
  :operations,
3980
- :constraints)
4078
+ :constraints,
4079
+ :grantee_service_principal,
4080
+ :retiring_service_principal)
3981
4081
  SENSITIVE = []
3982
4082
  include Aws::Structure
3983
4083
  end
@@ -4887,6 +4987,18 @@ module Aws::KMS
4887
4987
  # @!attribute [rw] grantee_principal
4888
4988
  # Returns only grants where the specified principal is the grantee
4889
4989
  # principal for the grant.
4990
+ #
4991
+ # You can specify either `GranteePrincipal` or
4992
+ # `GranteeServicePrincipal`, but not both.
4993
+ # @return [String]
4994
+ #
4995
+ # @!attribute [rw] grantee_service_principal
4996
+ # Returns only grants where the specified Amazon Web Services service
4997
+ # principal is the grantee service principal for the grant. This
4998
+ # filter is only usable by callers in a service principal.
4999
+ #
5000
+ # You can specify either `GranteePrincipal` or
5001
+ # `GranteeServicePrincipal`, but not both.
4890
5002
  # @return [String]
4891
5003
  #
4892
5004
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListGrantsRequest AWS API Documentation
@@ -4896,7 +5008,8 @@ module Aws::KMS
4896
5008
  :marker,
4897
5009
  :key_id,
4898
5010
  :grant_id,
4899
- :grantee_principal)
5011
+ :grantee_principal,
5012
+ :grantee_service_principal)
4900
5013
  SENSITIVE = []
4901
5014
  include Aws::Structure
4902
5015
  end
@@ -5241,18 +5354,30 @@ module Aws::KMS
5241
5354
  # syntax for a principal, see [IAM ARNs][2] in the <i> <i>Identity and
5242
5355
  # Access Management User Guide</i> </i>.
5243
5356
  #
5357
+ # You must specify either `RetiringPrincipal` or
5358
+ # `RetiringServicePrincipal`, but not both.
5359
+ #
5244
5360
  #
5245
5361
  #
5246
5362
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
5247
5363
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
5248
5364
  # @return [String]
5249
5365
  #
5366
+ # @!attribute [rw] retiring_service_principal
5367
+ # The retiring service principal for which to list grants. This filter
5368
+ # is only usable by callers in a service principal.
5369
+ #
5370
+ # You must specify either `RetiringPrincipal` or
5371
+ # `RetiringServicePrincipal`, but not both.
5372
+ # @return [String]
5373
+ #
5250
5374
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListRetirableGrantsRequest AWS API Documentation
5251
5375
  #
5252
5376
  class ListRetirableGrantsRequest < Struct.new(
5253
5377
  :limit,
5254
5378
  :marker,
5255
- :retiring_principal)
5379
+ :retiring_principal,
5380
+ :retiring_service_principal)
5256
5381
  SENSITIVE = []
5257
5382
  include Aws::Structure
5258
5383
  end
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.125.0'
57
+ GEM_VERSION = '1.128.0'
58
58
 
59
59
  end
60
60
 
data/sig/client.rbs CHANGED
@@ -136,16 +136,19 @@ module Aws
136
136
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/KMS/Client.html#create_grant-instance_method
137
137
  def create_grant: (
138
138
  key_id: ::String,
139
- grantee_principal: ::String,
139
+ ?grantee_principal: ::String,
140
140
  ?retiring_principal: ::String,
141
141
  operations: Array[("Decrypt" | "Encrypt" | "GenerateDataKey" | "GenerateDataKeyWithoutPlaintext" | "ReEncryptFrom" | "ReEncryptTo" | "Sign" | "Verify" | "GetPublicKey" | "CreateGrant" | "RetireGrant" | "DescribeKey" | "GenerateDataKeyPair" | "GenerateDataKeyPairWithoutPlaintext" | "GenerateMac" | "VerifyMac" | "DeriveSharedSecret")],
142
142
  ?constraints: {
143
143
  encryption_context_subset: Hash[::String, ::String]?,
144
- encryption_context_equals: Hash[::String, ::String]?
144
+ encryption_context_equals: Hash[::String, ::String]?,
145
+ source_arn: ::String?
145
146
  },
146
147
  ?grant_tokens: Array[::String],
147
148
  ?name: ::String,
148
- ?dry_run: bool
149
+ ?dry_run: bool,
150
+ ?grantee_service_principal: ::String,
151
+ ?retiring_service_principal: ::String
149
152
  ) -> _CreateGrantResponseSuccess
150
153
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _CreateGrantResponseSuccess
151
154
 
@@ -167,7 +170,7 @@ module Aws
167
170
  {
168
171
  tag_key: ::String,
169
172
  tag_value: ::String
170
- },
173
+ }
171
174
  ],
172
175
  ?multi_region: bool,
173
176
  ?xks_key_id: ::String
@@ -554,7 +557,8 @@ module Aws
554
557
  ?marker: ::String,
555
558
  key_id: ::String,
556
559
  ?grant_id: ::String,
557
- ?grantee_principal: ::String
560
+ ?grantee_principal: ::String,
561
+ ?grantee_service_principal: ::String
558
562
  ) -> _ListGrantsResponseSuccess
559
563
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ListGrantsResponseSuccess
560
564
 
@@ -624,9 +628,10 @@ module Aws
624
628
  def list_retirable_grants: (
625
629
  ?limit: ::Integer,
626
630
  ?marker: ::String,
627
- retiring_principal: ::String
631
+ ?retiring_principal: ::String,
632
+ ?retiring_service_principal: ::String
628
633
  ) -> _ListRetirableGrantsResponseSuccess
629
- | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ListRetirableGrantsResponseSuccess
634
+ | (?Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ListRetirableGrantsResponseSuccess
630
635
 
631
636
  # https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/KMS/Client.html#put_key_policy-instance_method
632
637
  def put_key_policy: (
@@ -679,7 +684,7 @@ module Aws
679
684
  {
680
685
  tag_key: ::String,
681
686
  tag_value: ::String
682
- },
687
+ }
683
688
  ]
684
689
  ) -> _ReplicateKeyResponseSuccess
685
690
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> _ReplicateKeyResponseSuccess
@@ -749,7 +754,7 @@ module Aws
749
754
  {
750
755
  tag_key: ::String,
751
756
  tag_value: ::String
752
- },
757
+ }
753
758
  ]
754
759
  ) -> ::Seahorse::Client::_ResponseSuccess[::Aws::EmptyStructure]
755
760
  | (Hash[Symbol, untyped] params, ?Hash[Symbol, untyped] options) -> ::Seahorse::Client::_ResponseSuccess[::Aws::EmptyStructure]
data/sig/types.rbs CHANGED
@@ -105,6 +105,8 @@ module Aws::KMS
105
105
  attr_accessor grant_tokens: ::Array[::String]
106
106
  attr_accessor name: ::String
107
107
  attr_accessor dry_run: bool
108
+ attr_accessor grantee_service_principal: ::String
109
+ attr_accessor retiring_service_principal: ::String
108
110
  SENSITIVE: []
109
111
  end
110
112
 
@@ -504,6 +506,7 @@ module Aws::KMS
504
506
  class GrantConstraints
505
507
  attr_accessor encryption_context_subset: ::Hash[::String, ::String]
506
508
  attr_accessor encryption_context_equals: ::Hash[::String, ::String]
509
+ attr_accessor source_arn: ::String
507
510
  SENSITIVE: []
508
511
  end
509
512
 
@@ -517,6 +520,8 @@ module Aws::KMS
517
520
  attr_accessor issuing_account: ::String
518
521
  attr_accessor operations: ::Array[("Decrypt" | "Encrypt" | "GenerateDataKey" | "GenerateDataKeyWithoutPlaintext" | "ReEncryptFrom" | "ReEncryptTo" | "Sign" | "Verify" | "GetPublicKey" | "CreateGrant" | "RetireGrant" | "DescribeKey" | "GenerateDataKeyPair" | "GenerateDataKeyPairWithoutPlaintext" | "GenerateMac" | "VerifyMac" | "DeriveSharedSecret")]
519
522
  attr_accessor constraints: Types::GrantConstraints
523
+ attr_accessor grantee_service_principal: ::String
524
+ attr_accessor retiring_service_principal: ::String
520
525
  SENSITIVE: []
521
526
  end
522
527
 
@@ -687,6 +692,7 @@ module Aws::KMS
687
692
  attr_accessor key_id: ::String
688
693
  attr_accessor grant_id: ::String
689
694
  attr_accessor grantee_principal: ::String
695
+ attr_accessor grantee_service_principal: ::String
690
696
  SENSITIVE: []
691
697
  end
692
698
 
@@ -757,6 +763,7 @@ module Aws::KMS
757
763
  attr_accessor limit: ::Integer
758
764
  attr_accessor marker: ::String
759
765
  attr_accessor retiring_principal: ::String
766
+ attr_accessor retiring_service_principal: ::String
760
767
  SENSITIVE: []
761
768
  end
762
769
 
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.125.0
4
+ version: 1.128.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.247.0
21
+ version: 3.248.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.247.0
31
+ version: 3.248.0
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: aws-sigv4
34
34
  requirement: !ruby/object:Gem::Requirement