{-# 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.OpsWorks.DeregisterEcsCluster
(
DeregisterEcsCluster (..),
newDeregisterEcsCluster,
deregisterEcsCluster_ecsClusterArn,
DeregisterEcsClusterResponse (..),
newDeregisterEcsClusterResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorks.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeregisterEcsCluster = DeregisterEcsCluster'
{
DeregisterEcsCluster -> Text
ecsClusterArn :: Prelude.Text
}
deriving (DeregisterEcsCluster -> DeregisterEcsCluster -> Bool
(DeregisterEcsCluster -> DeregisterEcsCluster -> Bool)
-> (DeregisterEcsCluster -> DeregisterEcsCluster -> Bool)
-> Eq DeregisterEcsCluster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeregisterEcsCluster -> DeregisterEcsCluster -> Bool
$c/= :: DeregisterEcsCluster -> DeregisterEcsCluster -> Bool
== :: DeregisterEcsCluster -> DeregisterEcsCluster -> Bool
$c== :: DeregisterEcsCluster -> DeregisterEcsCluster -> Bool
Prelude.Eq, ReadPrec [DeregisterEcsCluster]
ReadPrec DeregisterEcsCluster
Int -> ReadS DeregisterEcsCluster
ReadS [DeregisterEcsCluster]
(Int -> ReadS DeregisterEcsCluster)
-> ReadS [DeregisterEcsCluster]
-> ReadPrec DeregisterEcsCluster
-> ReadPrec [DeregisterEcsCluster]
-> Read DeregisterEcsCluster
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeregisterEcsCluster]
$creadListPrec :: ReadPrec [DeregisterEcsCluster]
readPrec :: ReadPrec DeregisterEcsCluster
$creadPrec :: ReadPrec DeregisterEcsCluster
readList :: ReadS [DeregisterEcsCluster]
$creadList :: ReadS [DeregisterEcsCluster]
readsPrec :: Int -> ReadS DeregisterEcsCluster
$creadsPrec :: Int -> ReadS DeregisterEcsCluster
Prelude.Read, Int -> DeregisterEcsCluster -> ShowS
[DeregisterEcsCluster] -> ShowS
DeregisterEcsCluster -> String
(Int -> DeregisterEcsCluster -> ShowS)
-> (DeregisterEcsCluster -> String)
-> ([DeregisterEcsCluster] -> ShowS)
-> Show DeregisterEcsCluster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeregisterEcsCluster] -> ShowS
$cshowList :: [DeregisterEcsCluster] -> ShowS
show :: DeregisterEcsCluster -> String
$cshow :: DeregisterEcsCluster -> String
showsPrec :: Int -> DeregisterEcsCluster -> ShowS
$cshowsPrec :: Int -> DeregisterEcsCluster -> ShowS
Prelude.Show, (forall x. DeregisterEcsCluster -> Rep DeregisterEcsCluster x)
-> (forall x. Rep DeregisterEcsCluster x -> DeregisterEcsCluster)
-> Generic DeregisterEcsCluster
forall x. Rep DeregisterEcsCluster x -> DeregisterEcsCluster
forall x. DeregisterEcsCluster -> Rep DeregisterEcsCluster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeregisterEcsCluster x -> DeregisterEcsCluster
$cfrom :: forall x. DeregisterEcsCluster -> Rep DeregisterEcsCluster x
Prelude.Generic)
newDeregisterEcsCluster ::
Prelude.Text ->
DeregisterEcsCluster
newDeregisterEcsCluster :: Text -> DeregisterEcsCluster
newDeregisterEcsCluster Text
pEcsClusterArn_ =
DeregisterEcsCluster' :: Text -> DeregisterEcsCluster
DeregisterEcsCluster'
{ $sel:ecsClusterArn:DeregisterEcsCluster' :: Text
ecsClusterArn =
Text
pEcsClusterArn_
}
deregisterEcsCluster_ecsClusterArn :: Lens.Lens' DeregisterEcsCluster Prelude.Text
deregisterEcsCluster_ecsClusterArn :: (Text -> f Text) -> DeregisterEcsCluster -> f DeregisterEcsCluster
deregisterEcsCluster_ecsClusterArn = (DeregisterEcsCluster -> Text)
-> (DeregisterEcsCluster -> Text -> DeregisterEcsCluster)
-> Lens DeregisterEcsCluster DeregisterEcsCluster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterEcsCluster' {Text
ecsClusterArn :: Text
$sel:ecsClusterArn:DeregisterEcsCluster' :: DeregisterEcsCluster -> Text
ecsClusterArn} -> Text
ecsClusterArn) (\s :: DeregisterEcsCluster
s@DeregisterEcsCluster' {} Text
a -> DeregisterEcsCluster
s {$sel:ecsClusterArn:DeregisterEcsCluster' :: Text
ecsClusterArn = Text
a} :: DeregisterEcsCluster)
instance Core.AWSRequest DeregisterEcsCluster where
type
AWSResponse DeregisterEcsCluster =
DeregisterEcsClusterResponse
request :: DeregisterEcsCluster -> Request DeregisterEcsCluster
request = Service -> DeregisterEcsCluster -> Request DeregisterEcsCluster
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeregisterEcsCluster
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeregisterEcsCluster)))
response =
AWSResponse DeregisterEcsCluster
-> Logger
-> Service
-> Proxy DeregisterEcsCluster
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeregisterEcsCluster)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeregisterEcsCluster
DeregisterEcsClusterResponse
DeregisterEcsClusterResponse'
instance Prelude.Hashable DeregisterEcsCluster
instance Prelude.NFData DeregisterEcsCluster
instance Core.ToHeaders DeregisterEcsCluster where
toHeaders :: DeregisterEcsCluster -> [Header]
toHeaders =
[Header] -> DeregisterEcsCluster -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"OpsWorks_20130218.DeregisterEcsCluster" ::
Prelude.ByteString
),
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.ToJSON DeregisterEcsCluster where
toJSON :: DeregisterEcsCluster -> Value
toJSON DeregisterEcsCluster' {Text
ecsClusterArn :: Text
$sel:ecsClusterArn:DeregisterEcsCluster' :: DeregisterEcsCluster -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"EcsClusterArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
ecsClusterArn)
]
)
instance Core.ToPath DeregisterEcsCluster where
toPath :: DeregisterEcsCluster -> ByteString
toPath = ByteString -> DeregisterEcsCluster -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeregisterEcsCluster where
toQuery :: DeregisterEcsCluster -> QueryString
toQuery = QueryString -> DeregisterEcsCluster -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeregisterEcsClusterResponse = DeregisterEcsClusterResponse'
{
}
deriving (DeregisterEcsClusterResponse
-> DeregisterEcsClusterResponse -> Bool
(DeregisterEcsClusterResponse
-> DeregisterEcsClusterResponse -> Bool)
-> (DeregisterEcsClusterResponse
-> DeregisterEcsClusterResponse -> Bool)
-> Eq DeregisterEcsClusterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeregisterEcsClusterResponse
-> DeregisterEcsClusterResponse -> Bool
$c/= :: DeregisterEcsClusterResponse
-> DeregisterEcsClusterResponse -> Bool
== :: DeregisterEcsClusterResponse
-> DeregisterEcsClusterResponse -> Bool
$c== :: DeregisterEcsClusterResponse
-> DeregisterEcsClusterResponse -> Bool
Prelude.Eq, ReadPrec [DeregisterEcsClusterResponse]
ReadPrec DeregisterEcsClusterResponse
Int -> ReadS DeregisterEcsClusterResponse
ReadS [DeregisterEcsClusterResponse]
(Int -> ReadS DeregisterEcsClusterResponse)
-> ReadS [DeregisterEcsClusterResponse]
-> ReadPrec DeregisterEcsClusterResponse
-> ReadPrec [DeregisterEcsClusterResponse]
-> Read DeregisterEcsClusterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeregisterEcsClusterResponse]
$creadListPrec :: ReadPrec [DeregisterEcsClusterResponse]
readPrec :: ReadPrec DeregisterEcsClusterResponse
$creadPrec :: ReadPrec DeregisterEcsClusterResponse
readList :: ReadS [DeregisterEcsClusterResponse]
$creadList :: ReadS [DeregisterEcsClusterResponse]
readsPrec :: Int -> ReadS DeregisterEcsClusterResponse
$creadsPrec :: Int -> ReadS DeregisterEcsClusterResponse
Prelude.Read, Int -> DeregisterEcsClusterResponse -> ShowS
[DeregisterEcsClusterResponse] -> ShowS
DeregisterEcsClusterResponse -> String
(Int -> DeregisterEcsClusterResponse -> ShowS)
-> (DeregisterEcsClusterResponse -> String)
-> ([DeregisterEcsClusterResponse] -> ShowS)
-> Show DeregisterEcsClusterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeregisterEcsClusterResponse] -> ShowS
$cshowList :: [DeregisterEcsClusterResponse] -> ShowS
show :: DeregisterEcsClusterResponse -> String
$cshow :: DeregisterEcsClusterResponse -> String
showsPrec :: Int -> DeregisterEcsClusterResponse -> ShowS
$cshowsPrec :: Int -> DeregisterEcsClusterResponse -> ShowS
Prelude.Show, (forall x.
DeregisterEcsClusterResponse -> Rep DeregisterEcsClusterResponse x)
-> (forall x.
Rep DeregisterEcsClusterResponse x -> DeregisterEcsClusterResponse)
-> Generic DeregisterEcsClusterResponse
forall x.
Rep DeregisterEcsClusterResponse x -> DeregisterEcsClusterResponse
forall x.
DeregisterEcsClusterResponse -> Rep DeregisterEcsClusterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeregisterEcsClusterResponse x -> DeregisterEcsClusterResponse
$cfrom :: forall x.
DeregisterEcsClusterResponse -> Rep DeregisterEcsClusterResponse x
Prelude.Generic)
newDeregisterEcsClusterResponse ::
DeregisterEcsClusterResponse
newDeregisterEcsClusterResponse :: DeregisterEcsClusterResponse
newDeregisterEcsClusterResponse =
DeregisterEcsClusterResponse
DeregisterEcsClusterResponse'
instance Prelude.NFData DeregisterEcsClusterResponse