Class Expiration
Represents a date of expiration.
Inheritance
Namespace: Amazon.CDK
Assembly: Amazon.CDK.dll
Syntax (csharp)
public class Expiration : DeputyBase
Syntax (vb)
Public Class Expiration
Inherits DeputyBase
Remarks
The amount can be specified either as a Date object, timestamp, Duration or string.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var expiration = Expiration.After(Duration.Minutes(30));
Synopsis
Constructors
Expiration(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Expiration(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
Date | Expiration value as a Date object. |
Methods
After(Duration) | Expire once the specified duration has passed since deployment time. |
AtDate(DateTime) | Expire at the specified date. |
AtTimestamp(Double) | Expire at the specified timestamp. |
FromString(String) | Expire at specified date, represented as a string. |
IsAfter(Duration) | Check if Exipiration expires after input. |
IsBefore(Duration) | Check if Exipiration expires before input. |
ToEpoch() | Exipration Value in a formatted Unix Epoch Time in seconds. |
Constructors
Expiration(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Expiration(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Expiration(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Expiration(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
Date
Expiration value as a Date object.
public virtual DateTime Date { get; }
Property Value
System.DateTime
Methods
After(Duration)
Expire once the specified duration has passed since deployment time.
public static Expiration After(Duration t)
Parameters
- t Duration
the duration to wait before expiring.
Returns
AtDate(DateTime)
Expire at the specified date.
public static Expiration AtDate(DateTime d)
Parameters
- d System.DateTime
date to expire at.
Returns
AtTimestamp(Double)
Expire at the specified timestamp.
public static Expiration AtTimestamp(double t)
Parameters
- t System.Double
timestamp in unix milliseconds.
Returns
FromString(String)
Expire at specified date, represented as a string.
public static Expiration FromString(string s)
Parameters
- s System.String
the string that represents date to expire at.
Returns
IsAfter(Duration)
Check if Exipiration expires after input.
public virtual bool IsAfter(Duration t)
Parameters
- t Duration
the duration to check against.
Returns
System.Boolean
IsBefore(Duration)
Check if Exipiration expires before input.
public virtual bool IsBefore(Duration t)
Parameters
- t Duration
the duration to check against.
Returns
System.Boolean
ToEpoch()
Exipration Value in a formatted Unix Epoch Time in seconds.
public virtual double ToEpoch()
Returns
System.Double