{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.IAM.DeleteVirtualMFADevice
(
DeleteVirtualMFADevice (..),
newDeleteVirtualMFADevice,
deleteVirtualMFADevice_serialNumber,
DeleteVirtualMFADeviceResponse (..),
newDeleteVirtualMFADeviceResponse,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IAM.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteVirtualMFADevice = DeleteVirtualMFADevice'
{
DeleteVirtualMFADevice -> Text
serialNumber :: Prelude.Text
}
deriving (DeleteVirtualMFADevice -> DeleteVirtualMFADevice -> Bool
(DeleteVirtualMFADevice -> DeleteVirtualMFADevice -> Bool)
-> (DeleteVirtualMFADevice -> DeleteVirtualMFADevice -> Bool)
-> Eq DeleteVirtualMFADevice
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVirtualMFADevice -> DeleteVirtualMFADevice -> Bool
$c/= :: DeleteVirtualMFADevice -> DeleteVirtualMFADevice -> Bool
== :: DeleteVirtualMFADevice -> DeleteVirtualMFADevice -> Bool
$c== :: DeleteVirtualMFADevice -> DeleteVirtualMFADevice -> Bool
Prelude.Eq, ReadPrec [DeleteVirtualMFADevice]
ReadPrec DeleteVirtualMFADevice
Int -> ReadS DeleteVirtualMFADevice
ReadS [DeleteVirtualMFADevice]
(Int -> ReadS DeleteVirtualMFADevice)
-> ReadS [DeleteVirtualMFADevice]
-> ReadPrec DeleteVirtualMFADevice
-> ReadPrec [DeleteVirtualMFADevice]
-> Read DeleteVirtualMFADevice
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVirtualMFADevice]
$creadListPrec :: ReadPrec [DeleteVirtualMFADevice]
readPrec :: ReadPrec DeleteVirtualMFADevice
$creadPrec :: ReadPrec DeleteVirtualMFADevice
readList :: ReadS [DeleteVirtualMFADevice]
$creadList :: ReadS [DeleteVirtualMFADevice]
readsPrec :: Int -> ReadS DeleteVirtualMFADevice
$creadsPrec :: Int -> ReadS DeleteVirtualMFADevice
Prelude.Read, Int -> DeleteVirtualMFADevice -> ShowS
[DeleteVirtualMFADevice] -> ShowS
DeleteVirtualMFADevice -> String
(Int -> DeleteVirtualMFADevice -> ShowS)
-> (DeleteVirtualMFADevice -> String)
-> ([DeleteVirtualMFADevice] -> ShowS)
-> Show DeleteVirtualMFADevice
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVirtualMFADevice] -> ShowS
$cshowList :: [DeleteVirtualMFADevice] -> ShowS
show :: DeleteVirtualMFADevice -> String
$cshow :: DeleteVirtualMFADevice -> String
showsPrec :: Int -> DeleteVirtualMFADevice -> ShowS
$cshowsPrec :: Int -> DeleteVirtualMFADevice -> ShowS
Prelude.Show, (forall x. DeleteVirtualMFADevice -> Rep DeleteVirtualMFADevice x)
-> (forall x.
Rep DeleteVirtualMFADevice x -> DeleteVirtualMFADevice)
-> Generic DeleteVirtualMFADevice
forall x. Rep DeleteVirtualMFADevice x -> DeleteVirtualMFADevice
forall x. DeleteVirtualMFADevice -> Rep DeleteVirtualMFADevice x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteVirtualMFADevice x -> DeleteVirtualMFADevice
$cfrom :: forall x. DeleteVirtualMFADevice -> Rep DeleteVirtualMFADevice x
Prelude.Generic)
newDeleteVirtualMFADevice ::
Prelude.Text ->
DeleteVirtualMFADevice
newDeleteVirtualMFADevice :: Text -> DeleteVirtualMFADevice
newDeleteVirtualMFADevice Text
pSerialNumber_ =
DeleteVirtualMFADevice' :: Text -> DeleteVirtualMFADevice
DeleteVirtualMFADevice'
{ $sel:serialNumber:DeleteVirtualMFADevice' :: Text
serialNumber =
Text
pSerialNumber_
}
deleteVirtualMFADevice_serialNumber :: Lens.Lens' DeleteVirtualMFADevice Prelude.Text
deleteVirtualMFADevice_serialNumber :: (Text -> f Text)
-> DeleteVirtualMFADevice -> f DeleteVirtualMFADevice
deleteVirtualMFADevice_serialNumber = (DeleteVirtualMFADevice -> Text)
-> (DeleteVirtualMFADevice -> Text -> DeleteVirtualMFADevice)
-> Lens DeleteVirtualMFADevice DeleteVirtualMFADevice Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVirtualMFADevice' {Text
serialNumber :: Text
$sel:serialNumber:DeleteVirtualMFADevice' :: DeleteVirtualMFADevice -> Text
serialNumber} -> Text
serialNumber) (\s :: DeleteVirtualMFADevice
s@DeleteVirtualMFADevice' {} Text
a -> DeleteVirtualMFADevice
s {$sel:serialNumber:DeleteVirtualMFADevice' :: Text
serialNumber = Text
a} :: DeleteVirtualMFADevice)
instance Core.AWSRequest DeleteVirtualMFADevice where
type
AWSResponse DeleteVirtualMFADevice =
DeleteVirtualMFADeviceResponse
request :: DeleteVirtualMFADevice -> Request DeleteVirtualMFADevice
request = Service -> DeleteVirtualMFADevice -> Request DeleteVirtualMFADevice
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteVirtualMFADevice
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVirtualMFADevice)))
response =
AWSResponse DeleteVirtualMFADevice
-> Logger
-> Service
-> Proxy DeleteVirtualMFADevice
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteVirtualMFADevice)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteVirtualMFADevice
DeleteVirtualMFADeviceResponse
DeleteVirtualMFADeviceResponse'
instance Prelude.Hashable DeleteVirtualMFADevice
instance Prelude.NFData DeleteVirtualMFADevice
instance Core.ToHeaders DeleteVirtualMFADevice where
toHeaders :: DeleteVirtualMFADevice -> [Header]
toHeaders = [Header] -> DeleteVirtualMFADevice -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeleteVirtualMFADevice where
toPath :: DeleteVirtualMFADevice -> ByteString
toPath = ByteString -> DeleteVirtualMFADevice -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteVirtualMFADevice where
toQuery :: DeleteVirtualMFADevice -> QueryString
toQuery DeleteVirtualMFADevice' {Text
serialNumber :: Text
$sel:serialNumber:DeleteVirtualMFADevice' :: DeleteVirtualMFADevice -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeleteVirtualMFADevice" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"SerialNumber" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
serialNumber
]
data DeleteVirtualMFADeviceResponse = DeleteVirtualMFADeviceResponse'
{
}
deriving (DeleteVirtualMFADeviceResponse
-> DeleteVirtualMFADeviceResponse -> Bool
(DeleteVirtualMFADeviceResponse
-> DeleteVirtualMFADeviceResponse -> Bool)
-> (DeleteVirtualMFADeviceResponse
-> DeleteVirtualMFADeviceResponse -> Bool)
-> Eq DeleteVirtualMFADeviceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVirtualMFADeviceResponse
-> DeleteVirtualMFADeviceResponse -> Bool
$c/= :: DeleteVirtualMFADeviceResponse
-> DeleteVirtualMFADeviceResponse -> Bool
== :: DeleteVirtualMFADeviceResponse
-> DeleteVirtualMFADeviceResponse -> Bool
$c== :: DeleteVirtualMFADeviceResponse
-> DeleteVirtualMFADeviceResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVirtualMFADeviceResponse]
ReadPrec DeleteVirtualMFADeviceResponse
Int -> ReadS DeleteVirtualMFADeviceResponse
ReadS [DeleteVirtualMFADeviceResponse]
(Int -> ReadS DeleteVirtualMFADeviceResponse)
-> ReadS [DeleteVirtualMFADeviceResponse]
-> ReadPrec DeleteVirtualMFADeviceResponse
-> ReadPrec [DeleteVirtualMFADeviceResponse]
-> Read DeleteVirtualMFADeviceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVirtualMFADeviceResponse]
$creadListPrec :: ReadPrec [DeleteVirtualMFADeviceResponse]
readPrec :: ReadPrec DeleteVirtualMFADeviceResponse
$creadPrec :: ReadPrec DeleteVirtualMFADeviceResponse
readList :: ReadS [DeleteVirtualMFADeviceResponse]
$creadList :: ReadS [DeleteVirtualMFADeviceResponse]
readsPrec :: Int -> ReadS DeleteVirtualMFADeviceResponse
$creadsPrec :: Int -> ReadS DeleteVirtualMFADeviceResponse
Prelude.Read, Int -> DeleteVirtualMFADeviceResponse -> ShowS
[DeleteVirtualMFADeviceResponse] -> ShowS
DeleteVirtualMFADeviceResponse -> String
(Int -> DeleteVirtualMFADeviceResponse -> ShowS)
-> (DeleteVirtualMFADeviceResponse -> String)
-> ([DeleteVirtualMFADeviceResponse] -> ShowS)
-> Show DeleteVirtualMFADeviceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVirtualMFADeviceResponse] -> ShowS
$cshowList :: [DeleteVirtualMFADeviceResponse] -> ShowS
show :: DeleteVirtualMFADeviceResponse -> String
$cshow :: DeleteVirtualMFADeviceResponse -> String
showsPrec :: Int -> DeleteVirtualMFADeviceResponse -> ShowS
$cshowsPrec :: Int -> DeleteVirtualMFADeviceResponse -> ShowS
Prelude.Show, (forall x.
DeleteVirtualMFADeviceResponse
-> Rep DeleteVirtualMFADeviceResponse x)
-> (forall x.
Rep DeleteVirtualMFADeviceResponse x
-> DeleteVirtualMFADeviceResponse)
-> Generic DeleteVirtualMFADeviceResponse
forall x.
Rep DeleteVirtualMFADeviceResponse x
-> DeleteVirtualMFADeviceResponse
forall x.
DeleteVirtualMFADeviceResponse
-> Rep DeleteVirtualMFADeviceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVirtualMFADeviceResponse x
-> DeleteVirtualMFADeviceResponse
$cfrom :: forall x.
DeleteVirtualMFADeviceResponse
-> Rep DeleteVirtualMFADeviceResponse x
Prelude.Generic)
newDeleteVirtualMFADeviceResponse ::
DeleteVirtualMFADeviceResponse
newDeleteVirtualMFADeviceResponse :: DeleteVirtualMFADeviceResponse
newDeleteVirtualMFADeviceResponse =
DeleteVirtualMFADeviceResponse
DeleteVirtualMFADeviceResponse'
instance
Prelude.NFData
DeleteVirtualMFADeviceResponse