aws-sdk-kms 1.126.0 → 1.127.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: c94db880c07cf474a7477cc0a343551da01c1fea7a5024ed027c55c833bb83e9
4
- data.tar.gz: 659d938f5770c4a0e2608c81e1e11ca5af15aa95140b5aeb6c42c7473baa3af7
3
+ metadata.gz: 2d556d3ec1e524527a7b2eb7dcf96ca11a86e4ab16ac4ebdb3d338ac587e35ab
4
+ data.tar.gz: 5a124b294ba49e9510aa1407e570212366c5d924d0550f669514c2c1994107ad
5
5
  SHA512:
6
- metadata.gz: a5730036659c21dd75c19d7909051f9d5d05621cbebcf8daa87131e779afd2b300fb0418718d5851e99dd22d85c4896a9cb06ab503e49048773058d78ac1670c
7
- data.tar.gz: d6e90a4afdf170c2f9446759c4e1c05631e494ee5bf5a8cf9b1596b1fb1c397204aa1df3cc16c1ef223c90db905787f3cb9965024cf891d7670e3661e1086b1d
6
+ metadata.gz: 7937d16fa417362f0407e057391c5a8646822570d46b18ef64bc05c300ef5947a881a02cd68b20048c1934a2811fb2695fad94bcb61ccbaa2b498339deb862e7
7
+ data.tar.gz: 70feb3f0078fc73cf116bc92c8edc44f9d46e124012e396f9116e072c78401227b8bd81ae4018e7eea5679c3bee52a7fcc534e0191ff7dc35f02e89df74acf3b
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.127.0 (2026-05-20)
5
+ ------------------
6
+
7
+ * 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.
8
+
4
9
  1.126.0 (2026-05-19)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.126.0
1
+ 1.127.0
@@ -1247,6 +1247,12 @@ module Aws::KMS
1247
1247
  # temporary permissions because you can create one, use its permissions,
1248
1248
  # and delete it without changing your key policies or IAM policies.
1249
1249
  #
1250
+ # You can create a grant for an Amazon Web Services principal (IAM user,
1251
+ # IAM role, or Amazon Web Services account) by specifying the
1252
+ # `GranteePrincipal` parameter. You can also create a grant for an
1253
+ # Amazon Web Services service principal by specifying the
1254
+ # `GranteeServicePrincipal` parameter.
1255
+ #
1250
1256
  # For detailed information about grants, including grant terminology,
1251
1257
  # see [Grants in KMS][1] in the <i> <i>Key Management Service Developer
1252
1258
  # Guide</i> </i>. For examples of creating grants in several programming
@@ -1320,7 +1326,7 @@ module Aws::KMS
1320
1326
  # To get the key ID and key ARN for a KMS key, use ListKeys or
1321
1327
  # DescribeKey.
1322
1328
  #
1323
- # @option params [required, String] :grantee_principal
1329
+ # @option params [String] :grantee_principal
1324
1330
  # The identity that gets the permissions specified in the grant.
1325
1331
  #
1326
1332
  # To specify the grantee principal, use the Amazon Resource Name (ARN)
@@ -1330,6 +1336,9 @@ module Aws::KMS
1330
1336
  # [IAM ARNs][1] in the <i> <i>Identity and Access Management User
1331
1337
  # Guide</i> </i>.
1332
1338
  #
1339
+ # You must specify either `GranteePrincipal` or
1340
+ # `GranteeServicePrincipal`, but not both.
1341
+ #
1333
1342
  #
1334
1343
  #
1335
1344
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
@@ -1350,6 +1359,9 @@ module Aws::KMS
1350
1359
  # see RevokeGrant and [Retiring and revoking grants][3] in the *Key
1351
1360
  # Management Service Developer Guide*.
1352
1361
  #
1362
+ # You can specify either `RetiringPrincipal` or
1363
+ # `RetiringServicePrincipal`, but not both.
1364
+ #
1353
1365
  #
1354
1366
  #
1355
1367
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
@@ -1378,39 +1390,52 @@ module Aws::KMS
1378
1390
  # This field may be displayed in plaintext in CloudTrail logs and other
1379
1391
  # output.
1380
1392
  #
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>.
1393
+ # KMS supports the following grant constraints.
1394
+ #
1395
+ # * `EncryptionContextEquals` and `EncryptionContextSubset` These
1396
+ # encryption context grant constraints allow the permissions in the
1397
+ # grant only when the encryption context in the request matches
1398
+ # (`EncryptionContextEquals`) or includes (`EncryptionContextSubset`)
1399
+ # the encryption context specified in the constraint.
1400
+ #
1401
+ # Encryption context grant constraints are supported only on [grant
1402
+ # operations][1] that include an `EncryptionContext` parameter, such
1403
+ # as cryptographic operations on symmetric encryption KMS keys. You
1404
+ # cannot use an encryption context grant constraint for cryptographic
1405
+ # operations with asymmetric KMS keys or HMAC KMS keys. Operations
1406
+ # with these keys don't support an encryption context. Grants with
1407
+ # encryption context grant constraints can include the DescribeKey and
1408
+ # RetireGrant operations, but the constraint doesn't apply to these
1409
+ # operations. If a grant with an encryption context grant constraint
1410
+ # includes the `CreateGrant` operation, the constraint requires that
1411
+ # any grants created with the `CreateGrant` permission have an equally
1412
+ # strict or stricter encryption context constraint.
1413
+ #
1414
+ # Each constraint value can include up to 8 encryption context pairs.
1415
+ # The encryption context value in each constraint cannot exceed 384
1416
+ # characters. For more information about encryption context, see
1417
+ # [Encryption context][2] in the <i> <i>Key Management Service
1418
+ # Developer Guide</i> </i>.
1419
+ #
1420
+ # * `SourceArn` — This grant constraint allows the permissions in the
1421
+ # grant only when the request is made on behalf of a specific Amazon
1422
+ # Web Services resource, identified by its [Amazon Resource Name
1423
+ # (ARN)][3]. This is effectively the same as having the
1424
+ # [aws:SourceArn][4] global condition key in the grant. The SourceArn
1425
+ # constraint is supported on grants for all types of KMS keys and can
1426
+ # also be applied to the DescribeKey operation when specified in the
1427
+ # request. However, it does not apply to RetireGrant operation.
1428
+ #
1429
+ # For information about grant constraints, see [Using grant
1430
+ # constraints][5] in the *Key Management Service Developer Guide*.
1408
1431
  #
1409
1432
  #
1410
1433
  #
1411
1434
  # [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
1435
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
1436
+ # [3]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
1437
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourcearn
1438
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
1414
1439
  #
1415
1440
  # @option params [Array<String>] :grant_tokens
1416
1441
  # A list of grant tokens.
@@ -1456,6 +1481,32 @@ module Aws::KMS
1456
1481
  #
1457
1482
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/testing-permissions.html
1458
1483
  #
1484
+ # @option params [String] :grantee_service_principal
1485
+ # The Amazon Web Services [service principal][1] that gets the
1486
+ # permissions specified in the grant.
1487
+ #
1488
+ # When you specify a `GranteeServicePrincipal`, you must also specify a
1489
+ # `SourceArn` grant constraint. In addition, you must specify either a
1490
+ # `RetiringPrincipal` or a `RetiringServicePrincipal`.
1491
+ #
1492
+ # You must specify either `GranteePrincipal` or
1493
+ # `GranteeServicePrincipal`, but not both.
1494
+ #
1495
+ #
1496
+ #
1497
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
1498
+ #
1499
+ # @option params [String] :retiring_service_principal
1500
+ # The Amazon Web Services [service principal][1] that has permission to
1501
+ # use the RetireGrant operation to retire the grant.
1502
+ #
1503
+ # You can specify either `RetiringPrincipal` or
1504
+ # `RetiringServicePrincipal`, but not both.
1505
+ #
1506
+ #
1507
+ #
1508
+ # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
1509
+ #
1459
1510
  # @return [Types::CreateGrantResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1460
1511
  #
1461
1512
  # * {Types::CreateGrantResponse#grant_token #grant_token} => String
@@ -1481,11 +1532,38 @@ module Aws::KMS
1481
1532
  # grant_token: "AQpAM2RhZTk1MGMyNTk2ZmZmMzEyYWVhOWViN2I1MWM4Mzc0MWFiYjc0ZDE1ODkyNGFlNTIzODZhMzgyZjBlNGY3NiKIAgEBAgB4Pa6VDCWW__MSrqnre1HIN0Grt00ViSSuUjhqOC8OT3YAAADfMIHcBgkqhkiG9w0BBwaggc4wgcsCAQAwgcUGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMmqLyBTAegIn9XlK5AgEQgIGXZQjkBcl1dykDdqZBUQ6L1OfUivQy7JVYO2-ZJP7m6f1g8GzV47HX5phdtONAP7K_HQIflcgpkoCqd_fUnE114mSmiagWkbQ5sqAVV3ov-VeqgrvMe5ZFEWLMSluvBAqdjHEdMIkHMlhlj4ENZbzBfo9Wxk8b8SnwP4kc4gGivedzFXo-dwN8fxjjq_ZZ9JFOj2ijIbj5FyogDCN0drOfi8RORSEuCEmPvjFRMFAwcmwFkN2NPp89amA", # The grant token.
1482
1533
  # }
1483
1534
  #
1535
+ # @example Example: To create a grant for a service principal
1536
+ #
1537
+ # # The following example creates a grant that allows the specified AWS service principal to encrypt and decrypt data with
1538
+ # # the specified KMS key. The grant includes a SourceArn constraint that restricts the grant permissions to requests
1539
+ # # associated with the specified DynamoDB table.
1540
+ #
1541
+ # resp = client.create_grant({
1542
+ # constraints: {
1543
+ # source_arn: "arn:aws:dynamodb:us-east-2:444455556666:table/ExampleTable",
1544
+ # }, # The SourceArn grant constraint restricts the grant permissions to requests associated with the specified AWS resource.
1545
+ # grantee_service_principal: "service-name.amazonaws.com", # The AWS service principal that is given permission to perform the operations specified in the grant.
1546
+ # 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.
1547
+ # operations: [
1548
+ # "Encrypt",
1549
+ # "Decrypt",
1550
+ # "GenerateDataKey",
1551
+ # "DescribeKey",
1552
+ # ], # A list of operations that the grant allows.
1553
+ # retiring_service_principal: "service-name.amazonaws.com", # The AWS service principal that can retire the grant.
1554
+ # })
1555
+ #
1556
+ # resp.to_h outputs the following:
1557
+ # {
1558
+ # grant_id: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2", # The unique identifier of the grant.
1559
+ # grant_token: "AQpAM2RhZTk1MGMyNTk2ZmZmMzEyYWVhOWViN2I1MWM4Mzc0MWFiYjc0ZDE1ODkyNGFlNTIzODZhMzgyZjBlNGY3NiKIAgEBAgB4Pa6VDCWW...", # The grant token.
1560
+ # }
1561
+ #
1484
1562
  # @example Request syntax with placeholder values
1485
1563
  #
1486
1564
  # resp = client.create_grant({
1487
1565
  # key_id: "KeyIdType", # required
1488
- # grantee_principal: "PrincipalIdType", # required
1566
+ # grantee_principal: "PrincipalIdType",
1489
1567
  # retiring_principal: "PrincipalIdType",
1490
1568
  # operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, Sign, Verify, GetPublicKey, CreateGrant, RetireGrant, DescribeKey, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, GenerateMac, VerifyMac, DeriveSharedSecret
1491
1569
  # constraints: {
@@ -1495,10 +1573,13 @@ module Aws::KMS
1495
1573
  # encryption_context_equals: {
1496
1574
  # "EncryptionContextKey" => "EncryptionContextValue",
1497
1575
  # },
1576
+ # source_arn: "GrantConstraintSourceArnType",
1498
1577
  # },
1499
1578
  # grant_tokens: ["GrantTokenType"],
1500
1579
  # name: "GrantNameType",
1501
1580
  # dry_run: false,
1581
+ # grantee_service_principal: "ServicePrincipalType",
1582
+ # retiring_service_principal: "ServicePrincipalType",
1502
1583
  # })
1503
1584
  #
1504
1585
  # @example Response structure
@@ -7456,7 +7537,7 @@ module Aws::KMS
7456
7537
  # Gets a list of all grants for the specified KMS key.
7457
7538
  #
7458
7539
  # You must specify the KMS key in all requests. You can filter the grant
7459
- # list by grant ID or grantee principal.
7540
+ # list by grant ID, grantee principal, or grantee service principal.
7460
7541
  #
7461
7542
  # For detailed information about grants, including grant terminology,
7462
7543
  # see [Grants in KMS][1] in the <i> <i>Key Management Service Developer
@@ -7464,12 +7545,18 @@ module Aws::KMS
7464
7545
  # languages, see [Use CreateGrant with an Amazon Web Services SDK or
7465
7546
  # CLI][2].
7466
7547
  #
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.
7548
+ # <note markdown="1"> When a grant is created with the `GranteePrincipal` field, the
7549
+ # `ListGrants` response usually contains the user or role designated as
7550
+ # the grantee principal in the grant. However, if the grantee principal
7551
+ # is an Amazon Web Services service, the `GranteePrincipal` field
7552
+ # contains an Amazon Web Services [service principal][3], which might
7553
+ # correspond to several different grantee principals, such as an IAM
7554
+ # user, IAM role, or Amazon Web Services account.
7555
+ #
7556
+ # When a grant is created with the `GranteeServicePrincipal` field, the
7557
+ # `ListGrants` response always includes a `GranteeServicePrincipal` that
7558
+ # indicates the grantee is actually an Amazon Web Services [service
7559
+ # principal][3].
7473
7560
  #
7474
7561
  # </note>
7475
7562
  #
@@ -7538,6 +7625,17 @@ module Aws::KMS
7538
7625
  # Returns only grants where the specified principal is the grantee
7539
7626
  # principal for the grant.
7540
7627
  #
7628
+ # You can specify either `GranteePrincipal` or
7629
+ # `GranteeServicePrincipal`, but not both.
7630
+ #
7631
+ # @option params [String] :grantee_service_principal
7632
+ # Returns only grants where the specified Amazon Web Services service
7633
+ # principal is the grantee service principal for the grant. This filter
7634
+ # is only usable by callers in a service principal.
7635
+ #
7636
+ # You can specify either `GranteePrincipal` or
7637
+ # `GranteeServicePrincipal`, but not both.
7638
+ #
7541
7639
  # @return [Types::ListGrantsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
7542
7640
  #
7543
7641
  # * {Types::ListGrantsResponse#grants #grants} => Array&lt;Types::GrantListEntry&gt;
@@ -7613,6 +7711,40 @@ module Aws::KMS
7613
7711
  # 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
7712
  # }
7615
7713
  #
7714
+ # @example Example: To list grants for a grantee service principal
7715
+ #
7716
+ # # The following example lists grants for the specified KMS key that were created with a GranteeServicePrincipal. The
7717
+ # # response includes the GranteeServicePrincipal, RetiringServicePrincipal, and SourceArn constraint fields.
7718
+ #
7719
+ # resp = client.list_grants({
7720
+ # grantee_service_principal: "service-name.amazonaws.com", # Returns only grants where the specified AWS service principal is the grantee service principal.
7721
+ # 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.
7722
+ # })
7723
+ #
7724
+ # resp.to_h outputs the following:
7725
+ # {
7726
+ # grants: [
7727
+ # {
7728
+ # constraints: {
7729
+ # source_arn: "arn:aws:dynamodb:us-east-2:111122223333:table/ExampleTable",
7730
+ # },
7731
+ # creation_date: Time.parse("2026-03-06T10:15:00-08:00"),
7732
+ # grant_id: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
7733
+ # grantee_service_principal: "service-name.amazonaws.com",
7734
+ # issuing_account: "arn:aws:iam::111122223333:root",
7735
+ # key_id: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
7736
+ # operations: [
7737
+ # "Encrypt",
7738
+ # "Decrypt",
7739
+ # "GenerateDataKey",
7740
+ # "DescribeKey",
7741
+ # ],
7742
+ # retiring_service_principal: "service-name.amazonaws.com",
7743
+ # },
7744
+ # ], # A list of grants.
7745
+ # 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.
7746
+ # }
7747
+ #
7616
7748
  # @example Request syntax with placeholder values
7617
7749
  #
7618
7750
  # resp = client.list_grants({
@@ -7621,6 +7753,7 @@ module Aws::KMS
7621
7753
  # key_id: "KeyIdType", # required
7622
7754
  # grant_id: "GrantIdType",
7623
7755
  # grantee_principal: "PrincipalIdType",
7756
+ # grantee_service_principal: "ServicePrincipalType",
7624
7757
  # })
7625
7758
  #
7626
7759
  # @example Response structure
@@ -7639,6 +7772,9 @@ module Aws::KMS
7639
7772
  # resp.grants[0].constraints.encryption_context_subset["EncryptionContextKey"] #=> String
7640
7773
  # resp.grants[0].constraints.encryption_context_equals #=> Hash
7641
7774
  # resp.grants[0].constraints.encryption_context_equals["EncryptionContextKey"] #=> String
7775
+ # resp.grants[0].constraints.source_arn #=> String
7776
+ # resp.grants[0].grantee_service_principal #=> String
7777
+ # resp.grants[0].retiring_service_principal #=> String
7642
7778
  # resp.next_marker #=> String
7643
7779
  # resp.truncated #=> Boolean
7644
7780
  #
@@ -8141,7 +8277,8 @@ module Aws::KMS
8141
8277
  end
8142
8278
 
8143
8279
  # Returns information about all grants in the Amazon Web Services
8144
- # account and Region that have the specified retiring principal.
8280
+ # account and Region that have the specified retiring principal or
8281
+ # retiring service principal.
8145
8282
  #
8146
8283
  # You can specify any principal in your Amazon Web Services account. The
8147
8284
  # grants that are returned include grants for KMS keys in your Amazon
@@ -8166,12 +8303,16 @@ module Aws::KMS
8166
8303
  # **Required permissions**: [kms:ListRetirableGrants][3] (IAM policy) in
8167
8304
  # your Amazon Web Services account.
8168
8305
  #
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.
8306
+ # <note markdown="1"> When listing retirable grants by `RetiringPrincipal`, KMS authorizes
8307
+ # `ListRetirableGrants` requests by evaluating the caller account's
8308
+ # kms:ListRetirableGrants permissions. The authorized resource in
8309
+ # `ListRetirableGrants` calls is the retiring principal specified in the
8310
+ # request. KMS does not evaluate the caller's permissions to verify
8311
+ # their access to any KMS keys or grants that might be returned by the
8312
+ # `ListRetirableGrants` call.
8313
+ #
8314
+ # The `RetiringServicePrincipal` filter is only usable by callers in a
8315
+ # service principal.
8175
8316
  #
8176
8317
  # </note>
8177
8318
  #
@@ -8208,7 +8349,7 @@ module Aws::KMS
8208
8349
  # response with truncated results. Set it to the value of `NextMarker`
8209
8350
  # from the truncated response you just received.
8210
8351
  #
8211
- # @option params [required, String] :retiring_principal
8352
+ # @option params [String] :retiring_principal
8212
8353
  # The retiring principal for which to list grants. Enter a principal in
8213
8354
  # your Amazon Web Services account.
8214
8355
  #
@@ -8219,11 +8360,21 @@ module Aws::KMS
8219
8360
  # principal, see [IAM ARNs][2] in the <i> <i>Identity and Access
8220
8361
  # Management User Guide</i> </i>.
8221
8362
  #
8363
+ # You must specify either `RetiringPrincipal` or
8364
+ # `RetiringServicePrincipal`, but not both.
8365
+ #
8222
8366
  #
8223
8367
  #
8224
8368
  # [1]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
8225
8369
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
8226
8370
  #
8371
+ # @option params [String] :retiring_service_principal
8372
+ # The retiring service principal for which to list grants. This filter
8373
+ # is only usable by callers in a service principal.
8374
+ #
8375
+ # You must specify either `RetiringPrincipal` or
8376
+ # `RetiringServicePrincipal`, but not both.
8377
+ #
8227
8378
  # @return [Types::ListGrantsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
8228
8379
  #
8229
8380
  # * {Types::ListGrantsResponse#grants #grants} => Array&lt;Types::GrantListEntry&gt;
@@ -8260,12 +8411,45 @@ module Aws::KMS
8260
8411
  # 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
8412
  # }
8262
8413
  #
8414
+ # @example Example: To list grants that the specified service principal can retire
8415
+ #
8416
+ # # The following example lists the grants that the specified AWS service principal can retire.
8417
+ #
8418
+ # resp = client.list_retirable_grants({
8419
+ # 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).
8420
+ # })
8421
+ #
8422
+ # resp.to_h outputs the following:
8423
+ # {
8424
+ # grants: [
8425
+ # {
8426
+ # constraints: {
8427
+ # source_arn: "arn:aws:dynamodb:us-east-2:444455556666:table/ExampleTable",
8428
+ # },
8429
+ # creation_date: Time.parse("2026-03-06T10:15:00-08:00"),
8430
+ # grant_id: "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",
8431
+ # grantee_service_principal: "service-name.amazonaws.com",
8432
+ # issuing_account: "arn:aws:iam::444455556666:root",
8433
+ # key_id: "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab",
8434
+ # operations: [
8435
+ # "Encrypt",
8436
+ # "Decrypt",
8437
+ # "GenerateDataKey",
8438
+ # "DescribeKey",
8439
+ # ],
8440
+ # retiring_service_principal: "service-name.amazonaws.com",
8441
+ # },
8442
+ # ], # A list of grants that the specified service principal can retire.
8443
+ # 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.
8444
+ # }
8445
+ #
8263
8446
  # @example Request syntax with placeholder values
8264
8447
  #
8265
8448
  # resp = client.list_retirable_grants({
8266
8449
  # limit: 1,
8267
8450
  # marker: "MarkerType",
8268
- # retiring_principal: "PrincipalIdType", # required
8451
+ # retiring_principal: "PrincipalIdType",
8452
+ # retiring_service_principal: "ServicePrincipalType",
8269
8453
  # })
8270
8454
  #
8271
8455
  # @example Response structure
@@ -8284,6 +8468,9 @@ module Aws::KMS
8284
8468
  # resp.grants[0].constraints.encryption_context_subset["EncryptionContextKey"] #=> String
8285
8469
  # resp.grants[0].constraints.encryption_context_equals #=> Hash
8286
8470
  # resp.grants[0].constraints.encryption_context_equals["EncryptionContextKey"] #=> String
8471
+ # resp.grants[0].constraints.source_arn #=> String
8472
+ # resp.grants[0].grantee_service_principal #=> String
8473
+ # resp.grants[0].retiring_service_principal #=> String
8287
8474
  # resp.next_marker #=> String
8288
8475
  # resp.truncated #=> Boolean
8289
8476
  #
@@ -8518,6 +8705,13 @@ module Aws::KMS
8518
8705
  # key state. For details, see [Key states of KMS keys][6] in the *Key
8519
8706
  # Management Service Developer Guide*.
8520
8707
  #
8708
+ # <note markdown="1"> When using grants with `SourceArn` constraints for `ReEncrypt`
8709
+ # operations, the grants on both the source KMS key (for
8710
+ # `ReEncryptFrom`) and the destination KMS key (for `ReEncryptTo`) must
8711
+ # specify the same `SourceArn` value.
8712
+ #
8713
+ # </note>
8714
+ #
8521
8715
  # **Cross-account use**: Yes. The source KMS key and destination KMS key
8522
8716
  # can be in different Amazon Web Services accounts. Either or both KMS
8523
8717
  # keys can be in a different account than the caller. To specify a KMS
@@ -11363,7 +11557,7 @@ module Aws::KMS
11363
11557
  tracer: tracer
11364
11558
  )
11365
11559
  context[:gem_name] = 'aws-sdk-kms'
11366
- context[:gem_version] = '1.126.0'
11560
+ context[:gem_version] = '1.127.0'
11367
11561
  Seahorse::Client::Request.new(handlers, context)
11368
11562
  end
11369
11563
 
@@ -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.126.0'
57
+ GEM_VERSION = '1.127.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
 
@@ -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: (
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.126.0
4
+ version: 1.127.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services