module Network.AWS.ElasticBeanstalk.CreateConfigurationTemplate
(
CreateConfigurationTemplate
, createConfigurationTemplate
, cctApplicationName
, cctDescription
, cctEnvironmentId
, cctOptionSettings
, cctSolutionStackName
, cctSourceConfiguration
, cctTemplateName
, CreateConfigurationTemplateResponse
, createConfigurationTemplateResponse
, cctrApplicationName
, cctrDateCreated
, cctrDateUpdated
, cctrDeploymentStatus
, cctrDescription
, cctrEnvironmentName
, cctrOptionSettings
, cctrSolutionStackName
, cctrTemplateName
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElasticBeanstalk.Types
import qualified GHC.Exts
data CreateConfigurationTemplate = CreateConfigurationTemplate
{ _cctApplicationName :: Text
, _cctDescription :: Maybe Text
, _cctEnvironmentId :: Maybe Text
, _cctOptionSettings :: List "OptionSettings" ConfigurationOptionSetting
, _cctSolutionStackName :: Maybe Text
, _cctSourceConfiguration :: Maybe SourceConfiguration
, _cctTemplateName :: Text
} deriving (Eq, Show)
createConfigurationTemplate :: Text
-> Text
-> CreateConfigurationTemplate
createConfigurationTemplate p1 p2 = CreateConfigurationTemplate
{ _cctApplicationName = p1
, _cctTemplateName = p2
, _cctSolutionStackName = Nothing
, _cctSourceConfiguration = Nothing
, _cctEnvironmentId = Nothing
, _cctDescription = Nothing
, _cctOptionSettings = mempty
}
cctApplicationName :: Lens' CreateConfigurationTemplate Text
cctApplicationName =
lens _cctApplicationName (\s a -> s { _cctApplicationName = a })
cctDescription :: Lens' CreateConfigurationTemplate (Maybe Text)
cctDescription = lens _cctDescription (\s a -> s { _cctDescription = a })
cctEnvironmentId :: Lens' CreateConfigurationTemplate (Maybe Text)
cctEnvironmentId = lens _cctEnvironmentId (\s a -> s { _cctEnvironmentId = a })
cctOptionSettings :: Lens' CreateConfigurationTemplate [ConfigurationOptionSetting]
cctOptionSettings =
lens _cctOptionSettings (\s a -> s { _cctOptionSettings = a })
. _List
cctSolutionStackName :: Lens' CreateConfigurationTemplate (Maybe Text)
cctSolutionStackName =
lens _cctSolutionStackName (\s a -> s { _cctSolutionStackName = a })
cctSourceConfiguration :: Lens' CreateConfigurationTemplate (Maybe SourceConfiguration)
cctSourceConfiguration =
lens _cctSourceConfiguration (\s a -> s { _cctSourceConfiguration = a })
cctTemplateName :: Lens' CreateConfigurationTemplate Text
cctTemplateName = lens _cctTemplateName (\s a -> s { _cctTemplateName = a })
data CreateConfigurationTemplateResponse = CreateConfigurationTemplateResponse
{ _cctrApplicationName :: Maybe Text
, _cctrDateCreated :: Maybe RFC822
, _cctrDateUpdated :: Maybe RFC822
, _cctrDeploymentStatus :: Maybe ConfigurationDeploymentStatus
, _cctrDescription :: Maybe Text
, _cctrEnvironmentName :: Maybe Text
, _cctrOptionSettings :: List "OptionSettings" ConfigurationOptionSetting
, _cctrSolutionStackName :: Maybe Text
, _cctrTemplateName :: Maybe Text
} deriving (Eq, Show)
createConfigurationTemplateResponse :: CreateConfigurationTemplateResponse
createConfigurationTemplateResponse = CreateConfigurationTemplateResponse
{ _cctrSolutionStackName = Nothing
, _cctrApplicationName = Nothing
, _cctrTemplateName = Nothing
, _cctrDescription = Nothing
, _cctrEnvironmentName = Nothing
, _cctrDeploymentStatus = Nothing
, _cctrDateCreated = Nothing
, _cctrDateUpdated = Nothing
, _cctrOptionSettings = mempty
}
cctrApplicationName :: Lens' CreateConfigurationTemplateResponse (Maybe Text)
cctrApplicationName =
lens _cctrApplicationName (\s a -> s { _cctrApplicationName = a })
cctrDateCreated :: Lens' CreateConfigurationTemplateResponse (Maybe UTCTime)
cctrDateCreated = lens _cctrDateCreated (\s a -> s { _cctrDateCreated = a }) . mapping _Time
cctrDateUpdated :: Lens' CreateConfigurationTemplateResponse (Maybe UTCTime)
cctrDateUpdated = lens _cctrDateUpdated (\s a -> s { _cctrDateUpdated = a }) . mapping _Time
cctrDeploymentStatus :: Lens' CreateConfigurationTemplateResponse (Maybe ConfigurationDeploymentStatus)
cctrDeploymentStatus =
lens _cctrDeploymentStatus (\s a -> s { _cctrDeploymentStatus = a })
cctrDescription :: Lens' CreateConfigurationTemplateResponse (Maybe Text)
cctrDescription = lens _cctrDescription (\s a -> s { _cctrDescription = a })
cctrEnvironmentName :: Lens' CreateConfigurationTemplateResponse (Maybe Text)
cctrEnvironmentName =
lens _cctrEnvironmentName (\s a -> s { _cctrEnvironmentName = a })
cctrOptionSettings :: Lens' CreateConfigurationTemplateResponse [ConfigurationOptionSetting]
cctrOptionSettings =
lens _cctrOptionSettings (\s a -> s { _cctrOptionSettings = a })
. _List
cctrSolutionStackName :: Lens' CreateConfigurationTemplateResponse (Maybe Text)
cctrSolutionStackName =
lens _cctrSolutionStackName (\s a -> s { _cctrSolutionStackName = a })
cctrTemplateName :: Lens' CreateConfigurationTemplateResponse (Maybe Text)
cctrTemplateName = lens _cctrTemplateName (\s a -> s { _cctrTemplateName = a })
instance ToPath CreateConfigurationTemplate where
toPath = const "/"
instance ToQuery CreateConfigurationTemplate where
toQuery CreateConfigurationTemplate{..} = mconcat
[ "ApplicationName" =? _cctApplicationName
, "Description" =? _cctDescription
, "EnvironmentId" =? _cctEnvironmentId
, "OptionSettings" =? _cctOptionSettings
, "SolutionStackName" =? _cctSolutionStackName
, "SourceConfiguration" =? _cctSourceConfiguration
, "TemplateName" =? _cctTemplateName
]
instance ToHeaders CreateConfigurationTemplate
instance AWSRequest CreateConfigurationTemplate where
type Sv CreateConfigurationTemplate = ElasticBeanstalk
type Rs CreateConfigurationTemplate = CreateConfigurationTemplateResponse
request = post "CreateConfigurationTemplate"
response = xmlResponse
instance FromXML CreateConfigurationTemplateResponse where
parseXML = withElement "CreateConfigurationTemplateResult" $ \x -> CreateConfigurationTemplateResponse
<$> x .@? "ApplicationName"
<*> x .@? "DateCreated"
<*> x .@? "DateUpdated"
<*> x .@? "DeploymentStatus"
<*> x .@? "Description"
<*> x .@? "EnvironmentName"
<*> x .@ "OptionSettings"
<*> x .@? "SolutionStackName"
<*> x .@? "TemplateName"