{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Lambda.Waiters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lambda.GetFunction
import Amazonka.Lambda.GetFunctionConfiguration
import Amazonka.Lambda.Lens
import Amazonka.Lambda.Types
import qualified Amazonka.Prelude as Prelude
newFunctionActive :: Core.Wait GetFunctionConfiguration
newFunctionActive :: Wait GetFunctionConfiguration
newFunctionActive =
Core.Wait
{ $sel:name:Wait :: ByteString
Core.name = ByteString
"FunctionActive",
$sel:attempts:Wait :: Int
Core.attempts = Int
60,
$sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
$sel:acceptors:Wait :: [Acceptor GetFunctionConfiguration]
Core.acceptors =
[ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Active"
Accept
Core.AcceptSuccess
( Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Failed"
Accept
Core.AcceptFailure
( Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Pending"
Accept
Core.AcceptRetry
( Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
)
]
}
newFunctionActiveV2 :: Core.Wait GetFunction
newFunctionActiveV2 :: Wait GetFunction
newFunctionActiveV2 =
Core.Wait
{ $sel:name:Wait :: ByteString
Core.name = ByteString
"FunctionActiveV2",
$sel:attempts:Wait :: Int
Core.attempts = Int
300,
$sel:delay:Wait :: Seconds
Core.delay = Seconds
1,
$sel:acceptors:Wait :: [Acceptor GetFunction]
Core.acceptors =
[ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Active"
Accept
Core.AcceptSuccess
( Lens' GetFunctionResponse (Maybe FunctionConfiguration)
getFunctionResponse_configuration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Failed"
Accept
Core.AcceptFailure
( Lens' GetFunctionResponse (Maybe FunctionConfiguration)
getFunctionResponse_configuration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Pending"
Accept
Core.AcceptRetry
( Lens' GetFunctionResponse (Maybe FunctionConfiguration)
getFunctionResponse_configuration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
)
]
}
newFunctionExists :: Core.Wait GetFunction
newFunctionExists :: Wait GetFunction
newFunctionExists =
Core.Wait
{ $sel:name:Wait :: ByteString
Core.name = ByteString
"FunctionExists",
$sel:attempts:Wait :: Int
Core.attempts = Int
20,
$sel:delay:Wait :: Seconds
Core.delay = Seconds
1,
$sel:acceptors:Wait :: [Acceptor GetFunction]
Core.acceptors =
[ forall a. Int -> Accept -> Acceptor a
Core.matchStatus Int
200 Accept
Core.AcceptSuccess,
forall a. ErrorCode -> Accept -> Acceptor a
Core.matchError
ErrorCode
"ResourceNotFoundException"
Accept
Core.AcceptRetry
]
}
newFunctionUpdated :: Core.Wait GetFunctionConfiguration
newFunctionUpdated :: Wait GetFunctionConfiguration
newFunctionUpdated =
Core.Wait
{ $sel:name:Wait :: ByteString
Core.name = ByteString
"FunctionUpdated",
$sel:attempts:Wait :: Int
Core.attempts = Int
60,
$sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
$sel:acceptors:Wait :: [Acceptor GetFunctionConfiguration]
Core.acceptors =
[ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Successful"
Accept
Core.AcceptSuccess
( Lens' FunctionConfiguration (Maybe LastUpdateStatus)
functionConfiguration_lastUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Failed"
Accept
Core.AcceptFailure
( Lens' FunctionConfiguration (Maybe LastUpdateStatus)
functionConfiguration_lastUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"InProgress"
Accept
Core.AcceptRetry
( Lens' FunctionConfiguration (Maybe LastUpdateStatus)
functionConfiguration_lastUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
)
]
}
newFunctionUpdatedV2 :: Core.Wait GetFunction
newFunctionUpdatedV2 :: Wait GetFunction
newFunctionUpdatedV2 =
Core.Wait
{ $sel:name:Wait :: ByteString
Core.name = ByteString
"FunctionUpdatedV2",
$sel:attempts:Wait :: Int
Core.attempts = Int
300,
$sel:delay:Wait :: Seconds
Core.delay = Seconds
1,
$sel:acceptors:Wait :: [Acceptor GetFunction]
Core.acceptors =
[ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Successful"
Accept
Core.AcceptSuccess
( Lens' GetFunctionResponse (Maybe FunctionConfiguration)
getFunctionResponse_configuration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' FunctionConfiguration (Maybe LastUpdateStatus)
functionConfiguration_lastUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Failed"
Accept
Core.AcceptFailure
( Lens' GetFunctionResponse (Maybe FunctionConfiguration)
getFunctionResponse_configuration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' FunctionConfiguration (Maybe LastUpdateStatus)
functionConfiguration_lastUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"InProgress"
Accept
Core.AcceptRetry
( Lens' GetFunctionResponse (Maybe FunctionConfiguration)
getFunctionResponse_configuration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Lens' FunctionConfiguration (Maybe LastUpdateStatus)
functionConfiguration_lastUpdateStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
)
]
}
newPublishedVersionActive :: Core.Wait GetFunctionConfiguration
newPublishedVersionActive :: Wait GetFunctionConfiguration
newPublishedVersionActive =
Core.Wait
{ $sel:name:Wait :: ByteString
Core.name = ByteString
"PublishedVersionActive",
$sel:attempts:Wait :: Int
Core.attempts = Int
312,
$sel:delay:Wait :: Seconds
Core.delay = Seconds
5,
$sel:acceptors:Wait :: [Acceptor GetFunctionConfiguration]
Core.acceptors =
[ forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Active"
Accept
Core.AcceptSuccess
( Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Failed"
Accept
Core.AcceptFailure
( Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
),
forall b a.
Eq b =>
b -> Accept -> Fold (AWSResponse a) b -> Acceptor a
Core.matchAll
CI Text
"Pending"
Accept
Core.AcceptRetry
( Lens' FunctionConfiguration (Maybe State)
functionConfiguration_state
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall a. ToText a => a -> CI Text
Data.toTextCI
)
]
}