{-# 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.EC2.DeleteKeyPair
(
deleteKeyPair
, DeleteKeyPair
, dkpDryRun
, dkpKeyName
, deleteKeyPairResponse
, DeleteKeyPairResponse
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteKeyPair = DeleteKeyPair'
{ _dkpDryRun :: !(Maybe Bool)
, _dkpKeyName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteKeyPair
:: Text
-> DeleteKeyPair
deleteKeyPair pKeyName_ =
DeleteKeyPair' {_dkpDryRun = Nothing, _dkpKeyName = pKeyName_}
dkpDryRun :: Lens' DeleteKeyPair (Maybe Bool)
dkpDryRun = lens _dkpDryRun (\ s a -> s{_dkpDryRun = a})
dkpKeyName :: Lens' DeleteKeyPair Text
dkpKeyName = lens _dkpKeyName (\ s a -> s{_dkpKeyName = a})
instance AWSRequest DeleteKeyPair where
type Rs DeleteKeyPair = DeleteKeyPairResponse
request = postQuery ec2
response = receiveNull DeleteKeyPairResponse'
instance Hashable DeleteKeyPair where
instance NFData DeleteKeyPair where
instance ToHeaders DeleteKeyPair where
toHeaders = const mempty
instance ToPath DeleteKeyPair where
toPath = const "/"
instance ToQuery DeleteKeyPair where
toQuery DeleteKeyPair'{..}
= mconcat
["Action" =: ("DeleteKeyPair" :: ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"DryRun" =: _dkpDryRun, "KeyName" =: _dkpKeyName]
data DeleteKeyPairResponse =
DeleteKeyPairResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteKeyPairResponse
:: DeleteKeyPairResponse
deleteKeyPairResponse = DeleteKeyPairResponse'
instance NFData DeleteKeyPairResponse where