@Generated(value="jsii-pacmak/1.52.1 (build 5ccc8f6)", date="2022-01-20T19:49:54.133Z") @Stability(value=Stable) public class Expiration extends software.amazon.jsii.JsiiObject
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.core.*; Expiration expiration = Expiration.after(Duration.minutes(30));
Modifier | Constructor and Description |
---|---|
protected |
Expiration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Expiration(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static Expiration |
after(Duration t)
Expire once the specified duration has passed since deployment time.
|
static Expiration |
atDate(Instant d)
Expire at the specified date.
|
static Expiration |
atTimestamp(Number t)
Expire at the specified timestamp.
|
static Expiration |
fromString(String s)
Expire at specified date, represented as a string.
|
Instant |
getDate()
Expiration value as a Date object.
|
Boolean |
isAfter(Duration t)
Check if Exipiration expires after input.
|
Boolean |
isBefore(Duration t)
Check if Exipiration expires before input.
|
Number |
toEpoch()
Exipration Value in a formatted Unix Epoch Time in seconds.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
protected Expiration(software.amazon.jsii.JsiiObjectRef objRef)
protected Expiration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static Expiration after(@NotNull Duration t)
t
- the duration to wait before expiring. This parameter is required.@Stability(value=Stable) @NotNull public static Expiration atDate(@NotNull Instant d)
d
- date to expire at. This parameter is required.@Stability(value=Stable) @NotNull public static Expiration atTimestamp(@NotNull Number t)
t
- timestamp in unix milliseconds. This parameter is required.@Stability(value=Stable) @NotNull public static Expiration fromString(@NotNull String s)
s
- the string that represents date to expire at. This parameter is required.@Stability(value=Stable) @NotNull public Boolean isAfter(@NotNull Duration t)
t
- the duration to check against. This parameter is required.@Stability(value=Stable) @NotNull public Boolean isBefore(@NotNull Duration t)
t
- the duration to check against. This parameter is required.@Stability(value=Stable) @NotNull public Number toEpoch()
@Stability(value=Stable) @NotNull public Instant getDate()
Copyright © 2022. All rights reserved.