{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.SSMIncidents.Waiters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSMIncidents.GetReplicationSet
import Amazonka.SSMIncidents.Lens
import Amazonka.SSMIncidents.Types
newWaitForReplicationSetActive :: Core.Wait GetReplicationSet
newWaitForReplicationSetActive :: Wait GetReplicationSet
newWaitForReplicationSetActive =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName =
ByteString
"WaitForReplicationSetActive",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
5,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
30,
$sel:_waitAcceptors:Wait :: [Acceptor GetReplicationSet]
Core._waitAcceptors =
[ CI Text
-> Accept
-> Fold (AWSResponse GetReplicationSet) (CI Text)
-> Acceptor GetReplicationSet
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"ACTIVE"
Accept
Core.AcceptSuccess
( (ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse
Lens' GetReplicationSetResponse ReplicationSet
getReplicationSetResponse_replicationSet
((ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse)
-> ((CI Text -> f (CI Text)) -> ReplicationSet -> f ReplicationSet)
-> (CI Text -> f (CI Text))
-> GetReplicationSetResponse
-> f GetReplicationSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet
Lens' ReplicationSet ReplicationSetStatus
replicationSet_status
((ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet)
-> ((CI Text -> f (CI Text))
-> ReplicationSetStatus -> f ReplicationSetStatus)
-> (CI Text -> f (CI Text))
-> ReplicationSet
-> f ReplicationSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> ReplicationSetStatus
-> f ReplicationSetStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ReplicationSetStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse GetReplicationSet) (CI Text)
-> Acceptor GetReplicationSet
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"CREATING"
Accept
Core.AcceptRetry
( (ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse
Lens' GetReplicationSetResponse ReplicationSet
getReplicationSetResponse_replicationSet
((ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse)
-> ((CI Text -> f (CI Text)) -> ReplicationSet -> f ReplicationSet)
-> (CI Text -> f (CI Text))
-> GetReplicationSetResponse
-> f GetReplicationSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet
Lens' ReplicationSet ReplicationSetStatus
replicationSet_status
((ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet)
-> ((CI Text -> f (CI Text))
-> ReplicationSetStatus -> f ReplicationSetStatus)
-> (CI Text -> f (CI Text))
-> ReplicationSet
-> f ReplicationSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> ReplicationSetStatus
-> f ReplicationSetStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ReplicationSetStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse GetReplicationSet) (CI Text)
-> Acceptor GetReplicationSet
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"UPDATING"
Accept
Core.AcceptRetry
( (ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse
Lens' GetReplicationSetResponse ReplicationSet
getReplicationSetResponse_replicationSet
((ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse)
-> ((CI Text -> f (CI Text)) -> ReplicationSet -> f ReplicationSet)
-> (CI Text -> f (CI Text))
-> GetReplicationSetResponse
-> f GetReplicationSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet
Lens' ReplicationSet ReplicationSetStatus
replicationSet_status
((ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet)
-> ((CI Text -> f (CI Text))
-> ReplicationSetStatus -> f ReplicationSetStatus)
-> (CI Text -> f (CI Text))
-> ReplicationSet
-> f ReplicationSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> ReplicationSetStatus
-> f ReplicationSetStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ReplicationSetStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse GetReplicationSet) (CI Text)
-> Acceptor GetReplicationSet
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"FAILED"
Accept
Core.AcceptFailure
( (ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse
Lens' GetReplicationSetResponse ReplicationSet
getReplicationSetResponse_replicationSet
((ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse)
-> ((CI Text -> f (CI Text)) -> ReplicationSet -> f ReplicationSet)
-> (CI Text -> f (CI Text))
-> GetReplicationSetResponse
-> f GetReplicationSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet
Lens' ReplicationSet ReplicationSetStatus
replicationSet_status
((ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet)
-> ((CI Text -> f (CI Text))
-> ReplicationSetStatus -> f ReplicationSetStatus)
-> (CI Text -> f (CI Text))
-> ReplicationSet
-> f ReplicationSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> ReplicationSetStatus
-> f ReplicationSetStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ReplicationSetStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}
newWaitForReplicationSetDeleted :: Core.Wait GetReplicationSet
newWaitForReplicationSetDeleted :: Wait GetReplicationSet
newWaitForReplicationSetDeleted =
Wait :: forall a. ByteString -> Int -> Seconds -> [Acceptor a] -> Wait a
Core.Wait
{ $sel:_waitName:Wait :: ByteString
Core._waitName =
ByteString
"WaitForReplicationSetDeleted",
$sel:_waitAttempts:Wait :: Int
Core._waitAttempts = Int
5,
$sel:_waitDelay:Wait :: Seconds
Core._waitDelay = Seconds
30,
$sel:_waitAcceptors:Wait :: [Acceptor GetReplicationSet]
Core._waitAcceptors =
[ ErrorCode -> Accept -> Acceptor GetReplicationSet
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
ErrorCode
"ResourceNotFoundException"
Accept
Core.AcceptSuccess,
CI Text
-> Accept
-> Fold (AWSResponse GetReplicationSet) (CI Text)
-> Acceptor GetReplicationSet
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"DELETING"
Accept
Core.AcceptRetry
( (ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse
Lens' GetReplicationSetResponse ReplicationSet
getReplicationSetResponse_replicationSet
((ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse)
-> ((CI Text -> f (CI Text)) -> ReplicationSet -> f ReplicationSet)
-> (CI Text -> f (CI Text))
-> GetReplicationSetResponse
-> f GetReplicationSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet
Lens' ReplicationSet ReplicationSetStatus
replicationSet_status
((ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet)
-> ((CI Text -> f (CI Text))
-> ReplicationSetStatus -> f ReplicationSetStatus)
-> (CI Text -> f (CI Text))
-> ReplicationSet
-> f ReplicationSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> ReplicationSetStatus
-> f ReplicationSetStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ReplicationSetStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
),
CI Text
-> Accept
-> Fold (AWSResponse GetReplicationSet) (CI Text)
-> Acceptor GetReplicationSet
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"FAILED"
Accept
Core.AcceptFailure
( (ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse
Lens' GetReplicationSetResponse ReplicationSet
getReplicationSetResponse_replicationSet
((ReplicationSet -> f ReplicationSet)
-> GetReplicationSetResponse -> f GetReplicationSetResponse)
-> ((CI Text -> f (CI Text)) -> ReplicationSet -> f ReplicationSet)
-> (CI Text -> f (CI Text))
-> GetReplicationSetResponse
-> f GetReplicationSetResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet
Lens' ReplicationSet ReplicationSetStatus
replicationSet_status
((ReplicationSetStatus -> f ReplicationSetStatus)
-> ReplicationSet -> f ReplicationSet)
-> ((CI Text -> f (CI Text))
-> ReplicationSetStatus -> f ReplicationSetStatus)
-> (CI Text -> f (CI Text))
-> ReplicationSet
-> f ReplicationSet
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ReplicationSetStatus -> CI Text)
-> (CI Text -> f (CI Text))
-> ReplicationSetStatus
-> f ReplicationSetStatus
forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to ReplicationSetStatus -> CI Text
forall a. ToText a => a -> CI Text
Core.toTextCI
)
]
}