{-# 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.AutoScaling.SuspendProcesses
(
SuspendProcesses (..),
newSuspendProcesses,
suspendProcesses_scalingProcesses,
suspendProcesses_autoScalingGroupName,
SuspendProcessesResponse (..),
newSuspendProcessesResponse,
)
where
import Amazonka.AutoScaling.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 SuspendProcesses = SuspendProcesses'
{
SuspendProcesses -> Maybe [Text]
scalingProcesses :: Prelude.Maybe [Prelude.Text],
SuspendProcesses -> Text
autoScalingGroupName :: Prelude.Text
}
deriving (SuspendProcesses -> SuspendProcesses -> Bool
(SuspendProcesses -> SuspendProcesses -> Bool)
-> (SuspendProcesses -> SuspendProcesses -> Bool)
-> Eq SuspendProcesses
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuspendProcesses -> SuspendProcesses -> Bool
$c/= :: SuspendProcesses -> SuspendProcesses -> Bool
== :: SuspendProcesses -> SuspendProcesses -> Bool
$c== :: SuspendProcesses -> SuspendProcesses -> Bool
Prelude.Eq, ReadPrec [SuspendProcesses]
ReadPrec SuspendProcesses
Int -> ReadS SuspendProcesses
ReadS [SuspendProcesses]
(Int -> ReadS SuspendProcesses)
-> ReadS [SuspendProcesses]
-> ReadPrec SuspendProcesses
-> ReadPrec [SuspendProcesses]
-> Read SuspendProcesses
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuspendProcesses]
$creadListPrec :: ReadPrec [SuspendProcesses]
readPrec :: ReadPrec SuspendProcesses
$creadPrec :: ReadPrec SuspendProcesses
readList :: ReadS [SuspendProcesses]
$creadList :: ReadS [SuspendProcesses]
readsPrec :: Int -> ReadS SuspendProcesses
$creadsPrec :: Int -> ReadS SuspendProcesses
Prelude.Read, Int -> SuspendProcesses -> ShowS
[SuspendProcesses] -> ShowS
SuspendProcesses -> String
(Int -> SuspendProcesses -> ShowS)
-> (SuspendProcesses -> String)
-> ([SuspendProcesses] -> ShowS)
-> Show SuspendProcesses
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuspendProcesses] -> ShowS
$cshowList :: [SuspendProcesses] -> ShowS
show :: SuspendProcesses -> String
$cshow :: SuspendProcesses -> String
showsPrec :: Int -> SuspendProcesses -> ShowS
$cshowsPrec :: Int -> SuspendProcesses -> ShowS
Prelude.Show, (forall x. SuspendProcesses -> Rep SuspendProcesses x)
-> (forall x. Rep SuspendProcesses x -> SuspendProcesses)
-> Generic SuspendProcesses
forall x. Rep SuspendProcesses x -> SuspendProcesses
forall x. SuspendProcesses -> Rep SuspendProcesses x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SuspendProcesses x -> SuspendProcesses
$cfrom :: forall x. SuspendProcesses -> Rep SuspendProcesses x
Prelude.Generic)
newSuspendProcesses ::
Prelude.Text ->
SuspendProcesses
newSuspendProcesses :: Text -> SuspendProcesses
newSuspendProcesses Text
pAutoScalingGroupName_ =
SuspendProcesses' :: Maybe [Text] -> Text -> SuspendProcesses
SuspendProcesses'
{ $sel:scalingProcesses:SuspendProcesses' :: Maybe [Text]
scalingProcesses =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:autoScalingGroupName:SuspendProcesses' :: Text
autoScalingGroupName = Text
pAutoScalingGroupName_
}
suspendProcesses_scalingProcesses :: Lens.Lens' SuspendProcesses (Prelude.Maybe [Prelude.Text])
suspendProcesses_scalingProcesses :: (Maybe [Text] -> f (Maybe [Text]))
-> SuspendProcesses -> f SuspendProcesses
suspendProcesses_scalingProcesses = (SuspendProcesses -> Maybe [Text])
-> (SuspendProcesses -> Maybe [Text] -> SuspendProcesses)
-> Lens
SuspendProcesses SuspendProcesses (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendProcesses' {Maybe [Text]
scalingProcesses :: Maybe [Text]
$sel:scalingProcesses:SuspendProcesses' :: SuspendProcesses -> Maybe [Text]
scalingProcesses} -> Maybe [Text]
scalingProcesses) (\s :: SuspendProcesses
s@SuspendProcesses' {} Maybe [Text]
a -> SuspendProcesses
s {$sel:scalingProcesses:SuspendProcesses' :: Maybe [Text]
scalingProcesses = Maybe [Text]
a} :: SuspendProcesses) ((Maybe [Text] -> f (Maybe [Text]))
-> SuspendProcesses -> f SuspendProcesses)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> SuspendProcesses
-> f SuspendProcesses
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
suspendProcesses_autoScalingGroupName :: Lens.Lens' SuspendProcesses Prelude.Text
suspendProcesses_autoScalingGroupName :: (Text -> f Text) -> SuspendProcesses -> f SuspendProcesses
suspendProcesses_autoScalingGroupName = (SuspendProcesses -> Text)
-> (SuspendProcesses -> Text -> SuspendProcesses)
-> Lens SuspendProcesses SuspendProcesses Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuspendProcesses' {Text
autoScalingGroupName :: Text
$sel:autoScalingGroupName:SuspendProcesses' :: SuspendProcesses -> Text
autoScalingGroupName} -> Text
autoScalingGroupName) (\s :: SuspendProcesses
s@SuspendProcesses' {} Text
a -> SuspendProcesses
s {$sel:autoScalingGroupName:SuspendProcesses' :: Text
autoScalingGroupName = Text
a} :: SuspendProcesses)
instance Core.AWSRequest SuspendProcesses where
type
AWSResponse SuspendProcesses =
SuspendProcessesResponse
request :: SuspendProcesses -> Request SuspendProcesses
request = Service -> SuspendProcesses -> Request SuspendProcesses
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SuspendProcesses
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SuspendProcesses)))
response =
AWSResponse SuspendProcesses
-> Logger
-> Service
-> Proxy SuspendProcesses
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse SuspendProcesses)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse SuspendProcesses
SuspendProcessesResponse
SuspendProcessesResponse'
instance Prelude.Hashable SuspendProcesses
instance Prelude.NFData SuspendProcesses
instance Core.ToHeaders SuspendProcesses where
toHeaders :: SuspendProcesses -> [Header]
toHeaders = [Header] -> SuspendProcesses -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SuspendProcesses where
toPath :: SuspendProcesses -> ByteString
toPath = ByteString -> SuspendProcesses -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SuspendProcesses where
toQuery :: SuspendProcesses -> QueryString
toQuery SuspendProcesses' {Maybe [Text]
Text
autoScalingGroupName :: Text
scalingProcesses :: Maybe [Text]
$sel:autoScalingGroupName:SuspendProcesses' :: SuspendProcesses -> Text
$sel:scalingProcesses:SuspendProcesses' :: SuspendProcesses -> Maybe [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
"SuspendProcesses" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2011-01-01" :: Prelude.ByteString),
ByteString
"ScalingProcesses"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member"
([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
scalingProcesses
),
ByteString
"AutoScalingGroupName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
autoScalingGroupName
]
data SuspendProcessesResponse = SuspendProcessesResponse'
{
}
deriving (SuspendProcessesResponse -> SuspendProcessesResponse -> Bool
(SuspendProcessesResponse -> SuspendProcessesResponse -> Bool)
-> (SuspendProcessesResponse -> SuspendProcessesResponse -> Bool)
-> Eq SuspendProcessesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuspendProcessesResponse -> SuspendProcessesResponse -> Bool
$c/= :: SuspendProcessesResponse -> SuspendProcessesResponse -> Bool
== :: SuspendProcessesResponse -> SuspendProcessesResponse -> Bool
$c== :: SuspendProcessesResponse -> SuspendProcessesResponse -> Bool
Prelude.Eq, ReadPrec [SuspendProcessesResponse]
ReadPrec SuspendProcessesResponse
Int -> ReadS SuspendProcessesResponse
ReadS [SuspendProcessesResponse]
(Int -> ReadS SuspendProcessesResponse)
-> ReadS [SuspendProcessesResponse]
-> ReadPrec SuspendProcessesResponse
-> ReadPrec [SuspendProcessesResponse]
-> Read SuspendProcessesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuspendProcessesResponse]
$creadListPrec :: ReadPrec [SuspendProcessesResponse]
readPrec :: ReadPrec SuspendProcessesResponse
$creadPrec :: ReadPrec SuspendProcessesResponse
readList :: ReadS [SuspendProcessesResponse]
$creadList :: ReadS [SuspendProcessesResponse]
readsPrec :: Int -> ReadS SuspendProcessesResponse
$creadsPrec :: Int -> ReadS SuspendProcessesResponse
Prelude.Read, Int -> SuspendProcessesResponse -> ShowS
[SuspendProcessesResponse] -> ShowS
SuspendProcessesResponse -> String
(Int -> SuspendProcessesResponse -> ShowS)
-> (SuspendProcessesResponse -> String)
-> ([SuspendProcessesResponse] -> ShowS)
-> Show SuspendProcessesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuspendProcessesResponse] -> ShowS
$cshowList :: [SuspendProcessesResponse] -> ShowS
show :: SuspendProcessesResponse -> String
$cshow :: SuspendProcessesResponse -> String
showsPrec :: Int -> SuspendProcessesResponse -> ShowS
$cshowsPrec :: Int -> SuspendProcessesResponse -> ShowS
Prelude.Show, (forall x.
SuspendProcessesResponse -> Rep SuspendProcessesResponse x)
-> (forall x.
Rep SuspendProcessesResponse x -> SuspendProcessesResponse)
-> Generic SuspendProcessesResponse
forall x.
Rep SuspendProcessesResponse x -> SuspendProcessesResponse
forall x.
SuspendProcessesResponse -> Rep SuspendProcessesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SuspendProcessesResponse x -> SuspendProcessesResponse
$cfrom :: forall x.
SuspendProcessesResponse -> Rep SuspendProcessesResponse x
Prelude.Generic)
newSuspendProcessesResponse ::
SuspendProcessesResponse
newSuspendProcessesResponse :: SuspendProcessesResponse
newSuspendProcessesResponse =
SuspendProcessesResponse
SuspendProcessesResponse'
instance Prelude.NFData SuspendProcessesResponse