{-# 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.DisassociateAddress
(
disassociateAddress
, DisassociateAddress
, dasAssociationId
, dasPublicIP
, dasDryRun
, disassociateAddressResponse
, DisassociateAddressResponse
) 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 DisassociateAddress = DisassociateAddress'
{ _dasAssociationId :: !(Maybe Text)
, _dasPublicIP :: !(Maybe Text)
, _dasDryRun :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
disassociateAddress
:: DisassociateAddress
disassociateAddress =
DisassociateAddress'
{ _dasAssociationId = Nothing
, _dasPublicIP = Nothing
, _dasDryRun = Nothing
}
dasAssociationId :: Lens' DisassociateAddress (Maybe Text)
dasAssociationId = lens _dasAssociationId (\ s a -> s{_dasAssociationId = a});
dasPublicIP :: Lens' DisassociateAddress (Maybe Text)
dasPublicIP = lens _dasPublicIP (\ s a -> s{_dasPublicIP = a});
dasDryRun :: Lens' DisassociateAddress (Maybe Bool)
dasDryRun = lens _dasDryRun (\ s a -> s{_dasDryRun = a});
instance AWSRequest DisassociateAddress where
type Rs DisassociateAddress =
DisassociateAddressResponse
request = postQuery ec2
response = receiveNull DisassociateAddressResponse'
instance Hashable DisassociateAddress
instance NFData DisassociateAddress
instance ToHeaders DisassociateAddress where
toHeaders = const mempty
instance ToPath DisassociateAddress where
toPath = const "/"
instance ToQuery DisassociateAddress where
toQuery DisassociateAddress'{..}
= mconcat
["Action" =: ("DisassociateAddress" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"AssociationId" =: _dasAssociationId,
"PublicIp" =: _dasPublicIP, "DryRun" =: _dasDryRun]
data DisassociateAddressResponse =
DisassociateAddressResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
disassociateAddressResponse
:: DisassociateAddressResponse
disassociateAddressResponse = DisassociateAddressResponse'
instance NFData DisassociateAddressResponse