module Network.AWS.Config.DescribeConfigurationRecorders
(
DescribeConfigurationRecorders
, describeConfigurationRecorders
, dcrConfigurationRecorderNames
, DescribeConfigurationRecordersResponse
, describeConfigurationRecordersResponse
, dcrrConfigurationRecorders
) where
import Network.AWS.Prelude
import Network.AWS.Request.JSON
import Network.AWS.Config.Types
import qualified GHC.Exts
newtype DescribeConfigurationRecorders = DescribeConfigurationRecorders
{ _dcrConfigurationRecorderNames :: List "ConfigurationRecorderNames" Text
} deriving (Eq, Ord, Show, Monoid, Semigroup)
instance GHC.Exts.IsList DescribeConfigurationRecorders where
type Item DescribeConfigurationRecorders = Text
fromList = DescribeConfigurationRecorders . GHC.Exts.fromList
toList = GHC.Exts.toList . _dcrConfigurationRecorderNames
describeConfigurationRecorders :: DescribeConfigurationRecorders
describeConfigurationRecorders = DescribeConfigurationRecorders
{ _dcrConfigurationRecorderNames = mempty
}
dcrConfigurationRecorderNames :: Lens' DescribeConfigurationRecorders [Text]
dcrConfigurationRecorderNames =
lens _dcrConfigurationRecorderNames
(\s a -> s { _dcrConfigurationRecorderNames = a })
. _List
newtype DescribeConfigurationRecordersResponse = DescribeConfigurationRecordersResponse
{ _dcrrConfigurationRecorders :: List "ConfigurationRecorders" ConfigurationRecorder
} deriving (Eq, Show, Monoid, Semigroup)
instance GHC.Exts.IsList DescribeConfigurationRecordersResponse where
type Item DescribeConfigurationRecordersResponse = ConfigurationRecorder
fromList = DescribeConfigurationRecordersResponse . GHC.Exts.fromList
toList = GHC.Exts.toList . _dcrrConfigurationRecorders
describeConfigurationRecordersResponse :: DescribeConfigurationRecordersResponse
describeConfigurationRecordersResponse = DescribeConfigurationRecordersResponse
{ _dcrrConfigurationRecorders = mempty
}
dcrrConfigurationRecorders :: Lens' DescribeConfigurationRecordersResponse [ConfigurationRecorder]
dcrrConfigurationRecorders =
lens _dcrrConfigurationRecorders
(\s a -> s { _dcrrConfigurationRecorders = a })
. _List
instance ToPath DescribeConfigurationRecorders where
toPath = const "/"
instance ToQuery DescribeConfigurationRecorders where
toQuery = const mempty
instance ToHeaders DescribeConfigurationRecorders
instance ToJSON DescribeConfigurationRecorders where
toJSON DescribeConfigurationRecorders{..} = object
[ "ConfigurationRecorderNames" .= _dcrConfigurationRecorderNames
]
instance AWSRequest DescribeConfigurationRecorders where
type Sv DescribeConfigurationRecorders = Config
type Rs DescribeConfigurationRecorders = DescribeConfigurationRecordersResponse
request = post "DescribeConfigurationRecorders"
response = jsonResponse
instance FromJSON DescribeConfigurationRecordersResponse where
parseJSON = withObject "DescribeConfigurationRecordersResponse" $ \o -> DescribeConfigurationRecordersResponse
<$> o .:? "ConfigurationRecorders" .!= mempty