Interface IKey.Jsii$Default

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IConstruct.Jsii$Default, software.constructs.IDependable, software.constructs.IDependable.Jsii$Default, IKey, IResource, IResource.Jsii$Default, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
IAlias.Jsii$Default
All Known Implementing Classes:
IAlias.Jsii$Proxy, IKey.Jsii$Proxy
Enclosing interface:
IKey

@Internal public static interface IKey.Jsii$Default extends IKey, IResource.Jsii$Default
Internal default implementation for IKey.
  • Method Details

    • getNode

      @Stability(Stable) @NotNull default 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 IResource.Jsii$Default
    • getEnv

      @Stability(Stable) @NotNull default 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 IResource
      Specified by:
      getEnv in interface IResource.Jsii$Default
    • getStack

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

      @Stability(Stable) @NotNull default String getKeyArn()
      The ARN of the key.
      Specified by:
      getKeyArn in interface IKey
    • getKeyId

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

      @Stability(Stable) default 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 IResource
      Specified by:
      applyRemovalPolicy in interface IResource.Jsii$Default
      Parameters:
      policy - This parameter is required.
    • addAlias

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

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

      @Stability(Stable) @NotNull default AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement, @Nullable Boolean allowNoOp)
      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.
      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.
    • grant

      @Stability(Stable) @NotNull default 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
      Parameters:
      grantee - This parameter is required.
      actions - This parameter is required.
    • grantDecrypt

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

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

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

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

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

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

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

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

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

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