{-# 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.Connect.DisassociateSecurityKey
(
DisassociateSecurityKey (..),
newDisassociateSecurityKey,
disassociateSecurityKey_instanceId,
disassociateSecurityKey_associationId,
DisassociateSecurityKeyResponse (..),
newDisassociateSecurityKeyResponse,
)
where
import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
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 DisassociateSecurityKey = DisassociateSecurityKey'
{
DisassociateSecurityKey -> Text
instanceId :: Prelude.Text,
DisassociateSecurityKey -> Text
associationId :: Prelude.Text
}
deriving (DisassociateSecurityKey -> DisassociateSecurityKey -> Bool
(DisassociateSecurityKey -> DisassociateSecurityKey -> Bool)
-> (DisassociateSecurityKey -> DisassociateSecurityKey -> Bool)
-> Eq DisassociateSecurityKey
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateSecurityKey -> DisassociateSecurityKey -> Bool
$c/= :: DisassociateSecurityKey -> DisassociateSecurityKey -> Bool
== :: DisassociateSecurityKey -> DisassociateSecurityKey -> Bool
$c== :: DisassociateSecurityKey -> DisassociateSecurityKey -> Bool
Prelude.Eq, ReadPrec [DisassociateSecurityKey]
ReadPrec DisassociateSecurityKey
Int -> ReadS DisassociateSecurityKey
ReadS [DisassociateSecurityKey]
(Int -> ReadS DisassociateSecurityKey)
-> ReadS [DisassociateSecurityKey]
-> ReadPrec DisassociateSecurityKey
-> ReadPrec [DisassociateSecurityKey]
-> Read DisassociateSecurityKey
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateSecurityKey]
$creadListPrec :: ReadPrec [DisassociateSecurityKey]
readPrec :: ReadPrec DisassociateSecurityKey
$creadPrec :: ReadPrec DisassociateSecurityKey
readList :: ReadS [DisassociateSecurityKey]
$creadList :: ReadS [DisassociateSecurityKey]
readsPrec :: Int -> ReadS DisassociateSecurityKey
$creadsPrec :: Int -> ReadS DisassociateSecurityKey
Prelude.Read, Int -> DisassociateSecurityKey -> ShowS
[DisassociateSecurityKey] -> ShowS
DisassociateSecurityKey -> String
(Int -> DisassociateSecurityKey -> ShowS)
-> (DisassociateSecurityKey -> String)
-> ([DisassociateSecurityKey] -> ShowS)
-> Show DisassociateSecurityKey
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateSecurityKey] -> ShowS
$cshowList :: [DisassociateSecurityKey] -> ShowS
show :: DisassociateSecurityKey -> String
$cshow :: DisassociateSecurityKey -> String
showsPrec :: Int -> DisassociateSecurityKey -> ShowS
$cshowsPrec :: Int -> DisassociateSecurityKey -> ShowS
Prelude.Show, (forall x.
DisassociateSecurityKey -> Rep DisassociateSecurityKey x)
-> (forall x.
Rep DisassociateSecurityKey x -> DisassociateSecurityKey)
-> Generic DisassociateSecurityKey
forall x. Rep DisassociateSecurityKey x -> DisassociateSecurityKey
forall x. DisassociateSecurityKey -> Rep DisassociateSecurityKey x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisassociateSecurityKey x -> DisassociateSecurityKey
$cfrom :: forall x. DisassociateSecurityKey -> Rep DisassociateSecurityKey x
Prelude.Generic)
newDisassociateSecurityKey ::
Prelude.Text ->
Prelude.Text ->
DisassociateSecurityKey
newDisassociateSecurityKey :: Text -> Text -> DisassociateSecurityKey
newDisassociateSecurityKey
Text
pInstanceId_
Text
pAssociationId_ =
DisassociateSecurityKey' :: Text -> Text -> DisassociateSecurityKey
DisassociateSecurityKey'
{ $sel:instanceId:DisassociateSecurityKey' :: Text
instanceId = Text
pInstanceId_,
$sel:associationId:DisassociateSecurityKey' :: Text
associationId = Text
pAssociationId_
}
disassociateSecurityKey_instanceId :: Lens.Lens' DisassociateSecurityKey Prelude.Text
disassociateSecurityKey_instanceId :: (Text -> f Text)
-> DisassociateSecurityKey -> f DisassociateSecurityKey
disassociateSecurityKey_instanceId = (DisassociateSecurityKey -> Text)
-> (DisassociateSecurityKey -> Text -> DisassociateSecurityKey)
-> Lens DisassociateSecurityKey DisassociateSecurityKey Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateSecurityKey' {Text
instanceId :: Text
$sel:instanceId:DisassociateSecurityKey' :: DisassociateSecurityKey -> Text
instanceId} -> Text
instanceId) (\s :: DisassociateSecurityKey
s@DisassociateSecurityKey' {} Text
a -> DisassociateSecurityKey
s {$sel:instanceId:DisassociateSecurityKey' :: Text
instanceId = Text
a} :: DisassociateSecurityKey)
disassociateSecurityKey_associationId :: Lens.Lens' DisassociateSecurityKey Prelude.Text
disassociateSecurityKey_associationId :: (Text -> f Text)
-> DisassociateSecurityKey -> f DisassociateSecurityKey
disassociateSecurityKey_associationId = (DisassociateSecurityKey -> Text)
-> (DisassociateSecurityKey -> Text -> DisassociateSecurityKey)
-> Lens DisassociateSecurityKey DisassociateSecurityKey Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateSecurityKey' {Text
associationId :: Text
$sel:associationId:DisassociateSecurityKey' :: DisassociateSecurityKey -> Text
associationId} -> Text
associationId) (\s :: DisassociateSecurityKey
s@DisassociateSecurityKey' {} Text
a -> DisassociateSecurityKey
s {$sel:associationId:DisassociateSecurityKey' :: Text
associationId = Text
a} :: DisassociateSecurityKey)
instance Core.AWSRequest DisassociateSecurityKey where
type
AWSResponse DisassociateSecurityKey =
DisassociateSecurityKeyResponse
request :: DisassociateSecurityKey -> Request DisassociateSecurityKey
request = Service
-> DisassociateSecurityKey -> Request DisassociateSecurityKey
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateSecurityKey
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateSecurityKey)))
response =
AWSResponse DisassociateSecurityKey
-> Logger
-> Service
-> Proxy DisassociateSecurityKey
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateSecurityKey)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DisassociateSecurityKey
DisassociateSecurityKeyResponse
DisassociateSecurityKeyResponse'
instance Prelude.Hashable DisassociateSecurityKey
instance Prelude.NFData DisassociateSecurityKey
instance Core.ToHeaders DisassociateSecurityKey where
toHeaders :: DisassociateSecurityKey -> [Header]
toHeaders =
[Header] -> DisassociateSecurityKey -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DisassociateSecurityKey where
toPath :: DisassociateSecurityKey -> ByteString
toPath DisassociateSecurityKey' {Text
associationId :: Text
instanceId :: Text
$sel:associationId:DisassociateSecurityKey' :: DisassociateSecurityKey -> Text
$sel:instanceId:DisassociateSecurityKey' :: DisassociateSecurityKey -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/instance/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
ByteString
"/security-key/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
associationId
]
instance Core.ToQuery DisassociateSecurityKey where
toQuery :: DisassociateSecurityKey -> QueryString
toQuery = QueryString -> DisassociateSecurityKey -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateSecurityKeyResponse = DisassociateSecurityKeyResponse'
{
}
deriving (DisassociateSecurityKeyResponse
-> DisassociateSecurityKeyResponse -> Bool
(DisassociateSecurityKeyResponse
-> DisassociateSecurityKeyResponse -> Bool)
-> (DisassociateSecurityKeyResponse
-> DisassociateSecurityKeyResponse -> Bool)
-> Eq DisassociateSecurityKeyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateSecurityKeyResponse
-> DisassociateSecurityKeyResponse -> Bool
$c/= :: DisassociateSecurityKeyResponse
-> DisassociateSecurityKeyResponse -> Bool
== :: DisassociateSecurityKeyResponse
-> DisassociateSecurityKeyResponse -> Bool
$c== :: DisassociateSecurityKeyResponse
-> DisassociateSecurityKeyResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateSecurityKeyResponse]
ReadPrec DisassociateSecurityKeyResponse
Int -> ReadS DisassociateSecurityKeyResponse
ReadS [DisassociateSecurityKeyResponse]
(Int -> ReadS DisassociateSecurityKeyResponse)
-> ReadS [DisassociateSecurityKeyResponse]
-> ReadPrec DisassociateSecurityKeyResponse
-> ReadPrec [DisassociateSecurityKeyResponse]
-> Read DisassociateSecurityKeyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateSecurityKeyResponse]
$creadListPrec :: ReadPrec [DisassociateSecurityKeyResponse]
readPrec :: ReadPrec DisassociateSecurityKeyResponse
$creadPrec :: ReadPrec DisassociateSecurityKeyResponse
readList :: ReadS [DisassociateSecurityKeyResponse]
$creadList :: ReadS [DisassociateSecurityKeyResponse]
readsPrec :: Int -> ReadS DisassociateSecurityKeyResponse
$creadsPrec :: Int -> ReadS DisassociateSecurityKeyResponse
Prelude.Read, Int -> DisassociateSecurityKeyResponse -> ShowS
[DisassociateSecurityKeyResponse] -> ShowS
DisassociateSecurityKeyResponse -> String
(Int -> DisassociateSecurityKeyResponse -> ShowS)
-> (DisassociateSecurityKeyResponse -> String)
-> ([DisassociateSecurityKeyResponse] -> ShowS)
-> Show DisassociateSecurityKeyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateSecurityKeyResponse] -> ShowS
$cshowList :: [DisassociateSecurityKeyResponse] -> ShowS
show :: DisassociateSecurityKeyResponse -> String
$cshow :: DisassociateSecurityKeyResponse -> String
showsPrec :: Int -> DisassociateSecurityKeyResponse -> ShowS
$cshowsPrec :: Int -> DisassociateSecurityKeyResponse -> ShowS
Prelude.Show, (forall x.
DisassociateSecurityKeyResponse
-> Rep DisassociateSecurityKeyResponse x)
-> (forall x.
Rep DisassociateSecurityKeyResponse x
-> DisassociateSecurityKeyResponse)
-> Generic DisassociateSecurityKeyResponse
forall x.
Rep DisassociateSecurityKeyResponse x
-> DisassociateSecurityKeyResponse
forall x.
DisassociateSecurityKeyResponse
-> Rep DisassociateSecurityKeyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateSecurityKeyResponse x
-> DisassociateSecurityKeyResponse
$cfrom :: forall x.
DisassociateSecurityKeyResponse
-> Rep DisassociateSecurityKeyResponse x
Prelude.Generic)
newDisassociateSecurityKeyResponse ::
DisassociateSecurityKeyResponse
newDisassociateSecurityKeyResponse :: DisassociateSecurityKeyResponse
newDisassociateSecurityKeyResponse =
DisassociateSecurityKeyResponse
DisassociateSecurityKeyResponse'
instance
Prelude.NFData
DisassociateSecurityKeyResponse