module Network.AWS.Lambda.GetFunctionConfiguration
(
GetFunctionConfiguration
, getFunctionConfiguration
, gfcFunctionName
, GetFunctionConfigurationResponse
, getFunctionConfigurationResponse
, gfcrCodeSize
, gfcrConfigurationId
, gfcrDescription
, gfcrFunctionARN
, gfcrFunctionName
, gfcrHandler
, gfcrLastModified
, gfcrMemorySize
, gfcrMode
, gfcrRole
, gfcrRuntime
, gfcrTimeout
) where
import Network.AWS.Prelude
import Network.AWS.Request.RestJSON
import Network.AWS.Lambda.Types
import qualified GHC.Exts
newtype GetFunctionConfiguration = GetFunctionConfiguration
{ _gfcFunctionName :: Text
} deriving (Eq, Ord, Show, Monoid, IsString)
getFunctionConfiguration :: Text
-> GetFunctionConfiguration
getFunctionConfiguration p1 = GetFunctionConfiguration
{ _gfcFunctionName = p1
}
gfcFunctionName :: Lens' GetFunctionConfiguration Text
gfcFunctionName = lens _gfcFunctionName (\s a -> s { _gfcFunctionName = a })
data GetFunctionConfigurationResponse = GetFunctionConfigurationResponse
{ _gfcrCodeSize :: Maybe Integer
, _gfcrConfigurationId :: Maybe Text
, _gfcrDescription :: Maybe Text
, _gfcrFunctionARN :: Maybe Text
, _gfcrFunctionName :: Maybe Text
, _gfcrHandler :: Maybe Text
, _gfcrLastModified :: Maybe ISO8601
, _gfcrMemorySize :: Maybe Nat
, _gfcrMode :: Maybe Mode
, _gfcrRole :: Maybe Text
, _gfcrRuntime :: Maybe Runtime
, _gfcrTimeout :: Maybe Nat
} deriving (Eq, Show)
getFunctionConfigurationResponse :: GetFunctionConfigurationResponse
getFunctionConfigurationResponse = GetFunctionConfigurationResponse
{ _gfcrFunctionName = Nothing
, _gfcrFunctionARN = Nothing
, _gfcrConfigurationId = Nothing
, _gfcrRuntime = Nothing
, _gfcrRole = Nothing
, _gfcrHandler = Nothing
, _gfcrMode = Nothing
, _gfcrCodeSize = Nothing
, _gfcrDescription = Nothing
, _gfcrTimeout = Nothing
, _gfcrMemorySize = Nothing
, _gfcrLastModified = Nothing
}
gfcrCodeSize :: Lens' GetFunctionConfigurationResponse (Maybe Integer)
gfcrCodeSize = lens _gfcrCodeSize (\s a -> s { _gfcrCodeSize = a })
gfcrConfigurationId :: Lens' GetFunctionConfigurationResponse (Maybe Text)
gfcrConfigurationId =
lens _gfcrConfigurationId (\s a -> s { _gfcrConfigurationId = a })
gfcrDescription :: Lens' GetFunctionConfigurationResponse (Maybe Text)
gfcrDescription = lens _gfcrDescription (\s a -> s { _gfcrDescription = a })
gfcrFunctionARN :: Lens' GetFunctionConfigurationResponse (Maybe Text)
gfcrFunctionARN = lens _gfcrFunctionARN (\s a -> s { _gfcrFunctionARN = a })
gfcrFunctionName :: Lens' GetFunctionConfigurationResponse (Maybe Text)
gfcrFunctionName = lens _gfcrFunctionName (\s a -> s { _gfcrFunctionName = a })
gfcrHandler :: Lens' GetFunctionConfigurationResponse (Maybe Text)
gfcrHandler = lens _gfcrHandler (\s a -> s { _gfcrHandler = a })
gfcrLastModified :: Lens' GetFunctionConfigurationResponse (Maybe UTCTime)
gfcrLastModified = lens _gfcrLastModified (\s a -> s { _gfcrLastModified = a }) . mapping _Time
gfcrMemorySize :: Lens' GetFunctionConfigurationResponse (Maybe Natural)
gfcrMemorySize = lens _gfcrMemorySize (\s a -> s { _gfcrMemorySize = a }) . mapping _Nat
gfcrMode :: Lens' GetFunctionConfigurationResponse (Maybe Mode)
gfcrMode = lens _gfcrMode (\s a -> s { _gfcrMode = a })
gfcrRole :: Lens' GetFunctionConfigurationResponse (Maybe Text)
gfcrRole = lens _gfcrRole (\s a -> s { _gfcrRole = a })
gfcrRuntime :: Lens' GetFunctionConfigurationResponse (Maybe Runtime)
gfcrRuntime = lens _gfcrRuntime (\s a -> s { _gfcrRuntime = a })
gfcrTimeout :: Lens' GetFunctionConfigurationResponse (Maybe Natural)
gfcrTimeout = lens _gfcrTimeout (\s a -> s { _gfcrTimeout = a }) . mapping _Nat
instance ToPath GetFunctionConfiguration where
toPath GetFunctionConfiguration{..} = mconcat
[ "/2014-11-13/functions/"
, toText _gfcFunctionName
, "/configuration"
]
instance ToQuery GetFunctionConfiguration where
toQuery = const mempty
instance ToHeaders GetFunctionConfiguration
instance ToJSON GetFunctionConfiguration where
toJSON = const (toJSON Empty)
instance AWSRequest GetFunctionConfiguration where
type Sv GetFunctionConfiguration = Lambda
type Rs GetFunctionConfiguration = GetFunctionConfigurationResponse
request = get
response = jsonResponse
instance FromJSON GetFunctionConfigurationResponse where
parseJSON = withObject "GetFunctionConfigurationResponse" $ \o -> GetFunctionConfigurationResponse
<$> o .:? "CodeSize"
<*> o .:? "ConfigurationId"
<*> o .:? "Description"
<*> o .:? "FunctionARN"
<*> o .:? "FunctionName"
<*> o .:? "Handler"
<*> o .:? "LastModified"
<*> o .:? "MemorySize"
<*> o .:? "Mode"
<*> o .:? "Role"
<*> o .:? "Runtime"
<*> o .:? "Timeout"