{-# 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.GetUsagePlanKey
(
getUsagePlanKey
, GetUsagePlanKey
, gUsagePlanId
, gKeyId
, usagePlanKey
, UsagePlanKey
, upkValue
, upkName
, upkId
, upkType
) 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 GetUsagePlanKey = GetUsagePlanKey'
{ _gUsagePlanId :: !Text
, _gKeyId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getUsagePlanKey
:: Text
-> Text
-> GetUsagePlanKey
getUsagePlanKey pUsagePlanId_ pKeyId_ =
GetUsagePlanKey' {_gUsagePlanId = pUsagePlanId_, _gKeyId = pKeyId_}
gUsagePlanId :: Lens' GetUsagePlanKey Text
gUsagePlanId = lens _gUsagePlanId (\ s a -> s{_gUsagePlanId = a})
gKeyId :: Lens' GetUsagePlanKey Text
gKeyId = lens _gKeyId (\ s a -> s{_gKeyId = a})
instance AWSRequest GetUsagePlanKey where
type Rs GetUsagePlanKey = UsagePlanKey
request = get apiGateway
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetUsagePlanKey where
instance NFData GetUsagePlanKey where
instance ToHeaders GetUsagePlanKey where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath GetUsagePlanKey where
toPath GetUsagePlanKey'{..}
= mconcat
["/usageplans/", toBS _gUsagePlanId, "/keys/",
toBS _gKeyId]
instance ToQuery GetUsagePlanKey where
toQuery = const mempty