{-# 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.GetIntegration
(
getIntegration
, GetIntegration
, giRestAPIId
, giResourceId
, giHttpMethod
, integration
, Integration
, iHttpMethod
, iRequestTemplates
, iCredentials
, iConnectionId
, iRequestParameters
, iContentHandling
, iPassthroughBehavior
, iUri
, iIntegrationResponses
, iCacheNamespace
, iTimeoutInMillis
, iType
, iConnectionType
, iCacheKeyParameters
) 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 GetIntegration = GetIntegration'
{ _giRestAPIId :: !Text
, _giResourceId :: !Text
, _giHttpMethod :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getIntegration
:: Text
-> Text
-> Text
-> GetIntegration
getIntegration pRestAPIId_ pResourceId_ pHttpMethod_ =
GetIntegration'
{ _giRestAPIId = pRestAPIId_
, _giResourceId = pResourceId_
, _giHttpMethod = pHttpMethod_
}
giRestAPIId :: Lens' GetIntegration Text
giRestAPIId = lens _giRestAPIId (\ s a -> s{_giRestAPIId = a})
giResourceId :: Lens' GetIntegration Text
giResourceId = lens _giResourceId (\ s a -> s{_giResourceId = a})
giHttpMethod :: Lens' GetIntegration Text
giHttpMethod = lens _giHttpMethod (\ s a -> s{_giHttpMethod = a})
instance AWSRequest GetIntegration where
type Rs GetIntegration = Integration
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetIntegration where
instance NFData GetIntegration where
instance ToHeaders GetIntegration where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetIntegration where
toPath GetIntegration'{..}
= mconcat
["/restapis/", toBS _giRestAPIId, "/resources/",
toBS _giResourceId, "/methods/", toBS _giHttpMethod,
"/integration"]
instance ToQuery GetIntegration where
toQuery = const mempty