{-# 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.ElasticBeanstalk.ComposeEnvironments
(
composeEnvironments
, ComposeEnvironments
, ceVersionLabels
, ceApplicationName
, ceGroupName
, environmentDescriptionsMessage
, EnvironmentDescriptionsMessage
, edmEnvironments
) 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 ComposeEnvironments = ComposeEnvironments'
{ _ceVersionLabels :: !(Maybe [Text])
, _ceApplicationName :: !(Maybe Text)
, _ceGroupName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
composeEnvironments
:: ComposeEnvironments
composeEnvironments =
ComposeEnvironments'
{ _ceVersionLabels = Nothing
, _ceApplicationName = Nothing
, _ceGroupName = Nothing
}
ceVersionLabels :: Lens' ComposeEnvironments [Text]
ceVersionLabels = lens _ceVersionLabels (\ s a -> s{_ceVersionLabels = a}) . _Default . _Coerce;
ceApplicationName :: Lens' ComposeEnvironments (Maybe Text)
ceApplicationName = lens _ceApplicationName (\ s a -> s{_ceApplicationName = a});
ceGroupName :: Lens' ComposeEnvironments (Maybe Text)
ceGroupName = lens _ceGroupName (\ s a -> s{_ceGroupName = a});
instance AWSRequest ComposeEnvironments where
type Rs ComposeEnvironments =
EnvironmentDescriptionsMessage
request = postQuery elasticBeanstalk
response
= receiveXMLWrapper "ComposeEnvironmentsResult"
(\ s h x -> parseXML x)
instance Hashable ComposeEnvironments
instance NFData ComposeEnvironments
instance ToHeaders ComposeEnvironments where
toHeaders = const mempty
instance ToPath ComposeEnvironments where
toPath = const "/"
instance ToQuery ComposeEnvironments where
toQuery ComposeEnvironments'{..}
= mconcat
["Action" =: ("ComposeEnvironments" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"VersionLabels" =:
toQuery (toQueryList "member" <$> _ceVersionLabels),
"ApplicationName" =: _ceApplicationName,
"GroupName" =: _ceGroupName]