module Aws.Iam.Commands.DeleteAccessKey
( DeleteAccessKey(..)
, DeleteAccessKeyResponse(..)
) where
import Aws.Core
import Aws.Iam.Core
import Aws.Iam.Internal
import Control.Applicative
import Data.Text (Text)
import Data.Typeable
data DeleteAccessKey
= DeleteAccessKey {
dakAccessKeyId :: Text
, dakUserName :: Maybe Text
}
deriving (Eq, Ord, Show, Typeable)
instance SignQuery DeleteAccessKey where
type ServiceConfiguration DeleteAccessKey = IamConfiguration
signQuery DeleteAccessKey{..}
= iamAction' "DeleteAccessKey" [
Just ("AccessKeyId", dakAccessKeyId)
, ("UserName",) <$> dakUserName
]
data DeleteAccessKeyResponse = DeleteAccessKeyResponse
deriving (Eq, Ord, Show, Typeable)
instance ResponseConsumer DeleteAccessKey DeleteAccessKeyResponse where
type ResponseMetadata DeleteAccessKeyResponse = IamMetadata
responseConsumer _ = iamResponseConsumer (const $ return DeleteAccessKeyResponse)
instance Transaction DeleteAccessKey DeleteAccessKeyResponse
instance AsMemoryResponse DeleteAccessKeyResponse where
type MemoryResponse DeleteAccessKeyResponse = DeleteAccessKeyResponse
loadToMemory = return