{-# 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.AssociateDHCPOptions
(
associateDHCPOptions
, AssociateDHCPOptions
, adoDryRun
, adoDHCPOptionsId
, adoVPCId
, associateDHCPOptionsResponse
, AssociateDHCPOptionsResponse
) 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 AssociateDHCPOptions = AssociateDHCPOptions'
{ _adoDryRun :: !(Maybe Bool)
, _adoDHCPOptionsId :: !Text
, _adoVPCId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
associateDHCPOptions
:: Text
-> Text
-> AssociateDHCPOptions
associateDHCPOptions pDHCPOptionsId_ pVPCId_ =
AssociateDHCPOptions'
{ _adoDryRun = Nothing
, _adoDHCPOptionsId = pDHCPOptionsId_
, _adoVPCId = pVPCId_
}
adoDryRun :: Lens' AssociateDHCPOptions (Maybe Bool)
adoDryRun = lens _adoDryRun (\ s a -> s{_adoDryRun = a});
adoDHCPOptionsId :: Lens' AssociateDHCPOptions Text
adoDHCPOptionsId = lens _adoDHCPOptionsId (\ s a -> s{_adoDHCPOptionsId = a});
adoVPCId :: Lens' AssociateDHCPOptions Text
adoVPCId = lens _adoVPCId (\ s a -> s{_adoVPCId = a});
instance AWSRequest AssociateDHCPOptions where
type Rs AssociateDHCPOptions =
AssociateDHCPOptionsResponse
request = postQuery ec2
response = receiveNull AssociateDHCPOptionsResponse'
instance Hashable AssociateDHCPOptions
instance NFData AssociateDHCPOptions
instance ToHeaders AssociateDHCPOptions where
toHeaders = const mempty
instance ToPath AssociateDHCPOptions where
toPath = const "/"
instance ToQuery AssociateDHCPOptions where
toQuery AssociateDHCPOptions'{..}
= mconcat
["Action" =: ("AssociateDhcpOptions" :: ByteString),
"Version" =: ("2016-04-01" :: ByteString),
"DryRun" =: _adoDryRun,
"DhcpOptionsId" =: _adoDHCPOptionsId,
"VpcId" =: _adoVPCId]
data AssociateDHCPOptionsResponse =
AssociateDHCPOptionsResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
associateDHCPOptionsResponse
:: AssociateDHCPOptionsResponse
associateDHCPOptionsResponse = AssociateDHCPOptionsResponse'
instance NFData AssociateDHCPOptionsResponse