{-# 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.ModifySubnetAttribute
(
modifySubnetAttribute
, ModifySubnetAttribute
, msaMapPublicIPOnLaunch
, msaSubnetId
, modifySubnetAttributeResponse
, ModifySubnetAttributeResponse
) 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
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 Rs ModifySubnetAttribute =
ModifySubnetAttributeResponse
request = postQuery ec2
response = receiveNull ModifySubnetAttributeResponse'
instance Hashable ModifySubnetAttribute
instance NFData ModifySubnetAttribute
instance ToHeaders ModifySubnetAttribute where
toHeaders = const mempty
instance ToPath ModifySubnetAttribute where
toPath = const "/"
instance ToQuery ModifySubnetAttribute where
toQuery ModifySubnetAttribute'{..}
= mconcat
["Action" =: ("ModifySubnetAttribute" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"MapPublicIpOnLaunch" =: _msaMapPublicIPOnLaunch,
"SubnetId" =: _msaSubnetId]
data ModifySubnetAttributeResponse =
ModifySubnetAttributeResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
modifySubnetAttributeResponse
:: ModifySubnetAttributeResponse
modifySubnetAttributeResponse = ModifySubnetAttributeResponse'
instance NFData ModifySubnetAttributeResponse