{-# 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.APIGateway.GetDeployment
(
getDeployment
, GetDeployment
, gRestAPIId
, gDeploymentId
, deployment
, Deployment
, dApiSummary
, dCreatedDate
, dId
, dDescription
) 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 GetDeployment = GetDeployment'
{ _gRestAPIId :: !Text
, _gDeploymentId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getDeployment
:: Text
-> Text
-> GetDeployment
getDeployment pRestAPIId_ pDeploymentId_ =
GetDeployment'
{ _gRestAPIId = pRestAPIId_
, _gDeploymentId = pDeploymentId_
}
gRestAPIId :: Lens' GetDeployment Text
gRestAPIId = lens _gRestAPIId (\ s a -> s{_gRestAPIId = a});
gDeploymentId :: Lens' GetDeployment Text
gDeploymentId = lens _gDeploymentId (\ s a -> s{_gDeploymentId = a});
instance AWSRequest GetDeployment where
type Rs GetDeployment = Deployment
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetDeployment
instance NFData GetDeployment
instance ToHeaders GetDeployment where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetDeployment where
toPath GetDeployment'{..}
= mconcat
["/restapis/", toBS _gRestAPIId, "/deployments/",
toBS _gDeploymentId]
instance ToQuery GetDeployment where
toQuery = const mempty