{-# 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.AppSync.DeleteAPIKey
(
deleteAPIKey
, DeleteAPIKey
, dakApiId
, dakId
, deleteAPIKeyResponse
, DeleteAPIKeyResponse
, dakrsResponseStatus
) where
import Network.AWS.AppSync.Types
import Network.AWS.AppSync.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteAPIKey = DeleteAPIKey'
{ _dakApiId :: !Text
, _dakId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteAPIKey
:: Text
-> Text
-> DeleteAPIKey
deleteAPIKey pApiId_ pId_ = DeleteAPIKey' {_dakApiId = pApiId_, _dakId = pId_}
dakApiId :: Lens' DeleteAPIKey Text
dakApiId = lens _dakApiId (\ s a -> s{_dakApiId = a})
dakId :: Lens' DeleteAPIKey Text
dakId = lens _dakId (\ s a -> s{_dakId = a})
instance AWSRequest DeleteAPIKey where
type Rs DeleteAPIKey = DeleteAPIKeyResponse
request = delete appSync
response
= receiveEmpty
(\ s h x ->
DeleteAPIKeyResponse' <$> (pure (fromEnum s)))
instance Hashable DeleteAPIKey where
instance NFData DeleteAPIKey where
instance ToHeaders DeleteAPIKey where
toHeaders
= const
(mconcat
["Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToPath DeleteAPIKey where
toPath DeleteAPIKey'{..}
= mconcat
["/v1/apis/", toBS _dakApiId, "/apikeys/",
toBS _dakId]
instance ToQuery DeleteAPIKey where
toQuery = const mempty
newtype DeleteAPIKeyResponse = DeleteAPIKeyResponse'
{ _dakrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteAPIKeyResponse
:: Int
-> DeleteAPIKeyResponse
deleteAPIKeyResponse pResponseStatus_ =
DeleteAPIKeyResponse' {_dakrsResponseStatus = pResponseStatus_}
dakrsResponseStatus :: Lens' DeleteAPIKeyResponse Int
dakrsResponseStatus = lens _dakrsResponseStatus (\ s a -> s{_dakrsResponseStatus = a})
instance NFData DeleteAPIKeyResponse where