module Network.AWS.Config.DescribeConfigurationRecorders
(
describeConfigurationRecorders
, DescribeConfigurationRecorders
, dcrConfigurationRecorderNames
, describeConfigurationRecordersResponse
, DescribeConfigurationRecordersResponse
, dcrrsConfigurationRecorders
, dcrrsResponseStatus
) where
import Network.AWS.Config.Types
import Network.AWS.Config.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DescribeConfigurationRecorders = DescribeConfigurationRecorders'
{ _dcrConfigurationRecorderNames :: Maybe [Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeConfigurationRecorders
:: DescribeConfigurationRecorders
describeConfigurationRecorders =
DescribeConfigurationRecorders'
{ _dcrConfigurationRecorderNames = Nothing
}
dcrConfigurationRecorderNames :: Lens' DescribeConfigurationRecorders [Text]
dcrConfigurationRecorderNames = lens _dcrConfigurationRecorderNames (\ s a -> s{_dcrConfigurationRecorderNames = a}) . _Default . _Coerce;
instance AWSRequest DescribeConfigurationRecorders
where
type Rs DescribeConfigurationRecorders =
DescribeConfigurationRecordersResponse
request = postJSON config
response
= receiveJSON
(\ s h x ->
DescribeConfigurationRecordersResponse' <$>
(x .?> "ConfigurationRecorders" .!@ mempty) <*>
(pure (fromEnum s)))
instance ToHeaders DescribeConfigurationRecorders
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("StarlingDoveService.DescribeConfigurationRecorders"
:: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DescribeConfigurationRecorders where
toJSON DescribeConfigurationRecorders'{..}
= object
(catMaybes
[("ConfigurationRecorderNames" .=) <$>
_dcrConfigurationRecorderNames])
instance ToPath DescribeConfigurationRecorders where
toPath = const "/"
instance ToQuery DescribeConfigurationRecorders where
toQuery = const mempty
data DescribeConfigurationRecordersResponse = DescribeConfigurationRecordersResponse'
{ _dcrrsConfigurationRecorders :: !(Maybe [ConfigurationRecorder])
, _dcrrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeConfigurationRecordersResponse
:: Int
-> DescribeConfigurationRecordersResponse
describeConfigurationRecordersResponse pResponseStatus_ =
DescribeConfigurationRecordersResponse'
{ _dcrrsConfigurationRecorders = Nothing
, _dcrrsResponseStatus = pResponseStatus_
}
dcrrsConfigurationRecorders :: Lens' DescribeConfigurationRecordersResponse [ConfigurationRecorder]
dcrrsConfigurationRecorders = lens _dcrrsConfigurationRecorders (\ s a -> s{_dcrrsConfigurationRecorders = a}) . _Default . _Coerce;
dcrrsResponseStatus :: Lens' DescribeConfigurationRecordersResponse Int
dcrrsResponseStatus = lens _dcrrsResponseStatus (\ s a -> s{_dcrrsResponseStatus = a});