{-# 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.GetAuthorizer
(
getAuthorizer
, GetAuthorizer
, gaaRestAPIId
, gaaAuthorizerId
, authorizer
, Authorizer
, aAuthorizerURI
, aIdentityValidationExpression
, aProviderARNs
, aName
, aId
, aAuthorizerResultTtlInSeconds
, aAuthType
, aType
, aIdentitySource
, aAuthorizerCredentials
) 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 GetAuthorizer = GetAuthorizer'
{ _gaaRestAPIId :: !Text
, _gaaAuthorizerId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getAuthorizer
:: Text
-> Text
-> GetAuthorizer
getAuthorizer pRestAPIId_ pAuthorizerId_ =
GetAuthorizer'
{_gaaRestAPIId = pRestAPIId_, _gaaAuthorizerId = pAuthorizerId_}
gaaRestAPIId :: Lens' GetAuthorizer Text
gaaRestAPIId = lens _gaaRestAPIId (\ s a -> s{_gaaRestAPIId = a})
gaaAuthorizerId :: Lens' GetAuthorizer Text
gaaAuthorizerId = lens _gaaAuthorizerId (\ s a -> s{_gaaAuthorizerId = a})
instance AWSRequest GetAuthorizer where
type Rs GetAuthorizer = Authorizer
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetAuthorizer where
instance NFData GetAuthorizer where
instance ToHeaders GetAuthorizer where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetAuthorizer where
toPath GetAuthorizer'{..}
= mconcat
["/restapis/", toBS _gaaRestAPIId, "/authorizers/",
toBS _gaaAuthorizerId]
instance ToQuery GetAuthorizer where
toQuery = const mempty