module Network.AWS.CloudFormation.DescribeStackResource
(
describeStackResource
, DescribeStackResource
, desStackName
, desLogicalResourceId
, describeStackResourceResponse
, DescribeStackResourceResponse
, dsrrsStackResourceDetail
, dsrrsResponseStatus
) where
import Network.AWS.CloudFormation.Types
import Network.AWS.CloudFormation.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DescribeStackResource = DescribeStackResource'
{ _desStackName :: !Text
, _desLogicalResourceId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeStackResource
:: Text
-> Text
-> DescribeStackResource
describeStackResource pStackName_ pLogicalResourceId_ =
DescribeStackResource'
{ _desStackName = pStackName_
, _desLogicalResourceId = pLogicalResourceId_
}
desStackName :: Lens' DescribeStackResource Text
desStackName = lens _desStackName (\ s a -> s{_desStackName = a});
desLogicalResourceId :: Lens' DescribeStackResource Text
desLogicalResourceId = lens _desLogicalResourceId (\ s a -> s{_desLogicalResourceId = a});
instance AWSRequest DescribeStackResource where
type Rs DescribeStackResource =
DescribeStackResourceResponse
request = postQuery cloudFormation
response
= receiveXMLWrapper "DescribeStackResourceResult"
(\ s h x ->
DescribeStackResourceResponse' <$>
(x .@? "StackResourceDetail") <*>
(pure (fromEnum s)))
instance ToHeaders DescribeStackResource where
toHeaders = const mempty
instance ToPath DescribeStackResource where
toPath = const "/"
instance ToQuery DescribeStackResource where
toQuery DescribeStackResource'{..}
= mconcat
["Action" =: ("DescribeStackResource" :: ByteString),
"Version" =: ("2010-05-15" :: ByteString),
"StackName" =: _desStackName,
"LogicalResourceId" =: _desLogicalResourceId]
data DescribeStackResourceResponse = DescribeStackResourceResponse'
{ _dsrrsStackResourceDetail :: !(Maybe StackResourceDetail)
, _dsrrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeStackResourceResponse
:: Int
-> DescribeStackResourceResponse
describeStackResourceResponse pResponseStatus_ =
DescribeStackResourceResponse'
{ _dsrrsStackResourceDetail = Nothing
, _dsrrsResponseStatus = pResponseStatus_
}
dsrrsStackResourceDetail :: Lens' DescribeStackResourceResponse (Maybe StackResourceDetail)
dsrrsStackResourceDetail = lens _dsrrsStackResourceDetail (\ s a -> s{_dsrrsStackResourceDetail = a});
dsrrsResponseStatus :: Lens' DescribeStackResourceResponse Int
dsrrsResponseStatus = lens _dsrrsResponseStatus (\ s a -> s{_dsrrsResponseStatus = a});