@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.341Z") @Stability(value=Stable) public interface IKey extends software.amazon.jsii.JsiiSerializable, IResource
| Modifier and Type | Interface and Description |
|---|---|
static interface |
IKey.Jsii$Default
Internal default implementation for
IKey. |
static class |
IKey.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
| Modifier and Type | Method and Description |
|---|---|
Alias |
addAlias(String alias)
Defines a new alias for the key.
|
AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement)
Adds a statement to the KMS key resource policy.
|
AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement,
Boolean allowNoOp)
Adds a statement to the KMS key resource policy.
|
String |
getKeyArn()
The ARN of the key.
|
String |
getKeyId()
The ID of the key (the part that looks something like: 1234abcd-12ab-34cd-56ef-1234567890ab).
|
Grant |
grant(IGrantable grantee,
String... actions)
Grant the indicated permissions on this key to the given principal.
|
Grant |
grantDecrypt(IGrantable grantee)
Grant decryption permissions using this key to the given principal.
|
Grant |
grantEncrypt(IGrantable grantee)
Grant encryption permissions using this key to the given principal.
|
Grant |
grantEncryptDecrypt(IGrantable grantee)
Grant encryption and decryption permissions using this key to the given principal.
|
applyRemovalPolicy, getEnv, getStack@Stability(value=Stable) @NotNull String getKeyArn()
@Stability(value=Stable) @NotNull String getKeyId()
@Stability(value=Stable) @NotNull Alias addAlias(@NotNull String alias)
alias - This parameter is required.@Stability(value=Stable) @NotNull AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement, @Nullable Boolean allowNoOp)
statement - The policy statement to add. This parameter is required.allowNoOp - If this is set to `false` and there is no policy defined (i.e. external key), the operation will fail. Otherwise, it will no-op.@Stability(value=Stable) @NotNull AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement)
statement - The policy statement to add. This parameter is required.@Stability(value=Stable) @NotNull Grant grant(@NotNull IGrantable grantee, @NotNull String... actions)
grantee - This parameter is required.actions - This parameter is required.@Stability(value=Stable) @NotNull Grant grantDecrypt(@NotNull IGrantable grantee)
grantee - This parameter is required.@Stability(value=Stable) @NotNull Grant grantEncrypt(@NotNull IGrantable grantee)
grantee - This parameter is required.@Stability(value=Stable) @NotNull Grant grantEncryptDecrypt(@NotNull IGrantable grantee)
grantee - This parameter is required.Copyright © 2022. All rights reserved.