module Network.AWS.Config.DescribeConfigurationRecorders
(
describeConfigurationRecorders
, DescribeConfigurationRecorders
, dcrConfigurationRecorderNames
, describeConfigurationRecordersResponse
, DescribeConfigurationRecordersResponse
, drsConfigurationRecorders
, drsResponseStatus
) 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'
{ _drsConfigurationRecorders :: !(Maybe [ConfigurationRecorder])
, _drsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeConfigurationRecordersResponse
:: Int
-> DescribeConfigurationRecordersResponse
describeConfigurationRecordersResponse pResponseStatus_ =
DescribeConfigurationRecordersResponse'
{ _drsConfigurationRecorders = Nothing
, _drsResponseStatus = pResponseStatus_
}
drsConfigurationRecorders :: Lens' DescribeConfigurationRecordersResponse [ConfigurationRecorder]
drsConfigurationRecorders = lens _drsConfigurationRecorders (\ s a -> s{_drsConfigurationRecorders = a}) . _Default . _Coerce;
drsResponseStatus :: Lens' DescribeConfigurationRecordersResponse Int
drsResponseStatus = lens _drsResponseStatus (\ s a -> s{_drsResponseStatus = a});