Class Expiration

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Expiration
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:23:55.790Z") @Stability(Stable) public class Expiration extends software.amazon.jsii.JsiiObject
Represents a date of expiration.

The amount can be specified either as a Date object, timestamp, Duration or string.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 Expiration expiration = Expiration.after(Duration.minutes(30));
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Expiration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Expiration(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Expiration
    Expire once the specified duration has passed since deployment time.
    static Expiration
    Expire at the specified date.
    static Expiration
    Expire at the specified timestamp.
    static Expiration
    Expire at specified date, represented as a string.
    Expiration value as a Date object.
    Check if Expiration expires after input.
    Check if Expiration expires before input.
    Expiration Value in a formatted Unix Epoch Time in seconds.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Expiration

      protected Expiration(software.amazon.jsii.JsiiObjectRef objRef)
    • Expiration

      protected Expiration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • after

      @Stability(Stable) @NotNull public static Expiration after(@NotNull Duration t)
      Expire once the specified duration has passed since deployment time.

      Parameters:
      t - the duration to wait before expiring. This parameter is required.
    • atDate

      @Stability(Stable) @NotNull public static Expiration atDate(@NotNull Instant d)
      Expire at the specified date.

      Parameters:
      d - date to expire at. This parameter is required.
    • atTimestamp

      @Stability(Stable) @NotNull public static Expiration atTimestamp(@NotNull Number t)
      Expire at the specified timestamp.

      Parameters:
      t - timestamp in unix milliseconds. This parameter is required.
    • fromString

      @Stability(Stable) @NotNull public static Expiration fromString(@NotNull String s)
      Expire at specified date, represented as a string.

      Parameters:
      s - the string that represents date to expire at. This parameter is required.
    • isAfter

      @Stability(Stable) @NotNull public Boolean isAfter(@NotNull Duration t)
      Check if Expiration expires after input.

      Parameters:
      t - the duration to check against. This parameter is required.
    • isBefore

      @Stability(Stable) @NotNull public Boolean isBefore(@NotNull Duration t)
      Check if Expiration expires before input.

      Parameters:
      t - the duration to check against. This parameter is required.
    • toEpoch

      @Stability(Stable) @NotNull public Number toEpoch()
      Expiration Value in a formatted Unix Epoch Time in seconds.
    • getDate

      @Stability(Stable) @NotNull public Instant getDate()
      Expiration value as a Date object.