{-# 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
, msaAssignIPv6AddressOnCreation
, 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'
{ _msaAssignIPv6AddressOnCreation :: !(Maybe AttributeBooleanValue)
, _msaMapPublicIPOnLaunch :: !(Maybe AttributeBooleanValue)
, _msaSubnetId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
modifySubnetAttribute
:: Text
-> ModifySubnetAttribute
modifySubnetAttribute pSubnetId_ =
ModifySubnetAttribute'
{ _msaAssignIPv6AddressOnCreation = Nothing
, _msaMapPublicIPOnLaunch = Nothing
, _msaSubnetId = pSubnetId_
}
msaAssignIPv6AddressOnCreation :: Lens' ModifySubnetAttribute (Maybe AttributeBooleanValue)
msaAssignIPv6AddressOnCreation = lens _msaAssignIPv6AddressOnCreation (\ s a -> s{_msaAssignIPv6AddressOnCreation = a})
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 where
instance NFData ModifySubnetAttribute where
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-11-15" :: ByteString),
"AssignIpv6AddressOnCreation" =:
_msaAssignIPv6AddressOnCreation,
"MapPublicIpOnLaunch" =: _msaMapPublicIPOnLaunch,
"SubnetId" =: _msaSubnetId]
data ModifySubnetAttributeResponse =
ModifySubnetAttributeResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
modifySubnetAttributeResponse
:: ModifySubnetAttributeResponse
modifySubnetAttributeResponse = ModifySubnetAttributeResponse'
instance NFData ModifySubnetAttributeResponse where