{-# 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.UpdateInstance
(
UpdateInstance (..),
newUpdateInstance,
updateInstance_installUpdatesOnBoot,
updateInstance_hostname,
updateInstance_sshKeyName,
updateInstance_agentVersion,
updateInstance_instanceType,
updateInstance_ebsOptimized,
updateInstance_os,
updateInstance_autoScalingType,
updateInstance_layerIds,
updateInstance_architecture,
updateInstance_amiId,
updateInstance_instanceId,
UpdateInstanceResponse (..),
newUpdateInstanceResponse,
)
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 UpdateInstance = UpdateInstance'
{
UpdateInstance -> Maybe Bool
installUpdatesOnBoot :: Prelude.Maybe Prelude.Bool,
UpdateInstance -> Maybe Text
hostname :: Prelude.Maybe Prelude.Text,
UpdateInstance -> Maybe Text
sshKeyName :: Prelude.Maybe Prelude.Text,
UpdateInstance -> Maybe Text
agentVersion :: Prelude.Maybe Prelude.Text,
UpdateInstance -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
UpdateInstance -> Maybe Bool
ebsOptimized :: Prelude.Maybe Prelude.Bool,
UpdateInstance -> Maybe Text
os :: Prelude.Maybe Prelude.Text,
UpdateInstance -> Maybe AutoScalingType
autoScalingType :: Prelude.Maybe AutoScalingType,
UpdateInstance -> Maybe [Text]
layerIds :: Prelude.Maybe [Prelude.Text],
UpdateInstance -> Maybe Architecture
architecture :: Prelude.Maybe Architecture,
UpdateInstance -> Maybe Text
amiId :: Prelude.Maybe Prelude.Text,
UpdateInstance -> Text
instanceId :: Prelude.Text
}
deriving (UpdateInstance -> UpdateInstance -> Bool
(UpdateInstance -> UpdateInstance -> Bool)
-> (UpdateInstance -> UpdateInstance -> Bool) -> Eq UpdateInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInstance -> UpdateInstance -> Bool
$c/= :: UpdateInstance -> UpdateInstance -> Bool
== :: UpdateInstance -> UpdateInstance -> Bool
$c== :: UpdateInstance -> UpdateInstance -> Bool
Prelude.Eq, ReadPrec [UpdateInstance]
ReadPrec UpdateInstance
Int -> ReadS UpdateInstance
ReadS [UpdateInstance]
(Int -> ReadS UpdateInstance)
-> ReadS [UpdateInstance]
-> ReadPrec UpdateInstance
-> ReadPrec [UpdateInstance]
-> Read UpdateInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInstance]
$creadListPrec :: ReadPrec [UpdateInstance]
readPrec :: ReadPrec UpdateInstance
$creadPrec :: ReadPrec UpdateInstance
readList :: ReadS [UpdateInstance]
$creadList :: ReadS [UpdateInstance]
readsPrec :: Int -> ReadS UpdateInstance
$creadsPrec :: Int -> ReadS UpdateInstance
Prelude.Read, Int -> UpdateInstance -> ShowS
[UpdateInstance] -> ShowS
UpdateInstance -> String
(Int -> UpdateInstance -> ShowS)
-> (UpdateInstance -> String)
-> ([UpdateInstance] -> ShowS)
-> Show UpdateInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInstance] -> ShowS
$cshowList :: [UpdateInstance] -> ShowS
show :: UpdateInstance -> String
$cshow :: UpdateInstance -> String
showsPrec :: Int -> UpdateInstance -> ShowS
$cshowsPrec :: Int -> UpdateInstance -> ShowS
Prelude.Show, (forall x. UpdateInstance -> Rep UpdateInstance x)
-> (forall x. Rep UpdateInstance x -> UpdateInstance)
-> Generic UpdateInstance
forall x. Rep UpdateInstance x -> UpdateInstance
forall x. UpdateInstance -> Rep UpdateInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateInstance x -> UpdateInstance
$cfrom :: forall x. UpdateInstance -> Rep UpdateInstance x
Prelude.Generic)
newUpdateInstance ::
Prelude.Text ->
UpdateInstance
newUpdateInstance :: Text -> UpdateInstance
newUpdateInstance Text
pInstanceId_ =
UpdateInstance' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe AutoScalingType
-> Maybe [Text]
-> Maybe Architecture
-> Maybe Text
-> Text
-> UpdateInstance
UpdateInstance'
{ $sel:installUpdatesOnBoot:UpdateInstance' :: Maybe Bool
installUpdatesOnBoot =
Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:hostname:UpdateInstance' :: Maybe Text
hostname = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sshKeyName:UpdateInstance' :: Maybe Text
sshKeyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:agentVersion:UpdateInstance' :: Maybe Text
agentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:UpdateInstance' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ebsOptimized:UpdateInstance' :: Maybe Bool
ebsOptimized = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:os:UpdateInstance' :: Maybe Text
os = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:autoScalingType:UpdateInstance' :: Maybe AutoScalingType
autoScalingType = Maybe AutoScalingType
forall a. Maybe a
Prelude.Nothing,
$sel:layerIds:UpdateInstance' :: Maybe [Text]
layerIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:architecture:UpdateInstance' :: Maybe Architecture
architecture = Maybe Architecture
forall a. Maybe a
Prelude.Nothing,
$sel:amiId:UpdateInstance' :: Maybe Text
amiId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:UpdateInstance' :: Text
instanceId = Text
pInstanceId_
}
updateInstance_installUpdatesOnBoot :: Lens.Lens' UpdateInstance (Prelude.Maybe Prelude.Bool)
updateInstance_installUpdatesOnBoot :: (Maybe Bool -> f (Maybe Bool))
-> UpdateInstance -> f UpdateInstance
updateInstance_installUpdatesOnBoot = (UpdateInstance -> Maybe Bool)
-> (UpdateInstance -> Maybe Bool -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Bool
installUpdatesOnBoot :: Maybe Bool
$sel:installUpdatesOnBoot:UpdateInstance' :: UpdateInstance -> Maybe Bool
installUpdatesOnBoot} -> Maybe Bool
installUpdatesOnBoot) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Bool
a -> UpdateInstance
s {$sel:installUpdatesOnBoot:UpdateInstance' :: Maybe Bool
installUpdatesOnBoot = Maybe Bool
a} :: UpdateInstance)
updateInstance_hostname :: Lens.Lens' UpdateInstance (Prelude.Maybe Prelude.Text)
updateInstance_hostname :: (Maybe Text -> f (Maybe Text))
-> UpdateInstance -> f UpdateInstance
updateInstance_hostname = (UpdateInstance -> Maybe Text)
-> (UpdateInstance -> Maybe Text -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Text
hostname :: Maybe Text
$sel:hostname:UpdateInstance' :: UpdateInstance -> Maybe Text
hostname} -> Maybe Text
hostname) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Text
a -> UpdateInstance
s {$sel:hostname:UpdateInstance' :: Maybe Text
hostname = Maybe Text
a} :: UpdateInstance)
updateInstance_sshKeyName :: Lens.Lens' UpdateInstance (Prelude.Maybe Prelude.Text)
updateInstance_sshKeyName :: (Maybe Text -> f (Maybe Text))
-> UpdateInstance -> f UpdateInstance
updateInstance_sshKeyName = (UpdateInstance -> Maybe Text)
-> (UpdateInstance -> Maybe Text -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Text
sshKeyName :: Maybe Text
$sel:sshKeyName:UpdateInstance' :: UpdateInstance -> Maybe Text
sshKeyName} -> Maybe Text
sshKeyName) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Text
a -> UpdateInstance
s {$sel:sshKeyName:UpdateInstance' :: Maybe Text
sshKeyName = Maybe Text
a} :: UpdateInstance)
updateInstance_agentVersion :: Lens.Lens' UpdateInstance (Prelude.Maybe Prelude.Text)
updateInstance_agentVersion :: (Maybe Text -> f (Maybe Text))
-> UpdateInstance -> f UpdateInstance
updateInstance_agentVersion = (UpdateInstance -> Maybe Text)
-> (UpdateInstance -> Maybe Text -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Text
agentVersion :: Maybe Text
$sel:agentVersion:UpdateInstance' :: UpdateInstance -> Maybe Text
agentVersion} -> Maybe Text
agentVersion) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Text
a -> UpdateInstance
s {$sel:agentVersion:UpdateInstance' :: Maybe Text
agentVersion = Maybe Text
a} :: UpdateInstance)
updateInstance_instanceType :: Lens.Lens' UpdateInstance (Prelude.Maybe Prelude.Text)
updateInstance_instanceType :: (Maybe Text -> f (Maybe Text))
-> UpdateInstance -> f UpdateInstance
updateInstance_instanceType = (UpdateInstance -> Maybe Text)
-> (UpdateInstance -> Maybe Text -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:UpdateInstance' :: UpdateInstance -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Text
a -> UpdateInstance
s {$sel:instanceType:UpdateInstance' :: Maybe Text
instanceType = Maybe Text
a} :: UpdateInstance)
updateInstance_ebsOptimized :: Lens.Lens' UpdateInstance (Prelude.Maybe Prelude.Bool)
updateInstance_ebsOptimized :: (Maybe Bool -> f (Maybe Bool))
-> UpdateInstance -> f UpdateInstance
updateInstance_ebsOptimized = (UpdateInstance -> Maybe Bool)
-> (UpdateInstance -> Maybe Bool -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Bool
ebsOptimized :: Maybe Bool
$sel:ebsOptimized:UpdateInstance' :: UpdateInstance -> Maybe Bool
ebsOptimized} -> Maybe Bool
ebsOptimized) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Bool
a -> UpdateInstance
s {$sel:ebsOptimized:UpdateInstance' :: Maybe Bool
ebsOptimized = Maybe Bool
a} :: UpdateInstance)
updateInstance_os :: Lens.Lens' UpdateInstance (Prelude.Maybe Prelude.Text)
updateInstance_os :: (Maybe Text -> f (Maybe Text))
-> UpdateInstance -> f UpdateInstance
updateInstance_os = (UpdateInstance -> Maybe Text)
-> (UpdateInstance -> Maybe Text -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Text
os :: Maybe Text
$sel:os:UpdateInstance' :: UpdateInstance -> Maybe Text
os} -> Maybe Text
os) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Text
a -> UpdateInstance
s {$sel:os:UpdateInstance' :: Maybe Text
os = Maybe Text
a} :: UpdateInstance)
updateInstance_autoScalingType :: Lens.Lens' UpdateInstance (Prelude.Maybe AutoScalingType)
updateInstance_autoScalingType :: (Maybe AutoScalingType -> f (Maybe AutoScalingType))
-> UpdateInstance -> f UpdateInstance
updateInstance_autoScalingType = (UpdateInstance -> Maybe AutoScalingType)
-> (UpdateInstance -> Maybe AutoScalingType -> UpdateInstance)
-> Lens
UpdateInstance
UpdateInstance
(Maybe AutoScalingType)
(Maybe AutoScalingType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe AutoScalingType
autoScalingType :: Maybe AutoScalingType
$sel:autoScalingType:UpdateInstance' :: UpdateInstance -> Maybe AutoScalingType
autoScalingType} -> Maybe AutoScalingType
autoScalingType) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe AutoScalingType
a -> UpdateInstance
s {$sel:autoScalingType:UpdateInstance' :: Maybe AutoScalingType
autoScalingType = Maybe AutoScalingType
a} :: UpdateInstance)
updateInstance_layerIds :: Lens.Lens' UpdateInstance (Prelude.Maybe [Prelude.Text])
updateInstance_layerIds :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateInstance -> f UpdateInstance
updateInstance_layerIds = (UpdateInstance -> Maybe [Text])
-> (UpdateInstance -> Maybe [Text] -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe [Text]
layerIds :: Maybe [Text]
$sel:layerIds:UpdateInstance' :: UpdateInstance -> Maybe [Text]
layerIds} -> Maybe [Text]
layerIds) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe [Text]
a -> UpdateInstance
s {$sel:layerIds:UpdateInstance' :: Maybe [Text]
layerIds = Maybe [Text]
a} :: UpdateInstance) ((Maybe [Text] -> f (Maybe [Text]))
-> UpdateInstance -> f UpdateInstance)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateInstance
-> f UpdateInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateInstance_architecture :: Lens.Lens' UpdateInstance (Prelude.Maybe Architecture)
updateInstance_architecture :: (Maybe Architecture -> f (Maybe Architecture))
-> UpdateInstance -> f UpdateInstance
updateInstance_architecture = (UpdateInstance -> Maybe Architecture)
-> (UpdateInstance -> Maybe Architecture -> UpdateInstance)
-> Lens
UpdateInstance
UpdateInstance
(Maybe Architecture)
(Maybe Architecture)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Architecture
architecture :: Maybe Architecture
$sel:architecture:UpdateInstance' :: UpdateInstance -> Maybe Architecture
architecture} -> Maybe Architecture
architecture) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Architecture
a -> UpdateInstance
s {$sel:architecture:UpdateInstance' :: Maybe Architecture
architecture = Maybe Architecture
a} :: UpdateInstance)
updateInstance_amiId :: Lens.Lens' UpdateInstance (Prelude.Maybe Prelude.Text)
updateInstance_amiId :: (Maybe Text -> f (Maybe Text))
-> UpdateInstance -> f UpdateInstance
updateInstance_amiId = (UpdateInstance -> Maybe Text)
-> (UpdateInstance -> Maybe Text -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Maybe Text
amiId :: Maybe Text
$sel:amiId:UpdateInstance' :: UpdateInstance -> Maybe Text
amiId} -> Maybe Text
amiId) (\s :: UpdateInstance
s@UpdateInstance' {} Maybe Text
a -> UpdateInstance
s {$sel:amiId:UpdateInstance' :: Maybe Text
amiId = Maybe Text
a} :: UpdateInstance)
updateInstance_instanceId :: Lens.Lens' UpdateInstance Prelude.Text
updateInstance_instanceId :: (Text -> f Text) -> UpdateInstance -> f UpdateInstance
updateInstance_instanceId = (UpdateInstance -> Text)
-> (UpdateInstance -> Text -> UpdateInstance)
-> Lens UpdateInstance UpdateInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstance' {Text
instanceId :: Text
$sel:instanceId:UpdateInstance' :: UpdateInstance -> Text
instanceId} -> Text
instanceId) (\s :: UpdateInstance
s@UpdateInstance' {} Text
a -> UpdateInstance
s {$sel:instanceId:UpdateInstance' :: Text
instanceId = Text
a} :: UpdateInstance)
instance Core.AWSRequest UpdateInstance where
type
AWSResponse UpdateInstance =
UpdateInstanceResponse
request :: UpdateInstance -> Request UpdateInstance
request = Service -> UpdateInstance -> Request UpdateInstance
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateInstance
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateInstance)))
response =
AWSResponse UpdateInstance
-> Logger
-> Service
-> Proxy UpdateInstance
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateInstance)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse UpdateInstance
UpdateInstanceResponse
UpdateInstanceResponse'
instance Prelude.Hashable UpdateInstance
instance Prelude.NFData UpdateInstance
instance Core.ToHeaders UpdateInstance where
toHeaders :: UpdateInstance -> [Header]
toHeaders =
[Header] -> UpdateInstance -> [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.UpdateInstance" ::
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 UpdateInstance where
toJSON :: UpdateInstance -> Value
toJSON UpdateInstance' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe Architecture
Maybe AutoScalingType
Text
instanceId :: Text
amiId :: Maybe Text
architecture :: Maybe Architecture
layerIds :: Maybe [Text]
autoScalingType :: Maybe AutoScalingType
os :: Maybe Text
ebsOptimized :: Maybe Bool
instanceType :: Maybe Text
agentVersion :: Maybe Text
sshKeyName :: Maybe Text
hostname :: Maybe Text
installUpdatesOnBoot :: Maybe Bool
$sel:instanceId:UpdateInstance' :: UpdateInstance -> Text
$sel:amiId:UpdateInstance' :: UpdateInstance -> Maybe Text
$sel:architecture:UpdateInstance' :: UpdateInstance -> Maybe Architecture
$sel:layerIds:UpdateInstance' :: UpdateInstance -> Maybe [Text]
$sel:autoScalingType:UpdateInstance' :: UpdateInstance -> Maybe AutoScalingType
$sel:os:UpdateInstance' :: UpdateInstance -> Maybe Text
$sel:ebsOptimized:UpdateInstance' :: UpdateInstance -> Maybe Bool
$sel:instanceType:UpdateInstance' :: UpdateInstance -> Maybe Text
$sel:agentVersion:UpdateInstance' :: UpdateInstance -> Maybe Text
$sel:sshKeyName:UpdateInstance' :: UpdateInstance -> Maybe Text
$sel:hostname:UpdateInstance' :: UpdateInstance -> Maybe Text
$sel:installUpdatesOnBoot:UpdateInstance' :: UpdateInstance -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"InstallUpdatesOnBoot" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
installUpdatesOnBoot,
(Text
"Hostname" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
hostname,
(Text
"SshKeyName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
sshKeyName,
(Text
"AgentVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
agentVersion,
(Text
"InstanceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
instanceType,
(Text
"EbsOptimized" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
ebsOptimized,
(Text
"Os" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
os,
(Text
"AutoScalingType" Text -> AutoScalingType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AutoScalingType -> Pair) -> Maybe AutoScalingType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoScalingType
autoScalingType,
(Text
"LayerIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
layerIds,
(Text
"Architecture" Text -> Architecture -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Architecture -> Pair) -> Maybe Architecture -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Architecture
architecture,
(Text
"AmiId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
amiId,
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)
]
)
instance Core.ToPath UpdateInstance where
toPath :: UpdateInstance -> ByteString
toPath = ByteString -> UpdateInstance -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateInstance where
toQuery :: UpdateInstance -> QueryString
toQuery = QueryString -> UpdateInstance -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateInstanceResponse = UpdateInstanceResponse'
{
}
deriving (UpdateInstanceResponse -> UpdateInstanceResponse -> Bool
(UpdateInstanceResponse -> UpdateInstanceResponse -> Bool)
-> (UpdateInstanceResponse -> UpdateInstanceResponse -> Bool)
-> Eq UpdateInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInstanceResponse -> UpdateInstanceResponse -> Bool
$c/= :: UpdateInstanceResponse -> UpdateInstanceResponse -> Bool
== :: UpdateInstanceResponse -> UpdateInstanceResponse -> Bool
$c== :: UpdateInstanceResponse -> UpdateInstanceResponse -> Bool
Prelude.Eq, ReadPrec [UpdateInstanceResponse]
ReadPrec UpdateInstanceResponse
Int -> ReadS UpdateInstanceResponse
ReadS [UpdateInstanceResponse]
(Int -> ReadS UpdateInstanceResponse)
-> ReadS [UpdateInstanceResponse]
-> ReadPrec UpdateInstanceResponse
-> ReadPrec [UpdateInstanceResponse]
-> Read UpdateInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInstanceResponse]
$creadListPrec :: ReadPrec [UpdateInstanceResponse]
readPrec :: ReadPrec UpdateInstanceResponse
$creadPrec :: ReadPrec UpdateInstanceResponse
readList :: ReadS [UpdateInstanceResponse]
$creadList :: ReadS [UpdateInstanceResponse]
readsPrec :: Int -> ReadS UpdateInstanceResponse
$creadsPrec :: Int -> ReadS UpdateInstanceResponse
Prelude.Read, Int -> UpdateInstanceResponse -> ShowS
[UpdateInstanceResponse] -> ShowS
UpdateInstanceResponse -> String
(Int -> UpdateInstanceResponse -> ShowS)
-> (UpdateInstanceResponse -> String)
-> ([UpdateInstanceResponse] -> ShowS)
-> Show UpdateInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInstanceResponse] -> ShowS
$cshowList :: [UpdateInstanceResponse] -> ShowS
show :: UpdateInstanceResponse -> String
$cshow :: UpdateInstanceResponse -> String
showsPrec :: Int -> UpdateInstanceResponse -> ShowS
$cshowsPrec :: Int -> UpdateInstanceResponse -> ShowS
Prelude.Show, (forall x. UpdateInstanceResponse -> Rep UpdateInstanceResponse x)
-> (forall x.
Rep UpdateInstanceResponse x -> UpdateInstanceResponse)
-> Generic UpdateInstanceResponse
forall x. Rep UpdateInstanceResponse x -> UpdateInstanceResponse
forall x. UpdateInstanceResponse -> Rep UpdateInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateInstanceResponse x -> UpdateInstanceResponse
$cfrom :: forall x. UpdateInstanceResponse -> Rep UpdateInstanceResponse x
Prelude.Generic)
newUpdateInstanceResponse ::
UpdateInstanceResponse
newUpdateInstanceResponse :: UpdateInstanceResponse
newUpdateInstanceResponse = UpdateInstanceResponse
UpdateInstanceResponse'
instance Prelude.NFData UpdateInstanceResponse