module Network.AWS.ElasticBeanstalk.DescribeConfigurationOptions
(
describeConfigurationOptions
, DescribeConfigurationOptions
, dcoTemplateName
, dcoEnvironmentName
, dcoApplicationName
, dcoSolutionStackName
, dcoOptions
, describeConfigurationOptionsResponse
, DescribeConfigurationOptionsResponse
, dcorsSolutionStackName
, dcorsOptions
, dcorsResponseStatus
) where
import Network.AWS.ElasticBeanstalk.Types
import Network.AWS.ElasticBeanstalk.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DescribeConfigurationOptions = DescribeConfigurationOptions'
{ _dcoTemplateName :: !(Maybe Text)
, _dcoEnvironmentName :: !(Maybe Text)
, _dcoApplicationName :: !(Maybe Text)
, _dcoSolutionStackName :: !(Maybe Text)
, _dcoOptions :: !(Maybe [OptionSpecification])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeConfigurationOptions
:: DescribeConfigurationOptions
describeConfigurationOptions =
DescribeConfigurationOptions'
{ _dcoTemplateName = Nothing
, _dcoEnvironmentName = Nothing
, _dcoApplicationName = Nothing
, _dcoSolutionStackName = Nothing
, _dcoOptions = Nothing
}
dcoTemplateName :: Lens' DescribeConfigurationOptions (Maybe Text)
dcoTemplateName = lens _dcoTemplateName (\ s a -> s{_dcoTemplateName = a});
dcoEnvironmentName :: Lens' DescribeConfigurationOptions (Maybe Text)
dcoEnvironmentName = lens _dcoEnvironmentName (\ s a -> s{_dcoEnvironmentName = a});
dcoApplicationName :: Lens' DescribeConfigurationOptions (Maybe Text)
dcoApplicationName = lens _dcoApplicationName (\ s a -> s{_dcoApplicationName = a});
dcoSolutionStackName :: Lens' DescribeConfigurationOptions (Maybe Text)
dcoSolutionStackName = lens _dcoSolutionStackName (\ s a -> s{_dcoSolutionStackName = a});
dcoOptions :: Lens' DescribeConfigurationOptions [OptionSpecification]
dcoOptions = lens _dcoOptions (\ s a -> s{_dcoOptions = a}) . _Default . _Coerce;
instance AWSRequest DescribeConfigurationOptions
where
type Rs DescribeConfigurationOptions =
DescribeConfigurationOptionsResponse
request = postQuery elasticBeanstalk
response
= receiveXMLWrapper
"DescribeConfigurationOptionsResult"
(\ s h x ->
DescribeConfigurationOptionsResponse' <$>
(x .@? "SolutionStackName") <*>
(x .@? "Options" .!@ mempty >>=
may (parseXMLList "member"))
<*> (pure (fromEnum s)))
instance ToHeaders DescribeConfigurationOptions where
toHeaders = const mempty
instance ToPath DescribeConfigurationOptions where
toPath = const "/"
instance ToQuery DescribeConfigurationOptions where
toQuery DescribeConfigurationOptions'{..}
= mconcat
["Action" =:
("DescribeConfigurationOptions" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"TemplateName" =: _dcoTemplateName,
"EnvironmentName" =: _dcoEnvironmentName,
"ApplicationName" =: _dcoApplicationName,
"SolutionStackName" =: _dcoSolutionStackName,
"Options" =:
toQuery (toQueryList "member" <$> _dcoOptions)]
data DescribeConfigurationOptionsResponse = DescribeConfigurationOptionsResponse'
{ _dcorsSolutionStackName :: !(Maybe Text)
, _dcorsOptions :: !(Maybe [ConfigurationOptionDescription])
, _dcorsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeConfigurationOptionsResponse
:: Int
-> DescribeConfigurationOptionsResponse
describeConfigurationOptionsResponse pResponseStatus_ =
DescribeConfigurationOptionsResponse'
{ _dcorsSolutionStackName = Nothing
, _dcorsOptions = Nothing
, _dcorsResponseStatus = pResponseStatus_
}
dcorsSolutionStackName :: Lens' DescribeConfigurationOptionsResponse (Maybe Text)
dcorsSolutionStackName = lens _dcorsSolutionStackName (\ s a -> s{_dcorsSolutionStackName = a});
dcorsOptions :: Lens' DescribeConfigurationOptionsResponse [ConfigurationOptionDescription]
dcorsOptions = lens _dcorsOptions (\ s a -> s{_dcorsOptions = a}) . _Default . _Coerce;
dcorsResponseStatus :: Lens' DescribeConfigurationOptionsResponse Int
dcorsResponseStatus = lens _dcorsResponseStatus (\ s a -> s{_dcorsResponseStatus = a});