@Generated(value="jsii-pacmak/1.29.0 (build 41df200)", date="2021-06-02T09:55:31.603Z") @Stability(value=Experimental) 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)
(experimental) Defines a new alias for the key.
|
AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement)
(experimental) Adds a statement to the KMS key resource policy.
|
AddToResourcePolicyResult |
addToResourcePolicy(PolicyStatement statement,
Boolean allowNoOp)
(experimental) Adds a statement to the KMS key resource policy.
|
String |
getKeyArn()
(experimental) The ARN of the key.
|
String |
getKeyId()
(experimental) The ID of the key (the part that looks something like: 1234abcd-12ab-34cd-56ef-1234567890ab).
|
Grant |
grant(IGrantable grantee,
String... actions)
(experimental) Grant the indicated permissions on this key to the given principal.
|
Grant |
grantDecrypt(IGrantable grantee)
(experimental) Grant decryption permissions using this key to the given principal.
|
Grant |
grantEncrypt(IGrantable grantee)
(experimental) Grant encryption permissions using this key to the given principal.
|
Grant |
grantEncryptDecrypt(IGrantable grantee)
(experimental) Grant encryption and decryption permissions using this key to the given principal.
|
@Stability(value=Experimental) @NotNull String getKeyArn()
@Stability(value=Experimental) @NotNull String getKeyId()
@Stability(value=Experimental) @NotNull Alias addAlias(@NotNull String alias)
alias - This parameter is required.@Stability(value=Experimental) @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=Experimental) @NotNull AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement)
statement - The policy statement to add. This parameter is required.@Stability(value=Experimental) @NotNull Grant grant(@NotNull IGrantable grantee, @NotNull String... actions)
grantee - This parameter is required.actions - This parameter is required.@Stability(value=Experimental) @NotNull Grant grantDecrypt(@NotNull IGrantable grantee)
grantee - This parameter is required.@Stability(value=Experimental) @NotNull Grant grantEncrypt(@NotNull IGrantable grantee)
grantee - This parameter is required.@Stability(value=Experimental) @NotNull Grant grantEncryptDecrypt(@NotNull IGrantable grantee)
grantee - This parameter is required.Copyright © 2021. All rights reserved.