{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.ElastiCache.ListAllowedNodeTypeModifications
(
listAllowedNodeTypeModifications
, ListAllowedNodeTypeModifications
, lantmCacheClusterId
, lantmReplicationGroupId
, listAllowedNodeTypeModificationsResponse
, ListAllowedNodeTypeModificationsResponse
, lantmrsScaleUpModifications
, lantmrsResponseStatus
) where
import Network.AWS.ElastiCache.Types
import Network.AWS.ElastiCache.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ListAllowedNodeTypeModifications = ListAllowedNodeTypeModifications'
{ _lantmCacheClusterId :: !(Maybe Text)
, _lantmReplicationGroupId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listAllowedNodeTypeModifications
:: ListAllowedNodeTypeModifications
listAllowedNodeTypeModifications =
ListAllowedNodeTypeModifications'
{ _lantmCacheClusterId = Nothing
, _lantmReplicationGroupId = Nothing
}
lantmCacheClusterId :: Lens' ListAllowedNodeTypeModifications (Maybe Text)
lantmCacheClusterId = lens _lantmCacheClusterId (\ s a -> s{_lantmCacheClusterId = a});
lantmReplicationGroupId :: Lens' ListAllowedNodeTypeModifications (Maybe Text)
lantmReplicationGroupId = lens _lantmReplicationGroupId (\ s a -> s{_lantmReplicationGroupId = a});
instance AWSRequest ListAllowedNodeTypeModifications
where
type Rs ListAllowedNodeTypeModifications =
ListAllowedNodeTypeModificationsResponse
request = postQuery elastiCache
response
= receiveXMLWrapper
"ListAllowedNodeTypeModificationsResult"
(\ s h x ->
ListAllowedNodeTypeModificationsResponse' <$>
(x .@? "ScaleUpModifications" .!@ mempty >>=
may (parseXMLList "member"))
<*> (pure (fromEnum s)))
instance Hashable ListAllowedNodeTypeModifications
instance NFData ListAllowedNodeTypeModifications
instance ToHeaders ListAllowedNodeTypeModifications
where
toHeaders = const mempty
instance ToPath ListAllowedNodeTypeModifications
where
toPath = const "/"
instance ToQuery ListAllowedNodeTypeModifications
where
toQuery ListAllowedNodeTypeModifications'{..}
= mconcat
["Action" =:
("ListAllowedNodeTypeModifications" :: ByteString),
"Version" =: ("2015-02-02" :: ByteString),
"CacheClusterId" =: _lantmCacheClusterId,
"ReplicationGroupId" =: _lantmReplicationGroupId]
data ListAllowedNodeTypeModificationsResponse = ListAllowedNodeTypeModificationsResponse'
{ _lantmrsScaleUpModifications :: !(Maybe [Text])
, _lantmrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listAllowedNodeTypeModificationsResponse
:: Int
-> ListAllowedNodeTypeModificationsResponse
listAllowedNodeTypeModificationsResponse pResponseStatus_ =
ListAllowedNodeTypeModificationsResponse'
{ _lantmrsScaleUpModifications = Nothing
, _lantmrsResponseStatus = pResponseStatus_
}
lantmrsScaleUpModifications :: Lens' ListAllowedNodeTypeModificationsResponse [Text]
lantmrsScaleUpModifications = lens _lantmrsScaleUpModifications (\ s a -> s{_lantmrsScaleUpModifications = a}) . _Default . _Coerce;
lantmrsResponseStatus :: Lens' ListAllowedNodeTypeModificationsResponse Int
lantmrsResponseStatus = lens _lantmrsResponseStatus (\ s a -> s{_lantmrsResponseStatus = a});
instance NFData
ListAllowedNodeTypeModificationsResponse