Expiration
- class aws_cdk.Expiration(*args: Any, **kwargs)
Bases:
object
Represents a date of expiration.
The amount can be specified either as a Date object, timestamp, Duration or string.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk expiration = cdk.Expiration.after(cdk.Duration.minutes(30))
Methods
- is_after(t)
Check if Expiration expires after input.
- Parameters:
t (
Duration
) – the duration to check against.- Return type:
bool
- is_before(t)
Check if Expiration expires before input.
- Parameters:
t (
Duration
) – the duration to check against.- Return type:
bool
- to_epoch()
Expiration Value in a formatted Unix Epoch Time in seconds.
- Return type:
Union
[int
,float
]
Attributes
- date
Expiration value as a Date object.
Static Methods
- classmethod after(t)
Expire once the specified duration has passed since deployment time.
- Parameters:
t (
Duration
) – the duration to wait before expiring.- Return type:
- classmethod at_date(d)
Expire at the specified date.
- Parameters:
d (
datetime
) – date to expire at.- Return type:
- classmethod at_timestamp(t)
Expire at the specified timestamp.
- Parameters:
t (
Union
[int
,float
]) – timestamp in unix milliseconds.- Return type:
- classmethod from_string(s)
Expire at specified date, represented as a string.
- Parameters:
s (
str
) – the string that represents date to expire at.- Return type: