{-# 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.Config.DeleteAggregationAuthorization
(
deleteAggregationAuthorization
, DeleteAggregationAuthorization
, daaAuthorizedAccountId
, daaAuthorizedAWSRegion
, deleteAggregationAuthorizationResponse
, DeleteAggregationAuthorizationResponse
) where
import Network.AWS.Config.Types
import Network.AWS.Config.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteAggregationAuthorization = DeleteAggregationAuthorization'
{ _daaAuthorizedAccountId :: !Text
, _daaAuthorizedAWSRegion :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteAggregationAuthorization
:: Text
-> Text
-> DeleteAggregationAuthorization
deleteAggregationAuthorization pAuthorizedAccountId_ pAuthorizedAWSRegion_ =
DeleteAggregationAuthorization'
{ _daaAuthorizedAccountId = pAuthorizedAccountId_
, _daaAuthorizedAWSRegion = pAuthorizedAWSRegion_
}
daaAuthorizedAccountId :: Lens' DeleteAggregationAuthorization Text
daaAuthorizedAccountId = lens _daaAuthorizedAccountId (\ s a -> s{_daaAuthorizedAccountId = a})
daaAuthorizedAWSRegion :: Lens' DeleteAggregationAuthorization Text
daaAuthorizedAWSRegion = lens _daaAuthorizedAWSRegion (\ s a -> s{_daaAuthorizedAWSRegion = a})
instance AWSRequest DeleteAggregationAuthorization
where
type Rs DeleteAggregationAuthorization =
DeleteAggregationAuthorizationResponse
request = postJSON config
response
= receiveNull DeleteAggregationAuthorizationResponse'
instance Hashable DeleteAggregationAuthorization
where
instance NFData DeleteAggregationAuthorization where
instance ToHeaders DeleteAggregationAuthorization
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("StarlingDoveService.DeleteAggregationAuthorization"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteAggregationAuthorization where
toJSON DeleteAggregationAuthorization'{..}
= object
(catMaybes
[Just
("AuthorizedAccountId" .= _daaAuthorizedAccountId),
Just
("AuthorizedAwsRegion" .= _daaAuthorizedAWSRegion)])
instance ToPath DeleteAggregationAuthorization where
toPath = const "/"
instance ToQuery DeleteAggregationAuthorization where
toQuery = const mempty
data DeleteAggregationAuthorizationResponse =
DeleteAggregationAuthorizationResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteAggregationAuthorizationResponse
:: DeleteAggregationAuthorizationResponse
deleteAggregationAuthorizationResponse = DeleteAggregationAuthorizationResponse'
instance NFData
DeleteAggregationAuthorizationResponse
where