Enum ObjectLockMode

java.lang.Object
java.lang.Enum<ObjectLockMode>
software.amazon.awscdk.services.s3.ObjectLockMode
All Implemented Interfaces:
Serializable, Comparable<ObjectLockMode>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-11T23:26:40.683Z") @Stability(Stable) public enum ObjectLockMode extends Enum<ObjectLockMode>
Modes in which S3 Object Lock retention can be configured.

See Also:
  • Enum Constant Details

    • GOVERNANCE

      @Stability(Stable) public static final ObjectLockMode GOVERNANCE
      The Governance retention mode.

      With governance mode, you protect objects against being deleted by most users, but you can still grant some users permission to alter the retention settings or delete the object if necessary. You can also use governance mode to test retention-period settings before creating a compliance-mode retention period.

    • COMPLIANCE

      @Stability(Stable) public static final ObjectLockMode COMPLIANCE
      The Compliance retention mode.

      When an object is locked in compliance mode, its retention mode can't be changed, and its retention period can't be shortened. Compliance mode helps ensure that an object version can't be overwritten or deleted for the duration of the retention period.

  • Method Details

    • values

      public static ObjectLockMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ObjectLockMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null