{-# 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.ModifyVPCAttribute
(
modifyVPCAttribute
, ModifyVPCAttribute
, mvaEnableDNSHostnames
, mvaEnableDNSSupport
, mvaVPCId
, modifyVPCAttributeResponse
, ModifyVPCAttributeResponse
) 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 ModifyVPCAttribute = ModifyVPCAttribute'
{ _mvaEnableDNSHostnames :: !(Maybe AttributeBooleanValue)
, _mvaEnableDNSSupport :: !(Maybe AttributeBooleanValue)
, _mvaVPCId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyVPCAttribute
:: Text
-> ModifyVPCAttribute
modifyVPCAttribute pVPCId_ =
ModifyVPCAttribute'
{ _mvaEnableDNSHostnames = Nothing
, _mvaEnableDNSSupport = Nothing
, _mvaVPCId = pVPCId_
}
mvaEnableDNSHostnames :: Lens' ModifyVPCAttribute (Maybe AttributeBooleanValue)
mvaEnableDNSHostnames = lens _mvaEnableDNSHostnames (\ s a -> s{_mvaEnableDNSHostnames = a});
mvaEnableDNSSupport :: Lens' ModifyVPCAttribute (Maybe AttributeBooleanValue)
mvaEnableDNSSupport = lens _mvaEnableDNSSupport (\ s a -> s{_mvaEnableDNSSupport = a});
mvaVPCId :: Lens' ModifyVPCAttribute Text
mvaVPCId = lens _mvaVPCId (\ s a -> s{_mvaVPCId = a});
instance AWSRequest ModifyVPCAttribute where
type Rs ModifyVPCAttribute =
ModifyVPCAttributeResponse
request = postQuery ec2
response = receiveNull ModifyVPCAttributeResponse'
instance Hashable ModifyVPCAttribute
instance NFData ModifyVPCAttribute
instance ToHeaders ModifyVPCAttribute where
toHeaders = const mempty
instance ToPath ModifyVPCAttribute where
toPath = const "/"
instance ToQuery ModifyVPCAttribute where
toQuery ModifyVPCAttribute'{..}
= mconcat
["Action" =: ("ModifyVpcAttribute" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"EnableDnsHostnames" =: _mvaEnableDNSHostnames,
"EnableDnsSupport" =: _mvaEnableDNSSupport,
"VpcId" =: _mvaVPCId]
data ModifyVPCAttributeResponse =
ModifyVPCAttributeResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
modifyVPCAttributeResponse
:: ModifyVPCAttributeResponse
modifyVPCAttributeResponse = ModifyVPCAttributeResponse'
instance NFData ModifyVPCAttributeResponse