Table of Contents

Class TimeToLiveSpecification

Namespace
DynaSharp.Requests
Assembly
DynaSharp.dll

The Time to Live setting of a table: whether DynamoDB deletes expired items, and which attribute holds the expiry time.

public sealed record TimeToLiveSpecification : IEquatable<TimeToLiveSpecification>
Inheritance
TimeToLiveSpecification
Implements
Inherited Members

Remarks

The attribute of an item must be a number holding a Unix timestamp in seconds. Items without the attribute, or with another type of value, never expire.

Constructors

TimeToLiveSpecification()

public TimeToLiveSpecification()

Properties

AttributeName

Gets the name of the attribute with the expiry time, 1 to 255 characters. It cannot be changed while Time to Live is on; turn it off and on again with the new name.

public required string AttributeName { get; init; }

Property Value

string

Enabled

Gets a value indicating whether expired items are deleted.

public required bool Enabled { get; init; }

Property Value

bool

Methods

Equals(TimeToLiveSpecification?)

public bool Equals(TimeToLiveSpecification? other)

Parameters

other TimeToLiveSpecification

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(TimeToLiveSpecification?, TimeToLiveSpecification?)

public static bool operator ==(TimeToLiveSpecification? left, TimeToLiveSpecification? right)

Parameters

left TimeToLiveSpecification
right TimeToLiveSpecification

Returns

bool

operator !=(TimeToLiveSpecification?, TimeToLiveSpecification?)

public static bool operator !=(TimeToLiveSpecification? left, TimeToLiveSpecification? right)

Parameters

left TimeToLiveSpecification
right TimeToLiveSpecification

Returns

bool