{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DynamoDB.UpdateTimeToLive
-- Copyright   : (c) 2013-2021 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)
--
-- The @UpdateTimeToLive@ method enables or disables Time to Live (TTL) for
-- the specified table. A successful @UpdateTimeToLive@ call returns the
-- current @TimeToLiveSpecification@. It can 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.
--
-- The epoch time format is the number of seconds elapsed since 12:00:00 AM
-- January 1, 1970 UTC.
--
-- DynamoDB deletes expired items on a best-effort basis to ensure
-- availability of throughput for other data operations.
--
-- 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
-- <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html Time To Live>
-- in the Amazon DynamoDB Developer Guide.
module Amazonka.DynamoDB.UpdateTimeToLive
  ( -- * Creating a Request
    UpdateTimeToLive (..),
    newUpdateTimeToLive,

    -- * Request Lenses
    updateTimeToLive_tableName,
    updateTimeToLive_timeToLiveSpecification,

    -- * Destructuring the Response
    UpdateTimeToLiveResponse (..),
    newUpdateTimeToLiveResponse,

    -- * Response Lenses
    updateTimeToLiveResponse_timeToLiveSpecification,
    updateTimeToLiveResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents the input of an @UpdateTimeToLive@ operation.
--
-- /See:/ 'newUpdateTimeToLive' smart constructor.
data UpdateTimeToLive = UpdateTimeToLive'
  { -- | The name of the table to be configured.
    UpdateTimeToLive -> Text
tableName :: Prelude.Text,
    -- | Represents the settings used to enable or disable Time to Live for the
    -- specified table.
    UpdateTimeToLive -> TimeToLiveSpecification
timeToLiveSpecification :: TimeToLiveSpecification
  }
  deriving (UpdateTimeToLive -> UpdateTimeToLive -> Bool
(UpdateTimeToLive -> UpdateTimeToLive -> Bool)
-> (UpdateTimeToLive -> UpdateTimeToLive -> Bool)
-> Eq UpdateTimeToLive
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTimeToLive -> UpdateTimeToLive -> Bool
$c/= :: UpdateTimeToLive -> UpdateTimeToLive -> Bool
== :: UpdateTimeToLive -> UpdateTimeToLive -> Bool
$c== :: UpdateTimeToLive -> UpdateTimeToLive -> Bool
Prelude.Eq, ReadPrec [UpdateTimeToLive]
ReadPrec UpdateTimeToLive
Int -> ReadS UpdateTimeToLive
ReadS [UpdateTimeToLive]
(Int -> ReadS UpdateTimeToLive)
-> ReadS [UpdateTimeToLive]
-> ReadPrec UpdateTimeToLive
-> ReadPrec [UpdateTimeToLive]
-> Read UpdateTimeToLive
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTimeToLive]
$creadListPrec :: ReadPrec [UpdateTimeToLive]
readPrec :: ReadPrec UpdateTimeToLive
$creadPrec :: ReadPrec UpdateTimeToLive
readList :: ReadS [UpdateTimeToLive]
$creadList :: ReadS [UpdateTimeToLive]
readsPrec :: Int -> ReadS UpdateTimeToLive
$creadsPrec :: Int -> ReadS UpdateTimeToLive
Prelude.Read, Int -> UpdateTimeToLive -> ShowS
[UpdateTimeToLive] -> ShowS
UpdateTimeToLive -> String
(Int -> UpdateTimeToLive -> ShowS)
-> (UpdateTimeToLive -> String)
-> ([UpdateTimeToLive] -> ShowS)
-> Show UpdateTimeToLive
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTimeToLive] -> ShowS
$cshowList :: [UpdateTimeToLive] -> ShowS
show :: UpdateTimeToLive -> String
$cshow :: UpdateTimeToLive -> String
showsPrec :: Int -> UpdateTimeToLive -> ShowS
$cshowsPrec :: Int -> UpdateTimeToLive -> ShowS
Prelude.Show, (forall x. UpdateTimeToLive -> Rep UpdateTimeToLive x)
-> (forall x. Rep UpdateTimeToLive x -> UpdateTimeToLive)
-> Generic UpdateTimeToLive
forall x. Rep UpdateTimeToLive x -> UpdateTimeToLive
forall x. UpdateTimeToLive -> Rep UpdateTimeToLive x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTimeToLive x -> UpdateTimeToLive
$cfrom :: forall x. UpdateTimeToLive -> Rep UpdateTimeToLive x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTimeToLive' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'tableName', 'updateTimeToLive_tableName' - The name of the table to be configured.
--
-- 'timeToLiveSpecification', 'updateTimeToLive_timeToLiveSpecification' - Represents the settings used to enable or disable Time to Live for the
-- specified table.
newUpdateTimeToLive ::
  -- | 'tableName'
  Prelude.Text ->
  -- | 'timeToLiveSpecification'
  TimeToLiveSpecification ->
  UpdateTimeToLive
newUpdateTimeToLive :: Text -> TimeToLiveSpecification -> UpdateTimeToLive
newUpdateTimeToLive
  Text
pTableName_
  TimeToLiveSpecification
pTimeToLiveSpecification_ =
    UpdateTimeToLive' :: Text -> TimeToLiveSpecification -> UpdateTimeToLive
UpdateTimeToLive'
      { $sel:tableName:UpdateTimeToLive' :: Text
tableName = Text
pTableName_,
        $sel:timeToLiveSpecification:UpdateTimeToLive' :: TimeToLiveSpecification
timeToLiveSpecification = TimeToLiveSpecification
pTimeToLiveSpecification_
      }

-- | The name of the table to be configured.
updateTimeToLive_tableName :: Lens.Lens' UpdateTimeToLive Prelude.Text
updateTimeToLive_tableName :: (Text -> f Text) -> UpdateTimeToLive -> f UpdateTimeToLive
updateTimeToLive_tableName = (UpdateTimeToLive -> Text)
-> (UpdateTimeToLive -> Text -> UpdateTimeToLive)
-> Lens UpdateTimeToLive UpdateTimeToLive Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTimeToLive' {Text
tableName :: Text
$sel:tableName:UpdateTimeToLive' :: UpdateTimeToLive -> Text
tableName} -> Text
tableName) (\s :: UpdateTimeToLive
s@UpdateTimeToLive' {} Text
a -> UpdateTimeToLive
s {$sel:tableName:UpdateTimeToLive' :: Text
tableName = Text
a} :: UpdateTimeToLive)

-- | Represents the settings used to enable or disable Time to Live for the
-- specified table.
updateTimeToLive_timeToLiveSpecification :: Lens.Lens' UpdateTimeToLive TimeToLiveSpecification
updateTimeToLive_timeToLiveSpecification :: (TimeToLiveSpecification -> f TimeToLiveSpecification)
-> UpdateTimeToLive -> f UpdateTimeToLive
updateTimeToLive_timeToLiveSpecification = (UpdateTimeToLive -> TimeToLiveSpecification)
-> (UpdateTimeToLive
    -> TimeToLiveSpecification -> UpdateTimeToLive)
-> Lens
     UpdateTimeToLive
     UpdateTimeToLive
     TimeToLiveSpecification
     TimeToLiveSpecification
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTimeToLive' {TimeToLiveSpecification
timeToLiveSpecification :: TimeToLiveSpecification
$sel:timeToLiveSpecification:UpdateTimeToLive' :: UpdateTimeToLive -> TimeToLiveSpecification
timeToLiveSpecification} -> TimeToLiveSpecification
timeToLiveSpecification) (\s :: UpdateTimeToLive
s@UpdateTimeToLive' {} TimeToLiveSpecification
a -> UpdateTimeToLive
s {$sel:timeToLiveSpecification:UpdateTimeToLive' :: TimeToLiveSpecification
timeToLiveSpecification = TimeToLiveSpecification
a} :: UpdateTimeToLive)

instance Core.AWSRequest UpdateTimeToLive where
  type
    AWSResponse UpdateTimeToLive =
      UpdateTimeToLiveResponse
  request :: UpdateTimeToLive -> Request UpdateTimeToLive
request = Service -> UpdateTimeToLive -> Request UpdateTimeToLive
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateTimeToLive
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTimeToLive)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateTimeToLive))
-> Logger
-> Service
-> Proxy UpdateTimeToLive
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTimeToLive)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe TimeToLiveSpecification -> Int -> UpdateTimeToLiveResponse
UpdateTimeToLiveResponse'
            (Maybe TimeToLiveSpecification -> Int -> UpdateTimeToLiveResponse)
-> Either String (Maybe TimeToLiveSpecification)
-> Either String (Int -> UpdateTimeToLiveResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe TimeToLiveSpecification)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"TimeToLiveSpecification")
            Either String (Int -> UpdateTimeToLiveResponse)
-> Either String Int -> Either String UpdateTimeToLiveResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateTimeToLive

instance Prelude.NFData UpdateTimeToLive

instance Core.ToHeaders UpdateTimeToLive where
  toHeaders :: UpdateTimeToLive -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateTimeToLive -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"DynamoDB_20120810.UpdateTimeToLive" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateTimeToLive where
  toJSON :: UpdateTimeToLive -> Value
toJSON UpdateTimeToLive' {Text
TimeToLiveSpecification
timeToLiveSpecification :: TimeToLiveSpecification
tableName :: Text
$sel:timeToLiveSpecification:UpdateTimeToLive' :: UpdateTimeToLive -> TimeToLiveSpecification
$sel:tableName:UpdateTimeToLive' :: UpdateTimeToLive -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"TimeToLiveSpecification"
                  Text -> TimeToLiveSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TimeToLiveSpecification
timeToLiveSpecification
              )
          ]
      )

instance Core.ToPath UpdateTimeToLive where
  toPath :: UpdateTimeToLive -> ByteString
toPath = ByteString -> UpdateTimeToLive -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery UpdateTimeToLive where
  toQuery :: UpdateTimeToLive -> QueryString
toQuery = QueryString -> UpdateTimeToLive -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateTimeToLiveResponse' smart constructor.
data UpdateTimeToLiveResponse = UpdateTimeToLiveResponse'
  { -- | Represents the output of an @UpdateTimeToLive@ operation.
    UpdateTimeToLiveResponse -> Maybe TimeToLiveSpecification
timeToLiveSpecification :: Prelude.Maybe TimeToLiveSpecification,
    -- | The response's http status code.
    UpdateTimeToLiveResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateTimeToLiveResponse -> UpdateTimeToLiveResponse -> Bool
(UpdateTimeToLiveResponse -> UpdateTimeToLiveResponse -> Bool)
-> (UpdateTimeToLiveResponse -> UpdateTimeToLiveResponse -> Bool)
-> Eq UpdateTimeToLiveResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTimeToLiveResponse -> UpdateTimeToLiveResponse -> Bool
$c/= :: UpdateTimeToLiveResponse -> UpdateTimeToLiveResponse -> Bool
== :: UpdateTimeToLiveResponse -> UpdateTimeToLiveResponse -> Bool
$c== :: UpdateTimeToLiveResponse -> UpdateTimeToLiveResponse -> Bool
Prelude.Eq, ReadPrec [UpdateTimeToLiveResponse]
ReadPrec UpdateTimeToLiveResponse
Int -> ReadS UpdateTimeToLiveResponse
ReadS [UpdateTimeToLiveResponse]
(Int -> ReadS UpdateTimeToLiveResponse)
-> ReadS [UpdateTimeToLiveResponse]
-> ReadPrec UpdateTimeToLiveResponse
-> ReadPrec [UpdateTimeToLiveResponse]
-> Read UpdateTimeToLiveResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTimeToLiveResponse]
$creadListPrec :: ReadPrec [UpdateTimeToLiveResponse]
readPrec :: ReadPrec UpdateTimeToLiveResponse
$creadPrec :: ReadPrec UpdateTimeToLiveResponse
readList :: ReadS [UpdateTimeToLiveResponse]
$creadList :: ReadS [UpdateTimeToLiveResponse]
readsPrec :: Int -> ReadS UpdateTimeToLiveResponse
$creadsPrec :: Int -> ReadS UpdateTimeToLiveResponse
Prelude.Read, Int -> UpdateTimeToLiveResponse -> ShowS
[UpdateTimeToLiveResponse] -> ShowS
UpdateTimeToLiveResponse -> String
(Int -> UpdateTimeToLiveResponse -> ShowS)
-> (UpdateTimeToLiveResponse -> String)
-> ([UpdateTimeToLiveResponse] -> ShowS)
-> Show UpdateTimeToLiveResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTimeToLiveResponse] -> ShowS
$cshowList :: [UpdateTimeToLiveResponse] -> ShowS
show :: UpdateTimeToLiveResponse -> String
$cshow :: UpdateTimeToLiveResponse -> String
showsPrec :: Int -> UpdateTimeToLiveResponse -> ShowS
$cshowsPrec :: Int -> UpdateTimeToLiveResponse -> ShowS
Prelude.Show, (forall x.
 UpdateTimeToLiveResponse -> Rep UpdateTimeToLiveResponse x)
-> (forall x.
    Rep UpdateTimeToLiveResponse x -> UpdateTimeToLiveResponse)
-> Generic UpdateTimeToLiveResponse
forall x.
Rep UpdateTimeToLiveResponse x -> UpdateTimeToLiveResponse
forall x.
UpdateTimeToLiveResponse -> Rep UpdateTimeToLiveResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateTimeToLiveResponse x -> UpdateTimeToLiveResponse
$cfrom :: forall x.
UpdateTimeToLiveResponse -> Rep UpdateTimeToLiveResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTimeToLiveResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'timeToLiveSpecification', 'updateTimeToLiveResponse_timeToLiveSpecification' - Represents the output of an @UpdateTimeToLive@ operation.
--
-- 'httpStatus', 'updateTimeToLiveResponse_httpStatus' - The response's http status code.
newUpdateTimeToLiveResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateTimeToLiveResponse
newUpdateTimeToLiveResponse :: Int -> UpdateTimeToLiveResponse
newUpdateTimeToLiveResponse Int
pHttpStatus_ =
  UpdateTimeToLiveResponse' :: Maybe TimeToLiveSpecification -> Int -> UpdateTimeToLiveResponse
UpdateTimeToLiveResponse'
    { $sel:timeToLiveSpecification:UpdateTimeToLiveResponse' :: Maybe TimeToLiveSpecification
timeToLiveSpecification =
        Maybe TimeToLiveSpecification
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateTimeToLiveResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Represents the output of an @UpdateTimeToLive@ operation.
updateTimeToLiveResponse_timeToLiveSpecification :: Lens.Lens' UpdateTimeToLiveResponse (Prelude.Maybe TimeToLiveSpecification)
updateTimeToLiveResponse_timeToLiveSpecification :: (Maybe TimeToLiveSpecification
 -> f (Maybe TimeToLiveSpecification))
-> UpdateTimeToLiveResponse -> f UpdateTimeToLiveResponse
updateTimeToLiveResponse_timeToLiveSpecification = (UpdateTimeToLiveResponse -> Maybe TimeToLiveSpecification)
-> (UpdateTimeToLiveResponse
    -> Maybe TimeToLiveSpecification -> UpdateTimeToLiveResponse)
-> Lens
     UpdateTimeToLiveResponse
     UpdateTimeToLiveResponse
     (Maybe TimeToLiveSpecification)
     (Maybe TimeToLiveSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTimeToLiveResponse' {Maybe TimeToLiveSpecification
timeToLiveSpecification :: Maybe TimeToLiveSpecification
$sel:timeToLiveSpecification:UpdateTimeToLiveResponse' :: UpdateTimeToLiveResponse -> Maybe TimeToLiveSpecification
timeToLiveSpecification} -> Maybe TimeToLiveSpecification
timeToLiveSpecification) (\s :: UpdateTimeToLiveResponse
s@UpdateTimeToLiveResponse' {} Maybe TimeToLiveSpecification
a -> UpdateTimeToLiveResponse
s {$sel:timeToLiveSpecification:UpdateTimeToLiveResponse' :: Maybe TimeToLiveSpecification
timeToLiveSpecification = Maybe TimeToLiveSpecification
a} :: UpdateTimeToLiveResponse)

-- | The response's http status code.
updateTimeToLiveResponse_httpStatus :: Lens.Lens' UpdateTimeToLiveResponse Prelude.Int
updateTimeToLiveResponse_httpStatus :: (Int -> f Int)
-> UpdateTimeToLiveResponse -> f UpdateTimeToLiveResponse
updateTimeToLiveResponse_httpStatus = (UpdateTimeToLiveResponse -> Int)
-> (UpdateTimeToLiveResponse -> Int -> UpdateTimeToLiveResponse)
-> Lens UpdateTimeToLiveResponse UpdateTimeToLiveResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTimeToLiveResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateTimeToLiveResponse' :: UpdateTimeToLiveResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateTimeToLiveResponse
s@UpdateTimeToLiveResponse' {} Int
a -> UpdateTimeToLiveResponse
s {$sel:httpStatus:UpdateTimeToLiveResponse' :: Int
httpStatus = Int
a} :: UpdateTimeToLiveResponse)

instance Prelude.NFData UpdateTimeToLiveResponse