Interface IKey.Jsii$Default

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IConstruct.Jsii$Default, software.constructs.IDependable, software.constructs.IDependable.Jsii$Default, IEnvironmentAware, IEnvironmentAware.Jsii$Default, IKey, IKeyRef, IKeyRef.Jsii$Default, 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, IKeyRef.Jsii$Default
Internal default implementation for IKey.
  • Method Details

    • 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
    • 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.
    • addToResourcePolicy

      @Stability(Stable) @NotNull default 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 default Grant grant(@NotNull IGrantable grantee, @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.
    • grantSign

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

      Specified by:
      grantSign in interface IKey
      Parameters:
      grantee - This parameter is required.
    • grantSignVerify

      @Stability(Stable) @NotNull default Grant grantSignVerify(@NotNull IGrantable grantee)
      Grant sign and verify permissions using this key to the given principal.

      Specified by:
      grantSignVerify in interface IKey
      Parameters:
      grantee - This parameter is required.
    • grantVerify

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

      Specified by:
      grantVerify 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.