{-# 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.GuardDuty.DisassociateFromMasterAccount
(
disassociateFromMasterAccount
, DisassociateFromMasterAccount
, dfmaDetectorId
, disassociateFromMasterAccountResponse
, DisassociateFromMasterAccountResponse
, dfmarsResponseStatus
) where
import Network.AWS.GuardDuty.Types
import Network.AWS.GuardDuty.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DisassociateFromMasterAccount = DisassociateFromMasterAccount'
{ _dfmaDetectorId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateFromMasterAccount
:: Text
-> DisassociateFromMasterAccount
disassociateFromMasterAccount pDetectorId_ =
DisassociateFromMasterAccount' {_dfmaDetectorId = pDetectorId_}
dfmaDetectorId :: Lens' DisassociateFromMasterAccount Text
dfmaDetectorId = lens _dfmaDetectorId (\ s a -> s{_dfmaDetectorId = a})
instance AWSRequest DisassociateFromMasterAccount
where
type Rs DisassociateFromMasterAccount =
DisassociateFromMasterAccountResponse
request = postJSON guardDuty
response
= receiveEmpty
(\ s h x ->
DisassociateFromMasterAccountResponse' <$>
(pure (fromEnum s)))
instance Hashable DisassociateFromMasterAccount where
instance NFData DisassociateFromMasterAccount where
instance ToHeaders DisassociateFromMasterAccount
where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DisassociateFromMasterAccount where
toJSON = const (Object mempty)
instance ToPath DisassociateFromMasterAccount where
toPath DisassociateFromMasterAccount'{..}
= mconcat
["/detector/", toBS _dfmaDetectorId,
"/master/disassociate"]
instance ToQuery DisassociateFromMasterAccount where
toQuery = const mempty
newtype DisassociateFromMasterAccountResponse = DisassociateFromMasterAccountResponse'
{ _dfmarsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateFromMasterAccountResponse
:: Int
-> DisassociateFromMasterAccountResponse
disassociateFromMasterAccountResponse pResponseStatus_ =
DisassociateFromMasterAccountResponse'
{_dfmarsResponseStatus = pResponseStatus_}
dfmarsResponseStatus :: Lens' DisassociateFromMasterAccountResponse Int
dfmarsResponseStatus = lens _dfmarsResponseStatus (\ s a -> s{_dfmarsResponseStatus = a})
instance NFData DisassociateFromMasterAccountResponse
where