module Network.AWS.ElasticBeanstalk.CreateStorageLocation
(
CreateStorageLocation
, createStorageLocation
, CreateStorageLocationResponse
, createStorageLocationResponse
, cslrS3Bucket
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.ElasticBeanstalk.Types
import qualified GHC.Exts
data CreateStorageLocation = CreateStorageLocation
deriving (Eq, Ord, Read, Show, Generic)
createStorageLocation :: CreateStorageLocation
createStorageLocation = CreateStorageLocation
newtype CreateStorageLocationResponse = CreateStorageLocationResponse
{ _cslrS3Bucket :: Maybe Text
} deriving (Eq, Ord, Read, Show, Monoid)
createStorageLocationResponse :: CreateStorageLocationResponse
createStorageLocationResponse = CreateStorageLocationResponse
{ _cslrS3Bucket = Nothing
}
cslrS3Bucket :: Lens' CreateStorageLocationResponse (Maybe Text)
cslrS3Bucket = lens _cslrS3Bucket (\s a -> s { _cslrS3Bucket = a })
instance ToPath CreateStorageLocation where
toPath = const "/"
instance ToQuery CreateStorageLocation where
toQuery = const mempty
instance ToHeaders CreateStorageLocation
instance AWSRequest CreateStorageLocation where
type Sv CreateStorageLocation = ElasticBeanstalk
type Rs CreateStorageLocation = CreateStorageLocationResponse
request = post "CreateStorageLocation"
response = xmlResponse
instance FromXML CreateStorageLocationResponse where
parseXML = withElement "CreateStorageLocationResult" $ \x -> CreateStorageLocationResponse
<$> x .@? "S3Bucket"