{-# 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.Route53AutoNaming.UpdateInstanceCustomHealthStatus
(
UpdateInstanceCustomHealthStatus (..),
newUpdateInstanceCustomHealthStatus,
updateInstanceCustomHealthStatus_serviceId,
updateInstanceCustomHealthStatus_instanceId,
updateInstanceCustomHealthStatus_status,
UpdateInstanceCustomHealthStatusResponse (..),
newUpdateInstanceCustomHealthStatusResponse,
)
where
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
import Amazonka.Route53AutoNaming.Types
data UpdateInstanceCustomHealthStatus = UpdateInstanceCustomHealthStatus'
{
UpdateInstanceCustomHealthStatus -> Text
serviceId :: Prelude.Text,
UpdateInstanceCustomHealthStatus -> Text
instanceId :: Prelude.Text,
UpdateInstanceCustomHealthStatus -> CustomHealthStatus
status :: CustomHealthStatus
}
deriving (UpdateInstanceCustomHealthStatus
-> UpdateInstanceCustomHealthStatus -> Bool
(UpdateInstanceCustomHealthStatus
-> UpdateInstanceCustomHealthStatus -> Bool)
-> (UpdateInstanceCustomHealthStatus
-> UpdateInstanceCustomHealthStatus -> Bool)
-> Eq UpdateInstanceCustomHealthStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInstanceCustomHealthStatus
-> UpdateInstanceCustomHealthStatus -> Bool
$c/= :: UpdateInstanceCustomHealthStatus
-> UpdateInstanceCustomHealthStatus -> Bool
== :: UpdateInstanceCustomHealthStatus
-> UpdateInstanceCustomHealthStatus -> Bool
$c== :: UpdateInstanceCustomHealthStatus
-> UpdateInstanceCustomHealthStatus -> Bool
Prelude.Eq, ReadPrec [UpdateInstanceCustomHealthStatus]
ReadPrec UpdateInstanceCustomHealthStatus
Int -> ReadS UpdateInstanceCustomHealthStatus
ReadS [UpdateInstanceCustomHealthStatus]
(Int -> ReadS UpdateInstanceCustomHealthStatus)
-> ReadS [UpdateInstanceCustomHealthStatus]
-> ReadPrec UpdateInstanceCustomHealthStatus
-> ReadPrec [UpdateInstanceCustomHealthStatus]
-> Read UpdateInstanceCustomHealthStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInstanceCustomHealthStatus]
$creadListPrec :: ReadPrec [UpdateInstanceCustomHealthStatus]
readPrec :: ReadPrec UpdateInstanceCustomHealthStatus
$creadPrec :: ReadPrec UpdateInstanceCustomHealthStatus
readList :: ReadS [UpdateInstanceCustomHealthStatus]
$creadList :: ReadS [UpdateInstanceCustomHealthStatus]
readsPrec :: Int -> ReadS UpdateInstanceCustomHealthStatus
$creadsPrec :: Int -> ReadS UpdateInstanceCustomHealthStatus
Prelude.Read, Int -> UpdateInstanceCustomHealthStatus -> ShowS
[UpdateInstanceCustomHealthStatus] -> ShowS
UpdateInstanceCustomHealthStatus -> String
(Int -> UpdateInstanceCustomHealthStatus -> ShowS)
-> (UpdateInstanceCustomHealthStatus -> String)
-> ([UpdateInstanceCustomHealthStatus] -> ShowS)
-> Show UpdateInstanceCustomHealthStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInstanceCustomHealthStatus] -> ShowS
$cshowList :: [UpdateInstanceCustomHealthStatus] -> ShowS
show :: UpdateInstanceCustomHealthStatus -> String
$cshow :: UpdateInstanceCustomHealthStatus -> String
showsPrec :: Int -> UpdateInstanceCustomHealthStatus -> ShowS
$cshowsPrec :: Int -> UpdateInstanceCustomHealthStatus -> ShowS
Prelude.Show, (forall x.
UpdateInstanceCustomHealthStatus
-> Rep UpdateInstanceCustomHealthStatus x)
-> (forall x.
Rep UpdateInstanceCustomHealthStatus x
-> UpdateInstanceCustomHealthStatus)
-> Generic UpdateInstanceCustomHealthStatus
forall x.
Rep UpdateInstanceCustomHealthStatus x
-> UpdateInstanceCustomHealthStatus
forall x.
UpdateInstanceCustomHealthStatus
-> Rep UpdateInstanceCustomHealthStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateInstanceCustomHealthStatus x
-> UpdateInstanceCustomHealthStatus
$cfrom :: forall x.
UpdateInstanceCustomHealthStatus
-> Rep UpdateInstanceCustomHealthStatus x
Prelude.Generic)
newUpdateInstanceCustomHealthStatus ::
Prelude.Text ->
Prelude.Text ->
CustomHealthStatus ->
UpdateInstanceCustomHealthStatus
newUpdateInstanceCustomHealthStatus :: Text
-> Text -> CustomHealthStatus -> UpdateInstanceCustomHealthStatus
newUpdateInstanceCustomHealthStatus
Text
pServiceId_
Text
pInstanceId_
CustomHealthStatus
pStatus_ =
UpdateInstanceCustomHealthStatus' :: Text
-> Text -> CustomHealthStatus -> UpdateInstanceCustomHealthStatus
UpdateInstanceCustomHealthStatus'
{ $sel:serviceId:UpdateInstanceCustomHealthStatus' :: Text
serviceId =
Text
pServiceId_,
$sel:instanceId:UpdateInstanceCustomHealthStatus' :: Text
instanceId = Text
pInstanceId_,
$sel:status:UpdateInstanceCustomHealthStatus' :: CustomHealthStatus
status = CustomHealthStatus
pStatus_
}
updateInstanceCustomHealthStatus_serviceId :: Lens.Lens' UpdateInstanceCustomHealthStatus Prelude.Text
updateInstanceCustomHealthStatus_serviceId :: (Text -> f Text)
-> UpdateInstanceCustomHealthStatus
-> f UpdateInstanceCustomHealthStatus
updateInstanceCustomHealthStatus_serviceId = (UpdateInstanceCustomHealthStatus -> Text)
-> (UpdateInstanceCustomHealthStatus
-> Text -> UpdateInstanceCustomHealthStatus)
-> Lens
UpdateInstanceCustomHealthStatus
UpdateInstanceCustomHealthStatus
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceCustomHealthStatus' {Text
serviceId :: Text
$sel:serviceId:UpdateInstanceCustomHealthStatus' :: UpdateInstanceCustomHealthStatus -> Text
serviceId} -> Text
serviceId) (\s :: UpdateInstanceCustomHealthStatus
s@UpdateInstanceCustomHealthStatus' {} Text
a -> UpdateInstanceCustomHealthStatus
s {$sel:serviceId:UpdateInstanceCustomHealthStatus' :: Text
serviceId = Text
a} :: UpdateInstanceCustomHealthStatus)
updateInstanceCustomHealthStatus_instanceId :: Lens.Lens' UpdateInstanceCustomHealthStatus Prelude.Text
updateInstanceCustomHealthStatus_instanceId :: (Text -> f Text)
-> UpdateInstanceCustomHealthStatus
-> f UpdateInstanceCustomHealthStatus
updateInstanceCustomHealthStatus_instanceId = (UpdateInstanceCustomHealthStatus -> Text)
-> (UpdateInstanceCustomHealthStatus
-> Text -> UpdateInstanceCustomHealthStatus)
-> Lens
UpdateInstanceCustomHealthStatus
UpdateInstanceCustomHealthStatus
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceCustomHealthStatus' {Text
instanceId :: Text
$sel:instanceId:UpdateInstanceCustomHealthStatus' :: UpdateInstanceCustomHealthStatus -> Text
instanceId} -> Text
instanceId) (\s :: UpdateInstanceCustomHealthStatus
s@UpdateInstanceCustomHealthStatus' {} Text
a -> UpdateInstanceCustomHealthStatus
s {$sel:instanceId:UpdateInstanceCustomHealthStatus' :: Text
instanceId = Text
a} :: UpdateInstanceCustomHealthStatus)
updateInstanceCustomHealthStatus_status :: Lens.Lens' UpdateInstanceCustomHealthStatus CustomHealthStatus
updateInstanceCustomHealthStatus_status :: (CustomHealthStatus -> f CustomHealthStatus)
-> UpdateInstanceCustomHealthStatus
-> f UpdateInstanceCustomHealthStatus
updateInstanceCustomHealthStatus_status = (UpdateInstanceCustomHealthStatus -> CustomHealthStatus)
-> (UpdateInstanceCustomHealthStatus
-> CustomHealthStatus -> UpdateInstanceCustomHealthStatus)
-> Lens
UpdateInstanceCustomHealthStatus
UpdateInstanceCustomHealthStatus
CustomHealthStatus
CustomHealthStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceCustomHealthStatus' {CustomHealthStatus
status :: CustomHealthStatus
$sel:status:UpdateInstanceCustomHealthStatus' :: UpdateInstanceCustomHealthStatus -> CustomHealthStatus
status} -> CustomHealthStatus
status) (\s :: UpdateInstanceCustomHealthStatus
s@UpdateInstanceCustomHealthStatus' {} CustomHealthStatus
a -> UpdateInstanceCustomHealthStatus
s {$sel:status:UpdateInstanceCustomHealthStatus' :: CustomHealthStatus
status = CustomHealthStatus
a} :: UpdateInstanceCustomHealthStatus)
instance
Core.AWSRequest
UpdateInstanceCustomHealthStatus
where
type
AWSResponse UpdateInstanceCustomHealthStatus =
UpdateInstanceCustomHealthStatusResponse
request :: UpdateInstanceCustomHealthStatus
-> Request UpdateInstanceCustomHealthStatus
request = Service
-> UpdateInstanceCustomHealthStatus
-> Request UpdateInstanceCustomHealthStatus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateInstanceCustomHealthStatus
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateInstanceCustomHealthStatus)))
response =
AWSResponse UpdateInstanceCustomHealthStatus
-> Logger
-> Service
-> Proxy UpdateInstanceCustomHealthStatus
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateInstanceCustomHealthStatus)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UpdateInstanceCustomHealthStatus
UpdateInstanceCustomHealthStatusResponse
UpdateInstanceCustomHealthStatusResponse'
instance
Prelude.Hashable
UpdateInstanceCustomHealthStatus
instance
Prelude.NFData
UpdateInstanceCustomHealthStatus
instance
Core.ToHeaders
UpdateInstanceCustomHealthStatus
where
toHeaders :: UpdateInstanceCustomHealthStatus -> [Header]
toHeaders =
[Header] -> UpdateInstanceCustomHealthStatus -> [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
"Route53AutoNaming_v20170314.UpdateInstanceCustomHealthStatus" ::
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 UpdateInstanceCustomHealthStatus where
toJSON :: UpdateInstanceCustomHealthStatus -> Value
toJSON UpdateInstanceCustomHealthStatus' {Text
CustomHealthStatus
status :: CustomHealthStatus
instanceId :: Text
serviceId :: Text
$sel:status:UpdateInstanceCustomHealthStatus' :: UpdateInstanceCustomHealthStatus -> CustomHealthStatus
$sel:instanceId:UpdateInstanceCustomHealthStatus' :: UpdateInstanceCustomHealthStatus -> Text
$sel:serviceId:UpdateInstanceCustomHealthStatus' :: UpdateInstanceCustomHealthStatus -> 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
"ServiceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"InstanceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Status" Text -> CustomHealthStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CustomHealthStatus
status)
]
)
instance Core.ToPath UpdateInstanceCustomHealthStatus where
toPath :: UpdateInstanceCustomHealthStatus -> ByteString
toPath = ByteString -> UpdateInstanceCustomHealthStatus -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
UpdateInstanceCustomHealthStatus
where
toQuery :: UpdateInstanceCustomHealthStatus -> QueryString
toQuery = QueryString -> UpdateInstanceCustomHealthStatus -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateInstanceCustomHealthStatusResponse = UpdateInstanceCustomHealthStatusResponse'
{
}
deriving (UpdateInstanceCustomHealthStatusResponse
-> UpdateInstanceCustomHealthStatusResponse -> Bool
(UpdateInstanceCustomHealthStatusResponse
-> UpdateInstanceCustomHealthStatusResponse -> Bool)
-> (UpdateInstanceCustomHealthStatusResponse
-> UpdateInstanceCustomHealthStatusResponse -> Bool)
-> Eq UpdateInstanceCustomHealthStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInstanceCustomHealthStatusResponse
-> UpdateInstanceCustomHealthStatusResponse -> Bool
$c/= :: UpdateInstanceCustomHealthStatusResponse
-> UpdateInstanceCustomHealthStatusResponse -> Bool
== :: UpdateInstanceCustomHealthStatusResponse
-> UpdateInstanceCustomHealthStatusResponse -> Bool
$c== :: UpdateInstanceCustomHealthStatusResponse
-> UpdateInstanceCustomHealthStatusResponse -> Bool
Prelude.Eq, ReadPrec [UpdateInstanceCustomHealthStatusResponse]
ReadPrec UpdateInstanceCustomHealthStatusResponse
Int -> ReadS UpdateInstanceCustomHealthStatusResponse
ReadS [UpdateInstanceCustomHealthStatusResponse]
(Int -> ReadS UpdateInstanceCustomHealthStatusResponse)
-> ReadS [UpdateInstanceCustomHealthStatusResponse]
-> ReadPrec UpdateInstanceCustomHealthStatusResponse
-> ReadPrec [UpdateInstanceCustomHealthStatusResponse]
-> Read UpdateInstanceCustomHealthStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInstanceCustomHealthStatusResponse]
$creadListPrec :: ReadPrec [UpdateInstanceCustomHealthStatusResponse]
readPrec :: ReadPrec UpdateInstanceCustomHealthStatusResponse
$creadPrec :: ReadPrec UpdateInstanceCustomHealthStatusResponse
readList :: ReadS [UpdateInstanceCustomHealthStatusResponse]
$creadList :: ReadS [UpdateInstanceCustomHealthStatusResponse]
readsPrec :: Int -> ReadS UpdateInstanceCustomHealthStatusResponse
$creadsPrec :: Int -> ReadS UpdateInstanceCustomHealthStatusResponse
Prelude.Read, Int -> UpdateInstanceCustomHealthStatusResponse -> ShowS
[UpdateInstanceCustomHealthStatusResponse] -> ShowS
UpdateInstanceCustomHealthStatusResponse -> String
(Int -> UpdateInstanceCustomHealthStatusResponse -> ShowS)
-> (UpdateInstanceCustomHealthStatusResponse -> String)
-> ([UpdateInstanceCustomHealthStatusResponse] -> ShowS)
-> Show UpdateInstanceCustomHealthStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInstanceCustomHealthStatusResponse] -> ShowS
$cshowList :: [UpdateInstanceCustomHealthStatusResponse] -> ShowS
show :: UpdateInstanceCustomHealthStatusResponse -> String
$cshow :: UpdateInstanceCustomHealthStatusResponse -> String
showsPrec :: Int -> UpdateInstanceCustomHealthStatusResponse -> ShowS
$cshowsPrec :: Int -> UpdateInstanceCustomHealthStatusResponse -> ShowS
Prelude.Show, (forall x.
UpdateInstanceCustomHealthStatusResponse
-> Rep UpdateInstanceCustomHealthStatusResponse x)
-> (forall x.
Rep UpdateInstanceCustomHealthStatusResponse x
-> UpdateInstanceCustomHealthStatusResponse)
-> Generic UpdateInstanceCustomHealthStatusResponse
forall x.
Rep UpdateInstanceCustomHealthStatusResponse x
-> UpdateInstanceCustomHealthStatusResponse
forall x.
UpdateInstanceCustomHealthStatusResponse
-> Rep UpdateInstanceCustomHealthStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateInstanceCustomHealthStatusResponse x
-> UpdateInstanceCustomHealthStatusResponse
$cfrom :: forall x.
UpdateInstanceCustomHealthStatusResponse
-> Rep UpdateInstanceCustomHealthStatusResponse x
Prelude.Generic)
newUpdateInstanceCustomHealthStatusResponse ::
UpdateInstanceCustomHealthStatusResponse
newUpdateInstanceCustomHealthStatusResponse :: UpdateInstanceCustomHealthStatusResponse
newUpdateInstanceCustomHealthStatusResponse =
UpdateInstanceCustomHealthStatusResponse
UpdateInstanceCustomHealthStatusResponse'
instance
Prelude.NFData
UpdateInstanceCustomHealthStatusResponse