{-# 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.EC2.EnableVPCClassicLinkDNSSupport
(
enableVPCClassicLinkDNSSupport
, EnableVPCClassicLinkDNSSupport
, evcldsVPCId
, enableVPCClassicLinkDNSSupportResponse
, EnableVPCClassicLinkDNSSupportResponse
, evcldsrsReturn
, evcldsrsResponseStatus
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype EnableVPCClassicLinkDNSSupport = EnableVPCClassicLinkDNSSupport'
{ _evcldsVPCId :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
enableVPCClassicLinkDNSSupport
:: EnableVPCClassicLinkDNSSupport
enableVPCClassicLinkDNSSupport =
EnableVPCClassicLinkDNSSupport' {_evcldsVPCId = Nothing}
evcldsVPCId :: Lens' EnableVPCClassicLinkDNSSupport (Maybe Text)
evcldsVPCId = lens _evcldsVPCId (\ s a -> s{_evcldsVPCId = a})
instance AWSRequest EnableVPCClassicLinkDNSSupport
where
type Rs EnableVPCClassicLinkDNSSupport =
EnableVPCClassicLinkDNSSupportResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
EnableVPCClassicLinkDNSSupportResponse' <$>
(x .@? "return") <*> (pure (fromEnum s)))
instance Hashable EnableVPCClassicLinkDNSSupport
where
instance NFData EnableVPCClassicLinkDNSSupport where
instance ToHeaders EnableVPCClassicLinkDNSSupport
where
toHeaders = const mempty
instance ToPath EnableVPCClassicLinkDNSSupport where
toPath = const "/"
instance ToQuery EnableVPCClassicLinkDNSSupport where
toQuery EnableVPCClassicLinkDNSSupport'{..}
= mconcat
["Action" =:
("EnableVpcClassicLinkDnsSupport" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"VpcId" =: _evcldsVPCId]
data EnableVPCClassicLinkDNSSupportResponse = EnableVPCClassicLinkDNSSupportResponse'
{ _evcldsrsReturn :: !(Maybe Bool)
, _evcldsrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
enableVPCClassicLinkDNSSupportResponse
:: Int
-> EnableVPCClassicLinkDNSSupportResponse
enableVPCClassicLinkDNSSupportResponse pResponseStatus_ =
EnableVPCClassicLinkDNSSupportResponse'
{_evcldsrsReturn = Nothing, _evcldsrsResponseStatus = pResponseStatus_}
evcldsrsReturn :: Lens' EnableVPCClassicLinkDNSSupportResponse (Maybe Bool)
evcldsrsReturn = lens _evcldsrsReturn (\ s a -> s{_evcldsrsReturn = a})
evcldsrsResponseStatus :: Lens' EnableVPCClassicLinkDNSSupportResponse Int
evcldsrsResponseStatus = lens _evcldsrsResponseStatus (\ s a -> s{_evcldsrsResponseStatus = a})
instance NFData
EnableVPCClassicLinkDNSSupportResponse
where