Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
The UpdateTimeToLive method will enable or disable TTL for the specified table. A successful UpdateTimeToLive
call returns the current TimeToLiveSpecification
; it may take up to one hour for the change to fully process. Any additional UpdateTimeToLive
calls for the same table during this one hour duration result in a ValidationException
.
TTL compares the current time in epoch time format to the time stored in the TTL attribute of an item. If the epoch time value stored in the attribute is less than the current time, the item is marked as expired and subsequently deleted.
DynamoDB deletes expired items on a best-effort basis to ensure availability of throughput for other data operations.
Important: DynamoDB typically deletes expired items within two days of expiration. The exact duration within which an item gets deleted after expiration is specific to the nature of the workload. Items that have expired and not been deleted will still show up in reads, queries, and scans.
As items are deleted, they are removed from any Local Secondary Index and Global Secondary Index immediately in the same eventually consistent way as a standard delete operation.
For more information, see Time To Live in the Amazon DynamoDB Developer Guide.
Synopsis
- updateTimeToLive :: Text -> TimeToLiveSpecification -> UpdateTimeToLive
- data UpdateTimeToLive
- uttlTableName :: Lens' UpdateTimeToLive Text
- uttlTimeToLiveSpecification :: Lens' UpdateTimeToLive TimeToLiveSpecification
- updateTimeToLiveResponse :: Int -> UpdateTimeToLiveResponse
- data UpdateTimeToLiveResponse
- uttlrsTimeToLiveSpecification :: Lens' UpdateTimeToLiveResponse (Maybe TimeToLiveSpecification)
- uttlrsResponseStatus :: Lens' UpdateTimeToLiveResponse Int
Creating a Request
Creates a value of UpdateTimeToLive
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
uttlTableName
- The name of the table to be configured.uttlTimeToLiveSpecification
- Represents the settings used to enable or disable Time to Live for the specified table.
data UpdateTimeToLive Source #
Represents the input of an UpdateTimeToLive
operation.
See: updateTimeToLive
smart constructor.
Instances
Request Lenses
uttlTableName :: Lens' UpdateTimeToLive Text Source #
The name of the table to be configured.
uttlTimeToLiveSpecification :: Lens' UpdateTimeToLive TimeToLiveSpecification Source #
Represents the settings used to enable or disable Time to Live for the specified table.
Destructuring the Response
updateTimeToLiveResponse Source #
Creates a value of UpdateTimeToLiveResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
uttlrsTimeToLiveSpecification
- Represents the output of anUpdateTimeToLive
operation.uttlrsResponseStatus
- -- | The response status code.
data UpdateTimeToLiveResponse Source #
See: updateTimeToLiveResponse
smart constructor.
Instances
Response Lenses
uttlrsTimeToLiveSpecification :: Lens' UpdateTimeToLiveResponse (Maybe TimeToLiveSpecification) Source #
Represents the output of an UpdateTimeToLive
operation.
uttlrsResponseStatus :: Lens' UpdateTimeToLiveResponse Int Source #
- - | The response status code.