module Network.AWS.Kinesis.IncreaseStreamRetentionPeriod
(
increaseStreamRetentionPeriod
, IncreaseStreamRetentionPeriod
, isrpStreamName
, isrpRetentionPeriodHours
, increaseStreamRetentionPeriodResponse
, IncreaseStreamRetentionPeriodResponse
) where
import Network.AWS.Kinesis.Types
import Network.AWS.Kinesis.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data IncreaseStreamRetentionPeriod = IncreaseStreamRetentionPeriod'
{ _isrpStreamName :: !Text
, _isrpRetentionPeriodHours :: !Nat
} deriving (Eq,Read,Show,Data,Typeable,Generic)
increaseStreamRetentionPeriod
:: Text
-> Natural
-> IncreaseStreamRetentionPeriod
increaseStreamRetentionPeriod pStreamName_ pRetentionPeriodHours_ =
IncreaseStreamRetentionPeriod'
{ _isrpStreamName = pStreamName_
, _isrpRetentionPeriodHours = _Nat # pRetentionPeriodHours_
}
isrpStreamName :: Lens' IncreaseStreamRetentionPeriod Text
isrpStreamName = lens _isrpStreamName (\ s a -> s{_isrpStreamName = a});
isrpRetentionPeriodHours :: Lens' IncreaseStreamRetentionPeriod Natural
isrpRetentionPeriodHours = lens _isrpRetentionPeriodHours (\ s a -> s{_isrpRetentionPeriodHours = a}) . _Nat;
instance AWSRequest IncreaseStreamRetentionPeriod
where
type Rs IncreaseStreamRetentionPeriod =
IncreaseStreamRetentionPeriodResponse
request = postJSON kinesis
response
= receiveNull IncreaseStreamRetentionPeriodResponse'
instance Hashable IncreaseStreamRetentionPeriod
instance ToHeaders IncreaseStreamRetentionPeriod
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Kinesis_20131202.IncreaseStreamRetentionPeriod" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON IncreaseStreamRetentionPeriod where
toJSON IncreaseStreamRetentionPeriod'{..}
= object
(catMaybes
[Just ("StreamName" .= _isrpStreamName),
Just
("RetentionPeriodHours" .=
_isrpRetentionPeriodHours)])
instance ToPath IncreaseStreamRetentionPeriod where
toPath = const "/"
instance ToQuery IncreaseStreamRetentionPeriod where
toQuery = const mempty
data IncreaseStreamRetentionPeriodResponse =
IncreaseStreamRetentionPeriodResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
increaseStreamRetentionPeriodResponse
:: IncreaseStreamRetentionPeriodResponse
increaseStreamRetentionPeriodResponse = IncreaseStreamRetentionPeriodResponse'