Class IKey.Jsii$Proxy

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.kms.IKey.Jsii$Proxy
All Implemented Interfaces:
IResource, IResource.Jsii$Default, IKey, IKey.Jsii$Default, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IConstruct.Jsii$Default, software.constructs.IDependable, software.constructs.IDependable.Jsii$Default
Enclosing interface:
IKey

@Internal public static final class IKey.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements IKey.Jsii$Default
A proxy class which represents a concrete javascript instance of this type.
  • Constructor Details

    • Jsii$Proxy

      protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
  • Method Details

    • getNode

      @Stability(Stable) @NotNull public final software.constructs.Node getNode()
      The tree node.
      Specified by:
      getNode in interface software.constructs.IConstruct
      Specified by:
      getNode in interface software.constructs.IConstruct.Jsii$Default
      Specified by:
      getNode in interface IKey.Jsii$Default
      Specified by:
      getNode in interface IResource.Jsii$Default
    • getEnv

      @Stability(Stable) @NotNull public final ResourceEnvironment getEnv()
      The environment this resource belongs to.

      For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.

      Specified by:
      getEnv in interface IKey.Jsii$Default
      Specified by:
      getEnv in interface IResource
      Specified by:
      getEnv in interface IResource.Jsii$Default
    • getStack

      @Stability(Stable) @NotNull public final Stack getStack()
      The stack in which this resource is defined.
      Specified by:
      getStack in interface IKey.Jsii$Default
      Specified by:
      getStack in interface IResource
      Specified by:
      getStack in interface IResource.Jsii$Default
    • getKeyArn

      @Stability(Stable) @NotNull public final String getKeyArn()
      The ARN of the key.
      Specified by:
      getKeyArn in interface IKey
      Specified by:
      getKeyArn in interface IKey.Jsii$Default
    • getKeyId

      @Stability(Stable) @NotNull public final String getKeyId()
      The ID of the key (the part that looks something like: 1234abcd-12ab-34cd-56ef-1234567890ab).
      Specified by:
      getKeyId in interface IKey
      Specified by:
      getKeyId in interface IKey.Jsii$Default
    • applyRemovalPolicy

      @Stability(Stable) public final void applyRemovalPolicy(@NotNull RemovalPolicy policy)
      Apply the given removal policy to this resource.

      The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

      The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

      Specified by:
      applyRemovalPolicy in interface IKey.Jsii$Default
      Specified by:
      applyRemovalPolicy in interface IResource
      Specified by:
      applyRemovalPolicy in interface IResource.Jsii$Default
      Parameters:
      policy - This parameter is required.
    • addAlias

      @Stability(Stable) @NotNull public final Alias addAlias(@NotNull String alias)
      Defines a new alias for the key.

      Specified by:
      addAlias in interface IKey
      Specified by:
      addAlias in interface IKey.Jsii$Default
      Parameters:
      alias - This parameter is required.
    • addToResourcePolicy

      @Stability(Stable) @NotNull public final AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement, @Nullable Boolean allowNoOp)
      Adds a statement to the KMS key resource policy.

      Specified by:
      addToResourcePolicy in interface IKey
      Specified by:
      addToResourcePolicy in interface IKey.Jsii$Default
      Parameters:
      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.
    • addToResourcePolicy

      @Stability(Stable) @NotNull public final AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement)
      Adds a statement to the KMS key resource policy.

      Specified by:
      addToResourcePolicy in interface IKey
      Parameters:
      statement - The policy statement to add. This parameter is required.
    • grant

      @Stability(Stable) @NotNull public final Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions)
      Grant the indicated permissions on this key to the given principal.

      Specified by:
      grant in interface IKey
      Specified by:
      grant in interface IKey.Jsii$Default
      Parameters:
      grantee - This parameter is required.
      actions - This parameter is required.
    • grantDecrypt

      @Stability(Stable) @NotNull public final Grant grantDecrypt(@NotNull IGrantable grantee)
      Grant decryption permissions using this key to the given principal.

      Specified by:
      grantDecrypt in interface IKey
      Specified by:
      grantDecrypt in interface IKey.Jsii$Default
      Parameters:
      grantee - This parameter is required.
    • grantEncrypt

      @Stability(Stable) @NotNull public final Grant grantEncrypt(@NotNull IGrantable grantee)
      Grant encryption permissions using this key to the given principal.

      Specified by:
      grantEncrypt in interface IKey
      Specified by:
      grantEncrypt in interface IKey.Jsii$Default
      Parameters:
      grantee - This parameter is required.
    • grantEncryptDecrypt

      @Stability(Stable) @NotNull public final Grant grantEncryptDecrypt(@NotNull IGrantable grantee)
      Grant encryption and decryption permissions using this key to the given principal.

      Specified by:
      grantEncryptDecrypt in interface IKey
      Specified by:
      grantEncryptDecrypt in interface IKey.Jsii$Default
      Parameters:
      grantee - This parameter is required.
    • grantGenerateMac

      @Stability(Stable) @NotNull public final Grant grantGenerateMac(@NotNull IGrantable grantee)
      Grant permissions to generating MACs to the given principal.

      Specified by:
      grantGenerateMac in interface IKey
      Specified by:
      grantGenerateMac in interface IKey.Jsii$Default
      Parameters:
      grantee - This parameter is required.
    • grantVerifyMac

      @Stability(Stable) @NotNull public final Grant grantVerifyMac(@NotNull IGrantable grantee)
      Grant permissions to verifying MACs to the given principal.

      Specified by:
      grantVerifyMac in interface IKey
      Specified by:
      grantVerifyMac in interface IKey.Jsii$Default
      Parameters:
      grantee - This parameter is required.