@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:51.658Z") public interface IKey extends 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(java.lang.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,
java.lang.Boolean allowNoOp)
Adds a statement to the KMS key resource policy.
|
java.lang.String |
getKeyArn()
The ARN of the key.
|
java.lang.String |
getKeyId()
The ID of the key (the part that looks something like: 1234abcd-12ab-34cd-56ef-1234567890ab).
|
Grant |
grant(IGrantable grantee,
java.lang.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
getNode
java.lang.String getKeyArn()
java.lang.String getKeyId()
Alias addAlias(java.lang.String alias)
alias
- This parameter is required.AddToResourcePolicyResult addToResourcePolicy(PolicyStatement statement, java.lang.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.AddToResourcePolicyResult addToResourcePolicy(PolicyStatement statement)
statement
- The policy statement to add. This parameter is required.Grant grant(IGrantable grantee, java.lang.String... actions)
grantee
- This parameter is required.actions
- This parameter is required.Grant grantDecrypt(IGrantable grantee)
grantee
- This parameter is required.Grant grantEncrypt(IGrantable grantee)
grantee
- This parameter is required.Grant grantEncryptDecrypt(IGrantable grantee)
grantee
- This parameter is required.