module Network.AWS.EC2.ModifySubnetAttribute
(
modifySubnetAttribute
, ModifySubnetAttribute
, msaMapPublicIPOnLaunch
, msaSubnetId
, modifySubnetAttributeResponse
, ModifySubnetAttributeResponse
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ModifySubnetAttribute = ModifySubnetAttribute'
{ _msaMapPublicIPOnLaunch :: !(Maybe AttributeBooleanValue)
, _msaSubnetId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifySubnetAttribute
:: Text
-> ModifySubnetAttribute
modifySubnetAttribute pSubnetId_ =
ModifySubnetAttribute'
{ _msaMapPublicIPOnLaunch = Nothing
, _msaSubnetId = pSubnetId_
}
msaMapPublicIPOnLaunch :: Lens' ModifySubnetAttribute (Maybe AttributeBooleanValue)
msaMapPublicIPOnLaunch = lens _msaMapPublicIPOnLaunch (\ s a -> s{_msaMapPublicIPOnLaunch = a});
msaSubnetId :: Lens' ModifySubnetAttribute Text
msaSubnetId = lens _msaSubnetId (\ s a -> s{_msaSubnetId = a});
instance AWSRequest ModifySubnetAttribute where
type Sv ModifySubnetAttribute = EC2
type Rs ModifySubnetAttribute =
ModifySubnetAttributeResponse
request = post
response = receiveNull ModifySubnetAttributeResponse'
instance ToHeaders ModifySubnetAttribute where
toHeaders = const mempty
instance ToPath ModifySubnetAttribute where
toPath = const "/"
instance ToQuery ModifySubnetAttribute where
toQuery ModifySubnetAttribute'{..}
= mconcat
["Action" =: ("ModifySubnetAttribute" :: ByteString),
"Version" =: ("2015-04-15" :: ByteString),
"MapPublicIpOnLaunch" =: _msaMapPublicIPOnLaunch,
"SubnetId" =: _msaSubnetId]
data ModifySubnetAttributeResponse =
ModifySubnetAttributeResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
modifySubnetAttributeResponse
:: ModifySubnetAttributeResponse
modifySubnetAttributeResponse = ModifySubnetAttributeResponse'