{-# 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.SSM.DescribeAssociationExecutions
(
DescribeAssociationExecutions (..),
newDescribeAssociationExecutions,
describeAssociationExecutions_filters,
describeAssociationExecutions_nextToken,
describeAssociationExecutions_maxResults,
describeAssociationExecutions_associationId,
DescribeAssociationExecutionsResponse (..),
newDescribeAssociationExecutionsResponse,
describeAssociationExecutionsResponse_nextToken,
describeAssociationExecutionsResponse_associationExecutions,
describeAssociationExecutionsResponse_httpStatus,
)
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.SSM.Types
data DescribeAssociationExecutions = DescribeAssociationExecutions'
{
DescribeAssociationExecutions
-> Maybe (NonEmpty AssociationExecutionFilter)
filters :: Prelude.Maybe (Prelude.NonEmpty AssociationExecutionFilter),
DescribeAssociationExecutions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAssociationExecutions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
DescribeAssociationExecutions -> Text
associationId :: Prelude.Text
}
deriving (DescribeAssociationExecutions
-> DescribeAssociationExecutions -> Bool
(DescribeAssociationExecutions
-> DescribeAssociationExecutions -> Bool)
-> (DescribeAssociationExecutions
-> DescribeAssociationExecutions -> Bool)
-> Eq DescribeAssociationExecutions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAssociationExecutions
-> DescribeAssociationExecutions -> Bool
$c/= :: DescribeAssociationExecutions
-> DescribeAssociationExecutions -> Bool
== :: DescribeAssociationExecutions
-> DescribeAssociationExecutions -> Bool
$c== :: DescribeAssociationExecutions
-> DescribeAssociationExecutions -> Bool
Prelude.Eq, ReadPrec [DescribeAssociationExecutions]
ReadPrec DescribeAssociationExecutions
Int -> ReadS DescribeAssociationExecutions
ReadS [DescribeAssociationExecutions]
(Int -> ReadS DescribeAssociationExecutions)
-> ReadS [DescribeAssociationExecutions]
-> ReadPrec DescribeAssociationExecutions
-> ReadPrec [DescribeAssociationExecutions]
-> Read DescribeAssociationExecutions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAssociationExecutions]
$creadListPrec :: ReadPrec [DescribeAssociationExecutions]
readPrec :: ReadPrec DescribeAssociationExecutions
$creadPrec :: ReadPrec DescribeAssociationExecutions
readList :: ReadS [DescribeAssociationExecutions]
$creadList :: ReadS [DescribeAssociationExecutions]
readsPrec :: Int -> ReadS DescribeAssociationExecutions
$creadsPrec :: Int -> ReadS DescribeAssociationExecutions
Prelude.Read, Int -> DescribeAssociationExecutions -> ShowS
[DescribeAssociationExecutions] -> ShowS
DescribeAssociationExecutions -> String
(Int -> DescribeAssociationExecutions -> ShowS)
-> (DescribeAssociationExecutions -> String)
-> ([DescribeAssociationExecutions] -> ShowS)
-> Show DescribeAssociationExecutions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAssociationExecutions] -> ShowS
$cshowList :: [DescribeAssociationExecutions] -> ShowS
show :: DescribeAssociationExecutions -> String
$cshow :: DescribeAssociationExecutions -> String
showsPrec :: Int -> DescribeAssociationExecutions -> ShowS
$cshowsPrec :: Int -> DescribeAssociationExecutions -> ShowS
Prelude.Show, (forall x.
DescribeAssociationExecutions
-> Rep DescribeAssociationExecutions x)
-> (forall x.
Rep DescribeAssociationExecutions x
-> DescribeAssociationExecutions)
-> Generic DescribeAssociationExecutions
forall x.
Rep DescribeAssociationExecutions x
-> DescribeAssociationExecutions
forall x.
DescribeAssociationExecutions
-> Rep DescribeAssociationExecutions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAssociationExecutions x
-> DescribeAssociationExecutions
$cfrom :: forall x.
DescribeAssociationExecutions
-> Rep DescribeAssociationExecutions x
Prelude.Generic)
newDescribeAssociationExecutions ::
Prelude.Text ->
DescribeAssociationExecutions
newDescribeAssociationExecutions :: Text -> DescribeAssociationExecutions
newDescribeAssociationExecutions Text
pAssociationId_ =
DescribeAssociationExecutions' :: Maybe (NonEmpty AssociationExecutionFilter)
-> Maybe Text
-> Maybe Natural
-> Text
-> DescribeAssociationExecutions
DescribeAssociationExecutions'
{ $sel:filters:DescribeAssociationExecutions' :: Maybe (NonEmpty AssociationExecutionFilter)
filters =
Maybe (NonEmpty AssociationExecutionFilter)
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeAssociationExecutions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeAssociationExecutions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:associationId:DescribeAssociationExecutions' :: Text
associationId = Text
pAssociationId_
}
describeAssociationExecutions_filters :: Lens.Lens' DescribeAssociationExecutions (Prelude.Maybe (Prelude.NonEmpty AssociationExecutionFilter))
describeAssociationExecutions_filters :: (Maybe (NonEmpty AssociationExecutionFilter)
-> f (Maybe (NonEmpty AssociationExecutionFilter)))
-> DescribeAssociationExecutions -> f DescribeAssociationExecutions
describeAssociationExecutions_filters = (DescribeAssociationExecutions
-> Maybe (NonEmpty AssociationExecutionFilter))
-> (DescribeAssociationExecutions
-> Maybe (NonEmpty AssociationExecutionFilter)
-> DescribeAssociationExecutions)
-> Lens
DescribeAssociationExecutions
DescribeAssociationExecutions
(Maybe (NonEmpty AssociationExecutionFilter))
(Maybe (NonEmpty AssociationExecutionFilter))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssociationExecutions' {Maybe (NonEmpty AssociationExecutionFilter)
filters :: Maybe (NonEmpty AssociationExecutionFilter)
$sel:filters:DescribeAssociationExecutions' :: DescribeAssociationExecutions
-> Maybe (NonEmpty AssociationExecutionFilter)
filters} -> Maybe (NonEmpty AssociationExecutionFilter)
filters) (\s :: DescribeAssociationExecutions
s@DescribeAssociationExecutions' {} Maybe (NonEmpty AssociationExecutionFilter)
a -> DescribeAssociationExecutions
s {$sel:filters:DescribeAssociationExecutions' :: Maybe (NonEmpty AssociationExecutionFilter)
filters = Maybe (NonEmpty AssociationExecutionFilter)
a} :: DescribeAssociationExecutions) ((Maybe (NonEmpty AssociationExecutionFilter)
-> f (Maybe (NonEmpty AssociationExecutionFilter)))
-> DescribeAssociationExecutions
-> f DescribeAssociationExecutions)
-> ((Maybe (NonEmpty AssociationExecutionFilter)
-> f (Maybe (NonEmpty AssociationExecutionFilter)))
-> Maybe (NonEmpty AssociationExecutionFilter)
-> f (Maybe (NonEmpty AssociationExecutionFilter)))
-> (Maybe (NonEmpty AssociationExecutionFilter)
-> f (Maybe (NonEmpty AssociationExecutionFilter)))
-> DescribeAssociationExecutions
-> f DescribeAssociationExecutions
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty AssociationExecutionFilter)
(NonEmpty AssociationExecutionFilter)
(NonEmpty AssociationExecutionFilter)
(NonEmpty AssociationExecutionFilter)
-> Iso
(Maybe (NonEmpty AssociationExecutionFilter))
(Maybe (NonEmpty AssociationExecutionFilter))
(Maybe (NonEmpty AssociationExecutionFilter))
(Maybe (NonEmpty AssociationExecutionFilter))
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
(NonEmpty AssociationExecutionFilter)
(NonEmpty AssociationExecutionFilter)
(NonEmpty AssociationExecutionFilter)
(NonEmpty AssociationExecutionFilter)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAssociationExecutions_nextToken :: Lens.Lens' DescribeAssociationExecutions (Prelude.Maybe Prelude.Text)
describeAssociationExecutions_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAssociationExecutions -> f DescribeAssociationExecutions
describeAssociationExecutions_nextToken = (DescribeAssociationExecutions -> Maybe Text)
-> (DescribeAssociationExecutions
-> Maybe Text -> DescribeAssociationExecutions)
-> Lens
DescribeAssociationExecutions
DescribeAssociationExecutions
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssociationExecutions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAssociationExecutions' :: DescribeAssociationExecutions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAssociationExecutions
s@DescribeAssociationExecutions' {} Maybe Text
a -> DescribeAssociationExecutions
s {$sel:nextToken:DescribeAssociationExecutions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAssociationExecutions)
describeAssociationExecutions_maxResults :: Lens.Lens' DescribeAssociationExecutions (Prelude.Maybe Prelude.Natural)
describeAssociationExecutions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeAssociationExecutions -> f DescribeAssociationExecutions
describeAssociationExecutions_maxResults = (DescribeAssociationExecutions -> Maybe Natural)
-> (DescribeAssociationExecutions
-> Maybe Natural -> DescribeAssociationExecutions)
-> Lens
DescribeAssociationExecutions
DescribeAssociationExecutions
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssociationExecutions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeAssociationExecutions' :: DescribeAssociationExecutions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeAssociationExecutions
s@DescribeAssociationExecutions' {} Maybe Natural
a -> DescribeAssociationExecutions
s {$sel:maxResults:DescribeAssociationExecutions' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeAssociationExecutions)
describeAssociationExecutions_associationId :: Lens.Lens' DescribeAssociationExecutions Prelude.Text
describeAssociationExecutions_associationId :: (Text -> f Text)
-> DescribeAssociationExecutions -> f DescribeAssociationExecutions
describeAssociationExecutions_associationId = (DescribeAssociationExecutions -> Text)
-> (DescribeAssociationExecutions
-> Text -> DescribeAssociationExecutions)
-> Lens
DescribeAssociationExecutions
DescribeAssociationExecutions
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssociationExecutions' {Text
associationId :: Text
$sel:associationId:DescribeAssociationExecutions' :: DescribeAssociationExecutions -> Text
associationId} -> Text
associationId) (\s :: DescribeAssociationExecutions
s@DescribeAssociationExecutions' {} Text
a -> DescribeAssociationExecutions
s {$sel:associationId:DescribeAssociationExecutions' :: Text
associationId = Text
a} :: DescribeAssociationExecutions)
instance Core.AWSPager DescribeAssociationExecutions where
page :: DescribeAssociationExecutions
-> AWSResponse DescribeAssociationExecutions
-> Maybe DescribeAssociationExecutions
page DescribeAssociationExecutions
rq AWSResponse DescribeAssociationExecutions
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeAssociationExecutions
DescribeAssociationExecutionsResponse
rs
DescribeAssociationExecutionsResponse
-> Getting (First Text) DescribeAssociationExecutionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAssociationExecutionsResponse
-> Const (First Text) DescribeAssociationExecutionsResponse
Lens' DescribeAssociationExecutionsResponse (Maybe Text)
describeAssociationExecutionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAssociationExecutionsResponse
-> Const (First Text) DescribeAssociationExecutionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeAssociationExecutionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeAssociationExecutions
forall a. Maybe a
Prelude.Nothing
| Maybe [AssociationExecution] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeAssociationExecutions
DescribeAssociationExecutionsResponse
rs
DescribeAssociationExecutionsResponse
-> Getting
(First [AssociationExecution])
DescribeAssociationExecutionsResponse
[AssociationExecution]
-> Maybe [AssociationExecution]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AssociationExecution]
-> Const
(First [AssociationExecution]) (Maybe [AssociationExecution]))
-> DescribeAssociationExecutionsResponse
-> Const
(First [AssociationExecution])
DescribeAssociationExecutionsResponse
Lens'
DescribeAssociationExecutionsResponse
(Maybe [AssociationExecution])
describeAssociationExecutionsResponse_associationExecutions
((Maybe [AssociationExecution]
-> Const
(First [AssociationExecution]) (Maybe [AssociationExecution]))
-> DescribeAssociationExecutionsResponse
-> Const
(First [AssociationExecution])
DescribeAssociationExecutionsResponse)
-> (([AssociationExecution]
-> Const (First [AssociationExecution]) [AssociationExecution])
-> Maybe [AssociationExecution]
-> Const
(First [AssociationExecution]) (Maybe [AssociationExecution]))
-> Getting
(First [AssociationExecution])
DescribeAssociationExecutionsResponse
[AssociationExecution]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AssociationExecution]
-> Const (First [AssociationExecution]) [AssociationExecution])
-> Maybe [AssociationExecution]
-> Const
(First [AssociationExecution]) (Maybe [AssociationExecution])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeAssociationExecutions
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeAssociationExecutions
-> Maybe DescribeAssociationExecutions
forall a. a -> Maybe a
Prelude.Just (DescribeAssociationExecutions
-> Maybe DescribeAssociationExecutions)
-> DescribeAssociationExecutions
-> Maybe DescribeAssociationExecutions
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeAssociationExecutions
rq
DescribeAssociationExecutions
-> (DescribeAssociationExecutions -> DescribeAssociationExecutions)
-> DescribeAssociationExecutions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeAssociationExecutions
-> Identity DescribeAssociationExecutions
Lens
DescribeAssociationExecutions
DescribeAssociationExecutions
(Maybe Text)
(Maybe Text)
describeAssociationExecutions_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeAssociationExecutions
-> Identity DescribeAssociationExecutions)
-> Maybe Text
-> DescribeAssociationExecutions
-> DescribeAssociationExecutions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeAssociationExecutions
DescribeAssociationExecutionsResponse
rs
DescribeAssociationExecutionsResponse
-> Getting (First Text) DescribeAssociationExecutionsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAssociationExecutionsResponse
-> Const (First Text) DescribeAssociationExecutionsResponse
Lens' DescribeAssociationExecutionsResponse (Maybe Text)
describeAssociationExecutionsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeAssociationExecutionsResponse
-> Const (First Text) DescribeAssociationExecutionsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeAssociationExecutionsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance
Core.AWSRequest
DescribeAssociationExecutions
where
type
AWSResponse DescribeAssociationExecutions =
DescribeAssociationExecutionsResponse
request :: DescribeAssociationExecutions
-> Request DescribeAssociationExecutions
request = Service
-> DescribeAssociationExecutions
-> Request DescribeAssociationExecutions
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAssociationExecutions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAssociationExecutions)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeAssociationExecutions))
-> Logger
-> Service
-> Proxy DescribeAssociationExecutions
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAssociationExecutions)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe [AssociationExecution]
-> Int
-> DescribeAssociationExecutionsResponse
DescribeAssociationExecutionsResponse'
(Maybe Text
-> Maybe [AssociationExecution]
-> Int
-> DescribeAssociationExecutionsResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe [AssociationExecution]
-> Int -> DescribeAssociationExecutionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either
String
(Maybe [AssociationExecution]
-> Int -> DescribeAssociationExecutionsResponse)
-> Either String (Maybe [AssociationExecution])
-> Either String (Int -> DescribeAssociationExecutionsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [AssociationExecution]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AssociationExecutions"
Either String (Maybe (Maybe [AssociationExecution]))
-> Maybe [AssociationExecution]
-> Either String (Maybe [AssociationExecution])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AssociationExecution]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> DescribeAssociationExecutionsResponse)
-> Either String Int
-> Either String DescribeAssociationExecutionsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DescribeAssociationExecutions
instance Prelude.NFData DescribeAssociationExecutions
instance Core.ToHeaders DescribeAssociationExecutions where
toHeaders :: DescribeAssociationExecutions -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeAssociationExecutions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonSSM.DescribeAssociationExecutions" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DescribeAssociationExecutions where
toJSON :: DescribeAssociationExecutions -> Value
toJSON DescribeAssociationExecutions' {Maybe Natural
Maybe (NonEmpty AssociationExecutionFilter)
Maybe Text
Text
associationId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe (NonEmpty AssociationExecutionFilter)
$sel:associationId:DescribeAssociationExecutions' :: DescribeAssociationExecutions -> Text
$sel:maxResults:DescribeAssociationExecutions' :: DescribeAssociationExecutions -> Maybe Natural
$sel:nextToken:DescribeAssociationExecutions' :: DescribeAssociationExecutions -> Maybe Text
$sel:filters:DescribeAssociationExecutions' :: DescribeAssociationExecutions
-> Maybe (NonEmpty AssociationExecutionFilter)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Filters" Text -> NonEmpty AssociationExecutionFilter -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty AssociationExecutionFilter -> Pair)
-> Maybe (NonEmpty AssociationExecutionFilter) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty AssociationExecutionFilter)
filters,
(Text
"NextToken" 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
nextToken,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AssociationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
associationId)
]
)
instance Core.ToPath DescribeAssociationExecutions where
toPath :: DescribeAssociationExecutions -> ByteString
toPath = ByteString -> DescribeAssociationExecutions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeAssociationExecutions where
toQuery :: DescribeAssociationExecutions -> QueryString
toQuery = QueryString -> DescribeAssociationExecutions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeAssociationExecutionsResponse = DescribeAssociationExecutionsResponse'
{
DescribeAssociationExecutionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAssociationExecutionsResponse
-> Maybe [AssociationExecution]
associationExecutions :: Prelude.Maybe [AssociationExecution],
DescribeAssociationExecutionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAssociationExecutionsResponse
-> DescribeAssociationExecutionsResponse -> Bool
(DescribeAssociationExecutionsResponse
-> DescribeAssociationExecutionsResponse -> Bool)
-> (DescribeAssociationExecutionsResponse
-> DescribeAssociationExecutionsResponse -> Bool)
-> Eq DescribeAssociationExecutionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAssociationExecutionsResponse
-> DescribeAssociationExecutionsResponse -> Bool
$c/= :: DescribeAssociationExecutionsResponse
-> DescribeAssociationExecutionsResponse -> Bool
== :: DescribeAssociationExecutionsResponse
-> DescribeAssociationExecutionsResponse -> Bool
$c== :: DescribeAssociationExecutionsResponse
-> DescribeAssociationExecutionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAssociationExecutionsResponse]
ReadPrec DescribeAssociationExecutionsResponse
Int -> ReadS DescribeAssociationExecutionsResponse
ReadS [DescribeAssociationExecutionsResponse]
(Int -> ReadS DescribeAssociationExecutionsResponse)
-> ReadS [DescribeAssociationExecutionsResponse]
-> ReadPrec DescribeAssociationExecutionsResponse
-> ReadPrec [DescribeAssociationExecutionsResponse]
-> Read DescribeAssociationExecutionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAssociationExecutionsResponse]
$creadListPrec :: ReadPrec [DescribeAssociationExecutionsResponse]
readPrec :: ReadPrec DescribeAssociationExecutionsResponse
$creadPrec :: ReadPrec DescribeAssociationExecutionsResponse
readList :: ReadS [DescribeAssociationExecutionsResponse]
$creadList :: ReadS [DescribeAssociationExecutionsResponse]
readsPrec :: Int -> ReadS DescribeAssociationExecutionsResponse
$creadsPrec :: Int -> ReadS DescribeAssociationExecutionsResponse
Prelude.Read, Int -> DescribeAssociationExecutionsResponse -> ShowS
[DescribeAssociationExecutionsResponse] -> ShowS
DescribeAssociationExecutionsResponse -> String
(Int -> DescribeAssociationExecutionsResponse -> ShowS)
-> (DescribeAssociationExecutionsResponse -> String)
-> ([DescribeAssociationExecutionsResponse] -> ShowS)
-> Show DescribeAssociationExecutionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAssociationExecutionsResponse] -> ShowS
$cshowList :: [DescribeAssociationExecutionsResponse] -> ShowS
show :: DescribeAssociationExecutionsResponse -> String
$cshow :: DescribeAssociationExecutionsResponse -> String
showsPrec :: Int -> DescribeAssociationExecutionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeAssociationExecutionsResponse -> ShowS
Prelude.Show, (forall x.
DescribeAssociationExecutionsResponse
-> Rep DescribeAssociationExecutionsResponse x)
-> (forall x.
Rep DescribeAssociationExecutionsResponse x
-> DescribeAssociationExecutionsResponse)
-> Generic DescribeAssociationExecutionsResponse
forall x.
Rep DescribeAssociationExecutionsResponse x
-> DescribeAssociationExecutionsResponse
forall x.
DescribeAssociationExecutionsResponse
-> Rep DescribeAssociationExecutionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAssociationExecutionsResponse x
-> DescribeAssociationExecutionsResponse
$cfrom :: forall x.
DescribeAssociationExecutionsResponse
-> Rep DescribeAssociationExecutionsResponse x
Prelude.Generic)
newDescribeAssociationExecutionsResponse ::
Prelude.Int ->
DescribeAssociationExecutionsResponse
newDescribeAssociationExecutionsResponse :: Int -> DescribeAssociationExecutionsResponse
newDescribeAssociationExecutionsResponse Int
pHttpStatus_ =
DescribeAssociationExecutionsResponse' :: Maybe Text
-> Maybe [AssociationExecution]
-> Int
-> DescribeAssociationExecutionsResponse
DescribeAssociationExecutionsResponse'
{ $sel:nextToken:DescribeAssociationExecutionsResponse' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:associationExecutions:DescribeAssociationExecutionsResponse' :: Maybe [AssociationExecution]
associationExecutions =
Maybe [AssociationExecution]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAssociationExecutionsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAssociationExecutionsResponse_nextToken :: Lens.Lens' DescribeAssociationExecutionsResponse (Prelude.Maybe Prelude.Text)
describeAssociationExecutionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAssociationExecutionsResponse
-> f DescribeAssociationExecutionsResponse
describeAssociationExecutionsResponse_nextToken = (DescribeAssociationExecutionsResponse -> Maybe Text)
-> (DescribeAssociationExecutionsResponse
-> Maybe Text -> DescribeAssociationExecutionsResponse)
-> Lens' DescribeAssociationExecutionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssociationExecutionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAssociationExecutionsResponse' :: DescribeAssociationExecutionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAssociationExecutionsResponse
s@DescribeAssociationExecutionsResponse' {} Maybe Text
a -> DescribeAssociationExecutionsResponse
s {$sel:nextToken:DescribeAssociationExecutionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAssociationExecutionsResponse)
describeAssociationExecutionsResponse_associationExecutions :: Lens.Lens' DescribeAssociationExecutionsResponse (Prelude.Maybe [AssociationExecution])
describeAssociationExecutionsResponse_associationExecutions :: (Maybe [AssociationExecution] -> f (Maybe [AssociationExecution]))
-> DescribeAssociationExecutionsResponse
-> f DescribeAssociationExecutionsResponse
describeAssociationExecutionsResponse_associationExecutions = (DescribeAssociationExecutionsResponse
-> Maybe [AssociationExecution])
-> (DescribeAssociationExecutionsResponse
-> Maybe [AssociationExecution]
-> DescribeAssociationExecutionsResponse)
-> Lens'
DescribeAssociationExecutionsResponse
(Maybe [AssociationExecution])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssociationExecutionsResponse' {Maybe [AssociationExecution]
associationExecutions :: Maybe [AssociationExecution]
$sel:associationExecutions:DescribeAssociationExecutionsResponse' :: DescribeAssociationExecutionsResponse
-> Maybe [AssociationExecution]
associationExecutions} -> Maybe [AssociationExecution]
associationExecutions) (\s :: DescribeAssociationExecutionsResponse
s@DescribeAssociationExecutionsResponse' {} Maybe [AssociationExecution]
a -> DescribeAssociationExecutionsResponse
s {$sel:associationExecutions:DescribeAssociationExecutionsResponse' :: Maybe [AssociationExecution]
associationExecutions = Maybe [AssociationExecution]
a} :: DescribeAssociationExecutionsResponse) ((Maybe [AssociationExecution] -> f (Maybe [AssociationExecution]))
-> DescribeAssociationExecutionsResponse
-> f DescribeAssociationExecutionsResponse)
-> ((Maybe [AssociationExecution]
-> f (Maybe [AssociationExecution]))
-> Maybe [AssociationExecution]
-> f (Maybe [AssociationExecution]))
-> (Maybe [AssociationExecution]
-> f (Maybe [AssociationExecution]))
-> DescribeAssociationExecutionsResponse
-> f DescribeAssociationExecutionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AssociationExecution]
[AssociationExecution]
[AssociationExecution]
[AssociationExecution]
-> Iso
(Maybe [AssociationExecution])
(Maybe [AssociationExecution])
(Maybe [AssociationExecution])
(Maybe [AssociationExecution])
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
[AssociationExecution]
[AssociationExecution]
[AssociationExecution]
[AssociationExecution]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeAssociationExecutionsResponse_httpStatus :: Lens.Lens' DescribeAssociationExecutionsResponse Prelude.Int
describeAssociationExecutionsResponse_httpStatus :: (Int -> f Int)
-> DescribeAssociationExecutionsResponse
-> f DescribeAssociationExecutionsResponse
describeAssociationExecutionsResponse_httpStatus = (DescribeAssociationExecutionsResponse -> Int)
-> (DescribeAssociationExecutionsResponse
-> Int -> DescribeAssociationExecutionsResponse)
-> Lens
DescribeAssociationExecutionsResponse
DescribeAssociationExecutionsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssociationExecutionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAssociationExecutionsResponse' :: DescribeAssociationExecutionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAssociationExecutionsResponse
s@DescribeAssociationExecutionsResponse' {} Int
a -> DescribeAssociationExecutionsResponse
s {$sel:httpStatus:DescribeAssociationExecutionsResponse' :: Int
httpStatus = Int
a} :: DescribeAssociationExecutionsResponse)
instance
Prelude.NFData
DescribeAssociationExecutionsResponse