module Network.AWS.APIGateway.GetStage
(
getStage
, GetStage
, gssRestAPIId
, gssStageName
, stage
, Stage
, sDeploymentId
, sVariables
, sClientCertificateId
, sCreatedDate
, sCacheClusterStatus
, sMethodSettings
, sLastUpdatedDate
, sCacheClusterSize
, sCacheClusterEnabled
, sStageName
, sDescription
) where
import Network.AWS.APIGateway.Types
import Network.AWS.APIGateway.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data GetStage = GetStage'
{ _gssRestAPIId :: !Text
, _gssStageName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getStage
:: Text
-> Text
-> GetStage
getStage pRestAPIId_ pStageName_ =
GetStage'
{ _gssRestAPIId = pRestAPIId_
, _gssStageName = pStageName_
}
gssRestAPIId :: Lens' GetStage Text
gssRestAPIId = lens _gssRestAPIId (\ s a -> s{_gssRestAPIId = a});
gssStageName :: Lens' GetStage Text
gssStageName = lens _gssStageName (\ s a -> s{_gssStageName = a});
instance AWSRequest GetStage where
type Rs GetStage = Stage
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetStage
instance ToHeaders GetStage where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetStage where
toPath GetStage'{..}
= mconcat
["/restapis/", toBS _gssRestAPIId, "/stages/",
toBS _gssStageName]
instance ToQuery GetStage where
toQuery = const mempty