@aws-sdk/client-kms 3.1169.0 → 3.1171.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.
package/dist-cjs/index.js CHANGED
@@ -69,7 +69,7 @@ const commonParams = {
69
69
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
70
70
  };
71
71
 
72
- var version = "3.1168.0";
72
+ var version = "3.1170.0";
73
73
  var packageInfo = {
74
74
  version: version};
75
75
 
@@ -1054,6 +1054,7 @@ const _RKRe = "ReplicateKeyResponse";
1054
1054
  const _RKe = "ReplicateKey";
1055
1055
  const _RL = "RotationsList";
1056
1056
  const _RLE = "RotationsListEntry";
1057
+ const _RO = "ResourceOwners";
1057
1058
  const _RP = "RetiringPrincipal";
1058
1059
  const _RPID = "RotationPeriodInDays";
1059
1060
  const _RPe = "ReplicaPolicy";
@@ -1831,8 +1832,8 @@ var ListKeyRotationsResponse$ = [3, n0, _LKRRi,
1831
1832
  ];
1832
1833
  var ListKeysRequest$ = [3, n0, _LKR,
1833
1834
  0,
1834
- [_L, _M],
1835
- [1, 0]
1835
+ [_L, _M, _RO],
1836
+ [1, 0, 64 | 0]
1836
1837
  ];
1837
1838
  var ListKeysResponse$ = [3, n0, _LKRi,
1838
1839
  0,
@@ -2851,6 +2852,10 @@ const RotationType = {
2851
2852
  AUTOMATIC: "AUTOMATIC",
2852
2853
  ON_DEMAND: "ON_DEMAND",
2853
2854
  };
2855
+ const ResourceOwnerType = {
2856
+ OTHER_ACCOUNTS_VIA_RAM: "OTHER_ACCOUNTS_VIA_RAM",
2857
+ SELF: "SELF",
2858
+ };
2854
2859
  const MessageType = {
2855
2860
  DIGEST: "DIGEST",
2856
2861
  EXTERNAL_MU: "EXTERNAL_MU",
@@ -3130,6 +3135,7 @@ exports.ReplicateKey$ = ReplicateKey$;
3130
3135
  exports.ReplicateKeyCommand = ReplicateKeyCommand;
3131
3136
  exports.ReplicateKeyRequest$ = ReplicateKeyRequest$;
3132
3137
  exports.ReplicateKeyResponse$ = ReplicateKeyResponse$;
3138
+ exports.ResourceOwnerType = ResourceOwnerType;
3133
3139
  exports.RetireGrant$ = RetireGrant$;
3134
3140
  exports.RetireGrantCommand = RetireGrantCommand;
3135
3141
  exports.RetireGrantRequest$ = RetireGrantRequest$;
@@ -235,6 +235,10 @@ export const RotationType = {
235
235
  AUTOMATIC: "AUTOMATIC",
236
236
  ON_DEMAND: "ON_DEMAND",
237
237
  };
238
+ export const ResourceOwnerType = {
239
+ OTHER_ACCOUNTS_VIA_RAM: "OTHER_ACCOUNTS_VIA_RAM",
240
+ SELF: "SELF",
241
+ };
238
242
  export const MessageType = {
239
243
  DIGEST: "DIGEST",
240
244
  EXTERNAL_MU: "EXTERNAL_MU",
@@ -288,6 +288,7 @@ const _RKRe = "ReplicateKeyResponse";
288
288
  const _RKe = "ReplicateKey";
289
289
  const _RL = "RotationsList";
290
290
  const _RLE = "RotationsListEntry";
291
+ const _RO = "ResourceOwners";
291
292
  const _RP = "RetiringPrincipal";
292
293
  const _RPID = "RotationPeriodInDays";
293
294
  const _RPe = "ReplicaPolicy";
@@ -1068,8 +1069,8 @@ export var ListKeyRotationsResponse$ = [3, n0, _LKRRi,
1068
1069
  ];
1069
1070
  export var ListKeysRequest$ = [3, n0, _LKR,
1070
1071
  0,
1071
- [_L, _M],
1072
- [1, 0]
1072
+ [_L, _M, _RO],
1073
+ [1, 0, 64 | 0]
1073
1074
  ];
1074
1075
  export var ListKeysResponse$ = [3, n0, _LKRi,
1075
1076
  0,
@@ -1276,6 +1277,7 @@ var MultiRegionKeyList = [1, n0, _MRKL,
1276
1277
  0, () => MultiRegionKey$
1277
1278
  ];
1278
1279
  var PolicyNameList = 64 | 0;
1280
+ var ResourceOwnersList = 64 | 0;
1279
1281
  var RotationsList = [1, n0, _RL,
1280
1282
  0, () => RotationsListEntry$
1281
1283
  ];
@@ -25,10 +25,23 @@ declare const GetKeyPolicyCommand_base: {
25
25
  };
26
26
  /**
27
27
  * <p>Gets a key policy attached to the specified KMS key.</p>
28
+ * <p>A KMS key can have two key policies. You manage the <code>default</code> key policy.
29
+ * Resource Access Manager (RAM) manages the <code>AWS_RAM</code> key policy for KMS keys that you share
30
+ * through RAM. You can use <code>GetKeyPolicy</code> to view the <code>AWS_RAM</code> key
31
+ * policy, but you can't change it with <a>PutKeyPolicy</a>. To get the
32
+ * <code>AWS_RAM</code> key policy, set the <code>PolicyName</code> parameter to
33
+ * <code>AWS_RAM</code>. If the KMS key doesn't have an <code>AWS_RAM</code> key policy,
34
+ * <code>GetKeyPolicy</code> returns a <code>NotFoundException</code>. For information about sharing KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-sharing-ram.html">Sharing KMS keys with RAM</a> in the
35
+ * <i>Key Management Service Developer Guide</i>. For information about RAM managed permissions, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/security-ram-permissions.html">Managing
36
+ * permissions in RAM</a> in the <i>RAM User Guide</i>.</p>
28
37
  * <p>
29
38
  * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
30
39
  * <p>
31
40
  * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetKeyPolicy</a> (key policy)</p>
41
+ * <p>You can use the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-policy-name">kms:PolicyName</a> condition key to control access to this operation based on
42
+ * the value of the <code>PolicyName</code> parameter in the request. If the request doesn't
43
+ * include <code>PolicyName</code>, the value of <code>kms:PolicyName</code> is
44
+ * <code>default</code>.</p>
32
45
  * <p>
33
46
  * <b>Related operations</b>: <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html">PutKeyPolicy</a>
34
47
  * </p>
@@ -130,6 +143,35 @@ declare const GetKeyPolicyCommand_base: {
130
143
  * *\/
131
144
  * ```
132
145
  *
146
+ * @example To retrieve the AWS_RAM key policy
147
+ * ```javascript
148
+ * // The following example retrieves the AWS_RAM key policy for a KMS key that is shared with account 444455556666 through a resource share that uses a customer managed AWS RAM permission. AWS Resource Access Manager (AWS RAM) creates and manages the AWS_RAM key policy for KMS keys that you share through AWS RAM.
149
+ * const input = {
150
+ * KeyId: "1234abcd-12ab-34cd-56ef-1234567890ab",
151
+ * PolicyName: "AWS_RAM"
152
+ * };
153
+ * const command = new GetKeyPolicyCommand(input);
154
+ * const response = await client.send(command);
155
+ * /* response is
156
+ * {
157
+ * Policy: `{
158
+ * "Version" : "2012-10-17",
159
+ * "Id" : "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
160
+ * "Statement" : [ {
161
+ * "Sid" : "ExampleKmsKeyPermission-external-principals",
162
+ * "Effect" : "Allow",
163
+ * "Principal" : {
164
+ * "AWS" : "arn:aws:iam::444455556666:root"
165
+ * },
166
+ * "Action" : [ "kms:DescribeKey", "kms:Encrypt", "kms:Decrypt" ],
167
+ * "Resource" : "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
168
+ * } ]
169
+ * }`,
170
+ * PolicyName: "AWS_RAM"
171
+ * }
172
+ * *\/
173
+ * ```
174
+ *
133
175
  * @public
134
176
  */
135
177
  export declare class GetKeyPolicyCommand extends GetKeyPolicyCommand_base {
@@ -26,7 +26,9 @@ declare const ListKeyPoliciesCommand_base: {
26
26
  /**
27
27
  * <p>Gets the names of the key policies that are attached to a KMS key. This operation is
28
28
  * designed to get policy names that you can use in a <a>GetKeyPolicy</a> operation.
29
- * However, the only valid policy name is <code>default</code>. </p>
29
+ * The valid policy names are <code>default</code> and <code>AWS_RAM</code>.</p>
30
+ * <p>For information about the <code>AWS_RAM</code> key policy, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-sharing-ram.html">Sharing KMS keys with
31
+ * RAM</a> in the <i>Key Management Service Developer Guide</i>.</p>
30
32
  * <p>
31
33
  * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
32
34
  * <p>
@@ -138,6 +140,25 @@ declare const ListKeyPoliciesCommand_base: {
138
140
  * *\/
139
141
  * ```
140
142
  *
143
+ * @example To list key policies for a KMS key that has an AWS_RAM key policy
144
+ * ```javascript
145
+ * // The following example lists key policies for a KMS key that has an AWS_RAM key policy. AWS Resource Access Manager (AWS RAM) manages the AWS_RAM key policy for KMS keys that you share through AWS RAM.
146
+ * const input = {
147
+ * KeyId: "1234abcd-12ab-34cd-56ef-1234567890ab"
148
+ * };
149
+ * const command = new ListKeyPoliciesCommand(input);
150
+ * const response = await client.send(command);
151
+ * /* response is
152
+ * {
153
+ * PolicyNames: [
154
+ * "AWS_RAM",
155
+ * "default"
156
+ * ],
157
+ * Truncated: false
158
+ * }
159
+ * *\/
160
+ * ```
161
+ *
141
162
  * @public
142
163
  */
143
164
  export declare class ListKeyPoliciesCommand extends ListKeyPoliciesCommand_base {
@@ -25,10 +25,27 @@ declare const ListKeysCommand_base: {
25
25
  };
26
26
  /**
27
27
  * <p>Gets a list of all KMS keys in the caller's Amazon Web Services account and Region.</p>
28
+ * <p>You can also use <code>ListKeys</code> to list KMS keys in the Region that other
29
+ * Amazon Web Services accounts shared with the caller's Amazon Web Services account through Resource Access Manager (RAM). To list
30
+ * them, use the <code>ResourceOwners</code> parameter. If you omit <code>ResourceOwners</code>,
31
+ * <code>ListKeys</code> lists only the KMS keys in the caller's Amazon Web Services account.</p>
32
+ * <p>When <code>ResourceOwners</code> includes <code>OTHER_ACCOUNTS_VIA_RAM</code>,
33
+ * <code>ListKeys</code> returns the KMS keys that other Amazon Web Services accounts currently share with
34
+ * the caller's Amazon Web Services account through RAM. For information about how and when a resource
35
+ * that another account shares becomes available to your Amazon Web Services account, see <a href="https://docs.aws.amazon.com/ram/latest/userguide/working-with-shared.html">Access Amazon Web Services
36
+ * resources shared with you</a> in the <i>RAM User Guide</i>.</p>
28
37
  * <p>
29
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
38
+ * <b>Cross-account use</b>: No. This operation doesn't take a KMS
39
+ * key parameter, so you can't use it to list the KMS keys of a specific Amazon Web Services account. The only
40
+ * KMS keys in other Amazon Web Services accounts that <code>ListKeys</code> returns are the ones that other
41
+ * accounts shared with the caller's Amazon Web Services account through RAM. To list them, set the
42
+ * <code>ResourceOwners</code> parameter to include <code>OTHER_ACCOUNTS_VIA_RAM</code>.</p>
30
43
  * <p>
31
44
  * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListKeys</a> (IAM policy)</p>
45
+ * <p>The same <code>kms:ListKeys</code> permission lets you list the KMS keys that other
46
+ * accounts shared with you through RAM. KMS doesn't evaluate the key policies of shared KMS
47
+ * keys when it lists them. To use a shared KMS key, you need permission for each operation on
48
+ * that KMS key.</p>
32
49
  * <p>
33
50
  * <b>Related operations:</b>
34
51
  * </p>
@@ -57,6 +74,9 @@ declare const ListKeysCommand_base: {
57
74
  * <p>
58
75
  * <b>Eventual consistency</b>: The KMS API follows an eventual consistency model.
59
76
  * For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency">KMS eventual consistency</a>.</p>
77
+ * <p>KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or
78
+ * disappear from <code>ListKeys</code> results after changes to resource shares, such as
79
+ * accepting an invitation or deleting a resource share.</p>
60
80
  * @example
61
81
  * Use a bare-bones client and the command you need to make an API call.
62
82
  * ```javascript
@@ -68,6 +88,9 @@ declare const ListKeysCommand_base: {
68
88
  * const input = { // ListKeysRequest
69
89
  * Limit: Number("int"),
70
90
  * Marker: "STRING_VALUE",
91
+ * ResourceOwners: [ // ResourceOwnersList
92
+ * "SELF" || "OTHER_ACCOUNTS_VIA_RAM",
93
+ * ],
71
94
  * };
72
95
  * const command = new ListKeysCommand(input);
73
96
  * const response = await client.send(command);
@@ -149,6 +172,33 @@ declare const ListKeysCommand_base: {
149
172
  * *\/
150
173
  * ```
151
174
  *
175
+ * @example To list KMS keys that other accounts shared with you through AWS RAM
176
+ * ```javascript
177
+ * // The following example lists the KMS keys in the Region that other AWS accounts shared with your AWS account through AWS Resource Access Manager (AWS RAM).
178
+ * const input = {
179
+ * ResourceOwners: [
180
+ * "OTHER_ACCOUNTS_VIA_RAM"
181
+ * ]
182
+ * };
183
+ * const command = new ListKeysCommand(input);
184
+ * const response = await client.send(command);
185
+ * /* response is
186
+ * {
187
+ * Keys: [
188
+ * {
189
+ * KeyArn: "arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab",
190
+ * KeyId: "1234abcd-12ab-34cd-56ef-1234567890ab"
191
+ * },
192
+ * {
193
+ * KeyArn: "arn:aws:kms:us-east-2:444455556666:key/0987dcba-09fe-87dc-65ba-ab0987654321",
194
+ * KeyId: "0987dcba-09fe-87dc-65ba-ab0987654321"
195
+ * }
196
+ * ],
197
+ * Truncated: false
198
+ * }
199
+ * *\/
200
+ * ```
201
+ *
152
202
  * @public
153
203
  */
154
204
  export declare class ListKeysCommand extends ListKeysCommand_base {
@@ -24,17 +24,29 @@ declare const PutKeyPolicyCommand_base: {
24
24
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
25
  };
26
26
  /**
27
- * <p>Attaches a key policy to the specified KMS key. </p>
27
+ * <p>Attaches a key policy to the specified KMS key. You can use this operation to set only the
28
+ * <code>default</code> key policy.</p>
28
29
  * <p>For more information about key policies, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">Key Policies</a> in the <i>Key Management Service Developer Guide</i>.
29
30
  * For help writing and formatting a JSON policy document, see the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html">IAM JSON Policy Reference</a> in the <i>
30
31
  * <i>Identity and Access Management User Guide</i>
31
32
  * </i>. For examples of adding a key policy in multiple programming languages,
32
33
  * see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/example_kms_PutKeyPolicy_section.html">Use
33
34
  * PutKeyPolicy with an Amazon Web Services SDK or CLI</a> in the <i>Key Management Service Developer Guide</i>.</p>
35
+ * <p>A KMS key can also have an <code>AWS_RAM</code> key policy, which Resource Access Manager (RAM)
36
+ * manages for KMS keys that you share through RAM. You can't use <code>PutKeyPolicy</code> to
37
+ * create, change, or delete the <code>AWS_RAM</code> key policy. If you set
38
+ * <code>PolicyName</code> to <code>AWS_RAM</code>, the request fails with a
39
+ * <code>ValidationException</code> and the message <code>The AWS_RAM policy can only be
40
+ * managed by the RAM service.</code> To view the <code>AWS_RAM</code> key policy, use <a>GetKeyPolicy</a>. For information about sharing KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-sharing-ram.html">Sharing KMS keys with
41
+ * RAM</a> in the <i>Key Management Service Developer Guide</i>.</p>
34
42
  * <p>
35
43
  * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
36
44
  * <p>
37
45
  * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:PutKeyPolicy</a> (key policy)</p>
46
+ * <p>You can use the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-policy-name">kms:PolicyName</a> condition key to control access to this operation based on
47
+ * the value of the <code>PolicyName</code> parameter in the request. If the request doesn't
48
+ * include <code>PolicyName</code>, the value of <code>kms:PolicyName</code> is
49
+ * <code>default</code>.</p>
38
50
  * <p>
39
51
  * <b>Related operations</b>: <a>GetKeyPolicy</a>
40
52
  * </p>
@@ -475,6 +475,18 @@ export declare const RotationType: {
475
475
  * @public
476
476
  */
477
477
  export type RotationType = (typeof RotationType)[keyof typeof RotationType];
478
+ /**
479
+ * @public
480
+ * @enum
481
+ */
482
+ export declare const ResourceOwnerType: {
483
+ readonly OTHER_ACCOUNTS_VIA_RAM: "OTHER_ACCOUNTS_VIA_RAM";
484
+ readonly SELF: "SELF";
485
+ };
486
+ /**
487
+ * @public
488
+ */
489
+ export type ResourceOwnerType = (typeof ResourceOwnerType)[keyof typeof ResourceOwnerType];
478
490
  /**
479
491
  * @public
480
492
  * @enum
@@ -1,4 +1,4 @@
1
- import type { AlgorithmSpec, ConnectionErrorCodeType, ConnectionStateType, CustomerMasterKeySpec, CustomKeyStoreType, DataKeyPairSpec, DataKeySpec, DryRunModifierType, EncapsulationAlgorithmSpec, EncryptionAlgorithmSpec, ExpirationModelType, GrantOperation, ImportState, ImportType, IncludeKeyMaterial, KeyAgreementAlgorithmSpec, KeyEncryptionMechanism, KeyLastUsageTrackingOperation, KeyManagerType, KeyMaterialState, KeySpec, KeyState, KeyUsageType, MacAlgorithmSpec, MessageType, MultiRegionKeyType, OriginType, RotationType, SigningAlgorithmSpec, WrappingKeySpec, XksProxyConnectivityType } from "./enums";
1
+ import type { AlgorithmSpec, ConnectionErrorCodeType, ConnectionStateType, CustomerMasterKeySpec, CustomKeyStoreType, DataKeyPairSpec, DataKeySpec, DryRunModifierType, EncapsulationAlgorithmSpec, EncryptionAlgorithmSpec, ExpirationModelType, GrantOperation, ImportState, ImportType, IncludeKeyMaterial, KeyAgreementAlgorithmSpec, KeyEncryptionMechanism, KeyLastUsageTrackingOperation, KeyManagerType, KeyMaterialState, KeySpec, KeyState, KeyUsageType, MacAlgorithmSpec, MessageType, MultiRegionKeyType, OriginType, ResourceOwnerType, RotationType, SigningAlgorithmSpec, WrappingKeySpec, XksProxyConnectivityType } from "./enums";
2
2
  /**
3
3
  * <p>Contains information about an alias.</p>
4
4
  * @public
@@ -3140,7 +3140,7 @@ export interface GetKeyLastUsageResponse {
3140
3140
  */
3141
3141
  export interface GetKeyPolicyRequest {
3142
3142
  /**
3143
- * <p>Gets the key policy for the specified KMS key.</p>
3143
+ * <p>Identifies the KMS key whose key policy you want to get.</p>
3144
3144
  * <p>Specify the key ID or key ARN of the KMS key.</p>
3145
3145
  * <p>For example:</p>
3146
3146
  * <ul>
@@ -3159,8 +3159,10 @@ export interface GetKeyPolicyRequest {
3159
3159
  KeyId: string | undefined;
3160
3160
  /**
3161
3161
  * <p>Specifies the name of the key policy. If no policy name is specified, the default value is
3162
- * <code>default</code>. The only valid name is <code>default</code>. To get the names of key
3163
- * policies, use <a>ListKeyPolicies</a>.</p>
3162
+ * <code>default</code>. Valid values are <code>default</code> and <code>AWS_RAM</code>. Use
3163
+ * <code>AWS_RAM</code> to get the key policy that RAM manages for a KMS key that you share
3164
+ * through RAM. If the KMS key doesn't have an <code>AWS_RAM</code> key policy, the request
3165
+ * fails with a <code>NotFoundException</code>. To get the names of key policies, use <a>ListKeyPolicies</a>.</p>
3164
3166
  * @public
3165
3167
  */
3166
3168
  PolicyName?: string | undefined;
@@ -3175,7 +3177,18 @@ export interface GetKeyPolicyResponse {
3175
3177
  */
3176
3178
  Policy?: string | undefined;
3177
3179
  /**
3178
- * <p>The name of the key policy. The only valid value is <code>default</code>.</p>
3180
+ * <p>The name of the key policy. Valid values are:</p>
3181
+ * <dl>
3182
+ * <dt>default</dt>
3183
+ * <dd>
3184
+ * <p>The key policy that you manage.</p>
3185
+ * </dd>
3186
+ * <dt>AWS_RAM</dt>
3187
+ * <dd>
3188
+ * <p>The key policy that RAM manages for KMS keys that you share through
3189
+ * RAM.</p>
3190
+ * </dd>
3191
+ * </dl>
3179
3192
  * @public
3180
3193
  */
3181
3194
  PolicyName?: string | undefined;
@@ -3848,7 +3861,8 @@ export interface ListKeyPoliciesRequest {
3848
3861
  * return fewer.</p>
3849
3862
  * <p>This value is optional. If you include a value, it must be between
3850
3863
  * 1 and 1000, inclusive. If you do not include a value, it defaults to 100.</p>
3851
- * <p>Only one policy can be attached to a key.</p>
3864
+ * <p>A KMS key can have at most two key policies, <code>default</code> and
3865
+ * <code>AWS_RAM</code>.</p>
3852
3866
  * @public
3853
3867
  */
3854
3868
  Limit?: number | undefined;
@@ -3865,7 +3879,18 @@ export interface ListKeyPoliciesRequest {
3865
3879
  */
3866
3880
  export interface ListKeyPoliciesResponse {
3867
3881
  /**
3868
- * <p>A list of key policy names. The only valid value is <code>default</code>.</p>
3882
+ * <p>A list of key policy names. Valid values are:</p>
3883
+ * <dl>
3884
+ * <dt>default</dt>
3885
+ * <dd>
3886
+ * <p>The key policy that you manage.</p>
3887
+ * </dd>
3888
+ * <dt>AWS_RAM</dt>
3889
+ * <dd>
3890
+ * <p>The key policy that RAM manages for KMS keys that you share through
3891
+ * RAM.</p>
3892
+ * </dd>
3893
+ * </dl>
3869
3894
  * @public
3870
3895
  */
3871
3896
  PolicyNames?: string[] | undefined;
@@ -4061,13 +4086,48 @@ export interface ListKeysRequest {
4061
4086
  * @public
4062
4087
  */
4063
4088
  Marker?: string | undefined;
4089
+ /**
4090
+ * <p>Specifies whose KMS keys to list. Use this parameter to list KMS keys that other
4091
+ * Amazon Web Services accounts shared with your Amazon Web Services account through Resource Access Manager (RAM).</p>
4092
+ * <p>Specify one or two values. Valid values are:</p>
4093
+ * <dl>
4094
+ * <dt>SELF</dt>
4095
+ * <dd>
4096
+ * <p>Lists the KMS keys in your Amazon Web Services account and Region.</p>
4097
+ * </dd>
4098
+ * <dt>OTHER_ACCOUNTS_VIA_RAM</dt>
4099
+ * <dd>
4100
+ * <p>Lists the KMS keys in the Region that other Amazon Web Services accounts currently share with
4101
+ * your Amazon Web Services account through RAM. This list doesn't include KMS keys that your
4102
+ * Amazon Web Services account owns. For each of these KMS keys, the key ARN in the response contains
4103
+ * the account ID of the Amazon Web Services account that owns the KMS key.</p>
4104
+ * </dd>
4105
+ * </dl>
4106
+ * <p>If you omit this parameter, <code>ListKeys</code> lists only the KMS keys in your
4107
+ * Amazon Web Services account. If you specify both values, in either order, <code>ListKeys</code> returns the KMS keys in
4108
+ * your Amazon Web Services account first, and then the KMS keys that other Amazon Web Services accounts shared with you.
4109
+ * A single response doesn't contain both kinds of KMS keys.</p>
4110
+ * <p>When <code>ResourceOwners</code> includes <code>OTHER_ACCOUNTS_VIA_RAM</code>, a response
4111
+ * can contain fewer KMS keys than the <code>Limit</code> value, or none, even when
4112
+ * <code>Truncated</code> is true. To get all of the KMS keys, continue calling
4113
+ * <code>ListKeys</code> with the <code>NextMarker</code> value from each response until
4114
+ * <code>Truncated</code> is false. Use a <code>NextMarker</code> value only in a request
4115
+ * that has the same <code>ResourceOwners</code> value as the request that returned it.
4116
+ * Otherwise, the request can fail with an <code>InvalidMarkerException</code>.</p>
4117
+ * <p>KMS keys that other Amazon Web Services accounts share with you can take some time to appear in or
4118
+ * disappear from the results after changes to resource shares.</p>
4119
+ * @public
4120
+ */
4121
+ ResourceOwners?: ResourceOwnerType[] | undefined;
4064
4122
  }
4065
4123
  /**
4066
4124
  * @public
4067
4125
  */
4068
4126
  export interface ListKeysResponse {
4069
4127
  /**
4070
- * <p>A list of KMS keys.</p>
4128
+ * <p>A list of KMS keys. For a KMS key that another Amazon Web Services account shared with you through
4129
+ * RAM, the key ARN contains the account ID of the Amazon Web Services account that owns the KMS
4130
+ * key.</p>
4071
4131
  * @public
4072
4132
  */
4073
4133
  Keys?: KeyListEntry[] | undefined;
@@ -4222,7 +4282,12 @@ export interface PutKeyPolicyRequest {
4222
4282
  KeyId: string | undefined;
4223
4283
  /**
4224
4284
  * <p>The name of the key policy. If no policy name is specified, the default value is
4225
- * <code>default</code>. The only valid value is <code>default</code>.</p>
4285
+ * <code>default</code>. Valid values are <code>default</code> and <code>AWS_RAM</code>, but
4286
+ * you can set only the <code>default</code> key policy. RAM manages the <code>AWS_RAM</code>
4287
+ * key policy for KMS keys that you share through RAM. If you specify <code>AWS_RAM</code>, the
4288
+ * request fails with a <code>ValidationException</code>, or with an
4289
+ * <code>AccessDeniedException</code> if you don't have permission to call
4290
+ * <code>PutKeyPolicy</code> with that policy name.</p>
4226
4291
  * @public
4227
4292
  */
4228
4293
  PolicyName?: string | undefined;
@@ -4287,6 +4352,11 @@ export interface PutKeyPolicyRequest {
4287
4352
  * <p>Use this parameter only when you intend to prevent the principal that is making the
4288
4353
  * request from making a subsequent <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html">PutKeyPolicy</a>
4289
4354
  * request on the KMS key.</p>
4355
+ * <p>The key policy lockout safety check and the <code>BypassPolicyLockoutSafetyCheck</code>
4356
+ * parameter apply only to the <code>default</code> key policy. The check evaluates only the new
4357
+ * <code>default</code> key policy, with <code>kms:PolicyName</code> set to
4358
+ * <code>default</code>. It doesn't consider permissions in the <code>AWS_RAM</code> key
4359
+ * policy.</p>
4290
4360
  * @public
4291
4361
  */
4292
4362
  BypassPolicyLockoutSafetyCheck?: boolean | undefined;
@@ -273,6 +273,11 @@ export declare const RotationType: {
273
273
  readonly ON_DEMAND: "ON_DEMAND";
274
274
  };
275
275
  export type RotationType = (typeof RotationType)[keyof typeof RotationType];
276
+ export declare const ResourceOwnerType: {
277
+ readonly OTHER_ACCOUNTS_VIA_RAM: "OTHER_ACCOUNTS_VIA_RAM";
278
+ readonly SELF: "SELF";
279
+ };
280
+ export type ResourceOwnerType = (typeof ResourceOwnerType)[keyof typeof ResourceOwnerType];
276
281
  export declare const MessageType: {
277
282
  readonly DIGEST: "DIGEST";
278
283
  readonly EXTERNAL_MU: "EXTERNAL_MU";
@@ -26,6 +26,7 @@ import {
26
26
  MessageType,
27
27
  MultiRegionKeyType,
28
28
  OriginType,
29
+ ResourceOwnerType,
29
30
  RotationType,
30
31
  SigningAlgorithmSpec,
31
32
  WrappingKeySpec,
@@ -525,6 +526,7 @@ export interface ListKeyRotationsResponse {
525
526
  export interface ListKeysRequest {
526
527
  Limit?: number | undefined;
527
528
  Marker?: string | undefined;
529
+ ResourceOwners?: ResourceOwnerType[] | undefined;
528
530
  }
529
531
  export interface ListKeysResponse {
530
532
  Keys?: KeyListEntry[] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-kms",
3
- "version": "3.1169.0",
3
+ "version": "3.1171.0",
4
4
  "description": "AWS SDK for JavaScript Kms Client for Node.js, Browser and React Native",
5
5
  "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-kms",
6
6
  "license": "Apache-2.0",