module Network.AWS.CloudHSM.ListAvailableZones
(
ListAvailableZones
, listAvailableZones
, ListAvailableZonesResponse
, listAvailableZonesResponse
, lazrAZList
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.CloudHSM.Types
import qualified GHC.Exts
data ListAvailableZones = ListAvailableZones
deriving (Eq, Ord, Read, Show, Generic)
listAvailableZones :: ListAvailableZones
listAvailableZones = ListAvailableZones
newtype ListAvailableZonesResponse = ListAvailableZonesResponse
{ _lazrAZList :: List "AZList" Text
} deriving (Eq, Ord, Read, Show, Monoid, Semigroup)
instance GHC.Exts.IsList ListAvailableZonesResponse where
type Item ListAvailableZonesResponse = Text
fromList = ListAvailableZonesResponse . GHC.Exts.fromList
toList = GHC.Exts.toList . _lazrAZList
listAvailableZonesResponse :: ListAvailableZonesResponse
listAvailableZonesResponse = ListAvailableZonesResponse
{ _lazrAZList = mempty
}
lazrAZList :: Lens' ListAvailableZonesResponse [Text]
lazrAZList = lens _lazrAZList (\s a -> s { _lazrAZList = a }) . _List
instance ToPath ListAvailableZones where
toPath = const "/"
instance ToQuery ListAvailableZones where
toQuery = const mempty
instance ToHeaders ListAvailableZones
instance ToJSON ListAvailableZones where
toJSON = const (toJSON Empty)
instance AWSRequest ListAvailableZones where
type Sv ListAvailableZones = CloudHSM
type Rs ListAvailableZones = ListAvailableZonesResponse
request = post "ListAvailableZones"
response = jsonResponse
instance FromJSON ListAvailableZonesResponse where
parseJSON = withObject "ListAvailableZonesResponse" $ \o -> ListAvailableZonesResponse
<$> o .:? "AZList" .!= mempty