{-# 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.MQ.DescribeConfiguration
(
describeConfiguration
, DescribeConfiguration
, dcConfigurationId
, describeConfigurationResponse
, DescribeConfigurationResponse
, dcrsEngineVersion
, dcrsARN
, dcrsLatestRevision
, dcrsName
, dcrsId
, dcrsDescription
, dcrsEngineType
, dcrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.MQ.Types
import Network.AWS.MQ.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DescribeConfiguration = DescribeConfiguration'
{ _dcConfigurationId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeConfiguration
:: Text
-> DescribeConfiguration
describeConfiguration pConfigurationId_ =
DescribeConfiguration' {_dcConfigurationId = pConfigurationId_}
dcConfigurationId :: Lens' DescribeConfiguration Text
dcConfigurationId = lens _dcConfigurationId (\ s a -> s{_dcConfigurationId = a})
instance AWSRequest DescribeConfiguration where
type Rs DescribeConfiguration =
DescribeConfigurationResponse
request = get mq
response
= receiveJSON
(\ s h x ->
DescribeConfigurationResponse' <$>
(x .?> "engineVersion") <*> (x .?> "arn") <*>
(x .?> "latestRevision")
<*> (x .?> "name")
<*> (x .?> "id")
<*> (x .?> "description")
<*> (x .?> "engineType")
<*> (pure (fromEnum s)))
instance Hashable DescribeConfiguration where
instance NFData DescribeConfiguration where
instance ToHeaders DescribeConfiguration where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DescribeConfiguration where
toPath DescribeConfiguration'{..}
= mconcat
["/v1/configurations/", toBS _dcConfigurationId]
instance ToQuery DescribeConfiguration where
toQuery = const mempty
data DescribeConfigurationResponse = DescribeConfigurationResponse'
{ _dcrsEngineVersion :: !(Maybe Text)
, _dcrsARN :: !(Maybe Text)
, _dcrsLatestRevision :: !(Maybe ConfigurationRevision)
, _dcrsName :: !(Maybe Text)
, _dcrsId :: !(Maybe Text)
, _dcrsDescription :: !(Maybe Text)
, _dcrsEngineType :: !(Maybe EngineType)
, _dcrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
describeConfigurationResponse
:: Int
-> DescribeConfigurationResponse
describeConfigurationResponse pResponseStatus_ =
DescribeConfigurationResponse'
{ _dcrsEngineVersion = Nothing
, _dcrsARN = Nothing
, _dcrsLatestRevision = Nothing
, _dcrsName = Nothing
, _dcrsId = Nothing
, _dcrsDescription = Nothing
, _dcrsEngineType = Nothing
, _dcrsResponseStatus = pResponseStatus_
}
dcrsEngineVersion :: Lens' DescribeConfigurationResponse (Maybe Text)
dcrsEngineVersion = lens _dcrsEngineVersion (\ s a -> s{_dcrsEngineVersion = a})
dcrsARN :: Lens' DescribeConfigurationResponse (Maybe Text)
dcrsARN = lens _dcrsARN (\ s a -> s{_dcrsARN = a})
dcrsLatestRevision :: Lens' DescribeConfigurationResponse (Maybe ConfigurationRevision)
dcrsLatestRevision = lens _dcrsLatestRevision (\ s a -> s{_dcrsLatestRevision = a})
dcrsName :: Lens' DescribeConfigurationResponse (Maybe Text)
dcrsName = lens _dcrsName (\ s a -> s{_dcrsName = a})
dcrsId :: Lens' DescribeConfigurationResponse (Maybe Text)
dcrsId = lens _dcrsId (\ s a -> s{_dcrsId = a})
dcrsDescription :: Lens' DescribeConfigurationResponse (Maybe Text)
dcrsDescription = lens _dcrsDescription (\ s a -> s{_dcrsDescription = a})
dcrsEngineType :: Lens' DescribeConfigurationResponse (Maybe EngineType)
dcrsEngineType = lens _dcrsEngineType (\ s a -> s{_dcrsEngineType = a})
dcrsResponseStatus :: Lens' DescribeConfigurationResponse Int
dcrsResponseStatus = lens _dcrsResponseStatus (\ s a -> s{_dcrsResponseStatus = a})
instance NFData DescribeConfigurationResponse where