Skip to content

Commit 8a73474

Browse files
author
awstools
committed
feat(client-kms): Adds the ability to use the default policy name by omitting the policyName parameter in calls to PutKeyPolicy and GetKeyPolicy
1 parent cdd51de commit 8a73474

File tree

6 files changed

+25
-14
lines changed

6 files changed

+25
-14
lines changed

clients/client-kms/src/commands/GetKeyPolicyCommand.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@ export interface GetKeyPolicyCommandOutput extends GetKeyPolicyResponse, __Metad
4646
* const client = new KMSClient(config);
4747
* const input = { // GetKeyPolicyRequest
4848
* KeyId: "STRING_VALUE", // required
49-
* PolicyName: "STRING_VALUE", // required
49+
* PolicyName: "STRING_VALUE",
5050
* };
5151
* const command = new GetKeyPolicyCommand(input);
5252
* const response = await client.send(command);
5353
* // { // GetKeyPolicyResponse
5454
* // Policy: "STRING_VALUE",
55+
* // PolicyName: "STRING_VALUE",
5556
* // };
5657
*
5758
* ```

clients/client-kms/src/commands/ImportKeyMaterialCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export interface ImportKeyMaterialCommandOutput extends ImportKeyMaterialRespons
4040
* the same key material</a> into that KMS key, but you cannot import different key
4141
* material. You might reimport key material to replace key material that expired or key material
4242
* that you deleted. You might also reimport key material to change the expiration model or
43-
* expiration date of the key material. Before reimporting key material, if necessary, call <a>DeleteImportedKeyMaterial</a> to delete the current imported key material. </p>
43+
* expiration date of the key material. </p>
4444
* <p>Each time you import key material into KMS, you can determine whether
4545
* (<code>ExpirationModel</code>) and when (<code>ValidTo</code>) the key material expires. To
4646
* change the expiration of your key material, you must import it again, either by calling

clients/client-kms/src/commands/PutKeyPolicyCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export interface PutKeyPolicyCommandOutput extends __MetadataBearer {}
5151
* const client = new KMSClient(config);
5252
* const input = { // PutKeyPolicyRequest
5353
* KeyId: "STRING_VALUE", // required
54-
* PolicyName: "STRING_VALUE", // required
54+
* PolicyName: "STRING_VALUE",
5555
* Policy: "STRING_VALUE", // required
5656
* BypassPolicyLockoutSafetyCheck: true || false,
5757
* };

clients/client-kms/src/commands/RevokeGrantCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface RevokeGrantCommandOutput extends __MetadataBearer {}
2828

2929
/**
3030
* <p>Deletes the specified grant. You revoke a grant to terminate the permissions that the
31-
* grant allows. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/managing-grants.html#grant-delete">Retiring and revoking grants</a> in
31+
* grant allows. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete">Retiring and revoking grants</a> in
3232
* the <i>
3333
* <i>Key Management Service Developer Guide</i>
3434
* </i>.</p>

clients/client-kms/src/models/models_0.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -4078,11 +4078,11 @@ export interface GetKeyPolicyRequest {
40784078
KeyId: string | undefined;
40794079

40804080
/**
4081-
* <p>Specifies the name of the key policy. The only valid name is <code>default</code>. To get
4081+
* <p>Specifies the name of the key policy. If no policy name is specified, the default value is <code>default</code>. The only valid name is <code>default</code>. To get
40824082
* the names of key policies, use <a>ListKeyPolicies</a>.</p>
40834083
* @public
40844084
*/
4085-
PolicyName: string | undefined;
4085+
PolicyName?: string;
40864086
}
40874087

40884088
/**
@@ -4094,6 +4094,12 @@ export interface GetKeyPolicyResponse {
40944094
* @public
40954095
*/
40964096
Policy?: string;
4097+
4098+
/**
4099+
* <p>The name of the key policy. The only valid value is <code>default</code>.</p>
4100+
* @public
4101+
*/
4102+
PolicyName?: string;
40974103
}
40984104

40994105
/**
@@ -5062,10 +5068,10 @@ export interface PutKeyPolicyRequest {
50625068
KeyId: string | undefined;
50635069

50645070
/**
5065-
* <p>The name of the key policy. The only valid value is <code>default</code>.</p>
5071+
* <p>The name of the key policy. If no policy name is specified, the default value is <code>default</code>. The only valid value is <code>default</code>.</p>
50665072
* @public
50675073
*/
5068-
PolicyName: string | undefined;
5074+
PolicyName?: string;
50695075

50705076
/**
50715077
* <p>The key policy to attach to the KMS key.</p>

0 commit comments

Comments
 (0)