{-# 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.Config.GetComplianceDetailsByConfigRule
(
GetComplianceDetailsByConfigRule (..),
newGetComplianceDetailsByConfigRule,
getComplianceDetailsByConfigRule_complianceTypes,
getComplianceDetailsByConfigRule_nextToken,
getComplianceDetailsByConfigRule_limit,
getComplianceDetailsByConfigRule_configRuleName,
GetComplianceDetailsByConfigRuleResponse (..),
newGetComplianceDetailsByConfigRuleResponse,
getComplianceDetailsByConfigRuleResponse_evaluationResults,
getComplianceDetailsByConfigRuleResponse_nextToken,
getComplianceDetailsByConfigRuleResponse_httpStatus,
)
where
import Amazonka.Config.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 GetComplianceDetailsByConfigRule = GetComplianceDetailsByConfigRule'
{
GetComplianceDetailsByConfigRule -> Maybe [ComplianceType]
complianceTypes :: Prelude.Maybe [ComplianceType],
GetComplianceDetailsByConfigRule -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetComplianceDetailsByConfigRule -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
GetComplianceDetailsByConfigRule -> Text
configRuleName :: Prelude.Text
}
deriving (GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule -> Bool
(GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule -> Bool)
-> (GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule -> Bool)
-> Eq GetComplianceDetailsByConfigRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule -> Bool
$c/= :: GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule -> Bool
== :: GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule -> Bool
$c== :: GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule -> Bool
Prelude.Eq, ReadPrec [GetComplianceDetailsByConfigRule]
ReadPrec GetComplianceDetailsByConfigRule
Int -> ReadS GetComplianceDetailsByConfigRule
ReadS [GetComplianceDetailsByConfigRule]
(Int -> ReadS GetComplianceDetailsByConfigRule)
-> ReadS [GetComplianceDetailsByConfigRule]
-> ReadPrec GetComplianceDetailsByConfigRule
-> ReadPrec [GetComplianceDetailsByConfigRule]
-> Read GetComplianceDetailsByConfigRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetComplianceDetailsByConfigRule]
$creadListPrec :: ReadPrec [GetComplianceDetailsByConfigRule]
readPrec :: ReadPrec GetComplianceDetailsByConfigRule
$creadPrec :: ReadPrec GetComplianceDetailsByConfigRule
readList :: ReadS [GetComplianceDetailsByConfigRule]
$creadList :: ReadS [GetComplianceDetailsByConfigRule]
readsPrec :: Int -> ReadS GetComplianceDetailsByConfigRule
$creadsPrec :: Int -> ReadS GetComplianceDetailsByConfigRule
Prelude.Read, Int -> GetComplianceDetailsByConfigRule -> ShowS
[GetComplianceDetailsByConfigRule] -> ShowS
GetComplianceDetailsByConfigRule -> String
(Int -> GetComplianceDetailsByConfigRule -> ShowS)
-> (GetComplianceDetailsByConfigRule -> String)
-> ([GetComplianceDetailsByConfigRule] -> ShowS)
-> Show GetComplianceDetailsByConfigRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetComplianceDetailsByConfigRule] -> ShowS
$cshowList :: [GetComplianceDetailsByConfigRule] -> ShowS
show :: GetComplianceDetailsByConfigRule -> String
$cshow :: GetComplianceDetailsByConfigRule -> String
showsPrec :: Int -> GetComplianceDetailsByConfigRule -> ShowS
$cshowsPrec :: Int -> GetComplianceDetailsByConfigRule -> ShowS
Prelude.Show, (forall x.
GetComplianceDetailsByConfigRule
-> Rep GetComplianceDetailsByConfigRule x)
-> (forall x.
Rep GetComplianceDetailsByConfigRule x
-> GetComplianceDetailsByConfigRule)
-> Generic GetComplianceDetailsByConfigRule
forall x.
Rep GetComplianceDetailsByConfigRule x
-> GetComplianceDetailsByConfigRule
forall x.
GetComplianceDetailsByConfigRule
-> Rep GetComplianceDetailsByConfigRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetComplianceDetailsByConfigRule x
-> GetComplianceDetailsByConfigRule
$cfrom :: forall x.
GetComplianceDetailsByConfigRule
-> Rep GetComplianceDetailsByConfigRule x
Prelude.Generic)
newGetComplianceDetailsByConfigRule ::
Prelude.Text ->
GetComplianceDetailsByConfigRule
newGetComplianceDetailsByConfigRule :: Text -> GetComplianceDetailsByConfigRule
newGetComplianceDetailsByConfigRule Text
pConfigRuleName_ =
GetComplianceDetailsByConfigRule' :: Maybe [ComplianceType]
-> Maybe Text
-> Maybe Natural
-> Text
-> GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRule'
{ $sel:complianceTypes:GetComplianceDetailsByConfigRule' :: Maybe [ComplianceType]
complianceTypes =
Maybe [ComplianceType]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetComplianceDetailsByConfigRule' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:limit:GetComplianceDetailsByConfigRule' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:configRuleName:GetComplianceDetailsByConfigRule' :: Text
configRuleName = Text
pConfigRuleName_
}
getComplianceDetailsByConfigRule_complianceTypes :: Lens.Lens' GetComplianceDetailsByConfigRule (Prelude.Maybe [ComplianceType])
getComplianceDetailsByConfigRule_complianceTypes :: (Maybe [ComplianceType] -> f (Maybe [ComplianceType]))
-> GetComplianceDetailsByConfigRule
-> f GetComplianceDetailsByConfigRule
getComplianceDetailsByConfigRule_complianceTypes = (GetComplianceDetailsByConfigRule -> Maybe [ComplianceType])
-> (GetComplianceDetailsByConfigRule
-> Maybe [ComplianceType] -> GetComplianceDetailsByConfigRule)
-> Lens
GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRule
(Maybe [ComplianceType])
(Maybe [ComplianceType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceDetailsByConfigRule' {Maybe [ComplianceType]
complianceTypes :: Maybe [ComplianceType]
$sel:complianceTypes:GetComplianceDetailsByConfigRule' :: GetComplianceDetailsByConfigRule -> Maybe [ComplianceType]
complianceTypes} -> Maybe [ComplianceType]
complianceTypes) (\s :: GetComplianceDetailsByConfigRule
s@GetComplianceDetailsByConfigRule' {} Maybe [ComplianceType]
a -> GetComplianceDetailsByConfigRule
s {$sel:complianceTypes:GetComplianceDetailsByConfigRule' :: Maybe [ComplianceType]
complianceTypes = Maybe [ComplianceType]
a} :: GetComplianceDetailsByConfigRule) ((Maybe [ComplianceType] -> f (Maybe [ComplianceType]))
-> GetComplianceDetailsByConfigRule
-> f GetComplianceDetailsByConfigRule)
-> ((Maybe [ComplianceType] -> f (Maybe [ComplianceType]))
-> Maybe [ComplianceType] -> f (Maybe [ComplianceType]))
-> (Maybe [ComplianceType] -> f (Maybe [ComplianceType]))
-> GetComplianceDetailsByConfigRule
-> f GetComplianceDetailsByConfigRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ComplianceType] [ComplianceType] [ComplianceType] [ComplianceType]
-> Iso
(Maybe [ComplianceType])
(Maybe [ComplianceType])
(Maybe [ComplianceType])
(Maybe [ComplianceType])
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
[ComplianceType] [ComplianceType] [ComplianceType] [ComplianceType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getComplianceDetailsByConfigRule_nextToken :: Lens.Lens' GetComplianceDetailsByConfigRule (Prelude.Maybe Prelude.Text)
getComplianceDetailsByConfigRule_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetComplianceDetailsByConfigRule
-> f GetComplianceDetailsByConfigRule
getComplianceDetailsByConfigRule_nextToken = (GetComplianceDetailsByConfigRule -> Maybe Text)
-> (GetComplianceDetailsByConfigRule
-> Maybe Text -> GetComplianceDetailsByConfigRule)
-> Lens
GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceDetailsByConfigRule' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetComplianceDetailsByConfigRule' :: GetComplianceDetailsByConfigRule -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetComplianceDetailsByConfigRule
s@GetComplianceDetailsByConfigRule' {} Maybe Text
a -> GetComplianceDetailsByConfigRule
s {$sel:nextToken:GetComplianceDetailsByConfigRule' :: Maybe Text
nextToken = Maybe Text
a} :: GetComplianceDetailsByConfigRule)
getComplianceDetailsByConfigRule_limit :: Lens.Lens' GetComplianceDetailsByConfigRule (Prelude.Maybe Prelude.Natural)
getComplianceDetailsByConfigRule_limit :: (Maybe Natural -> f (Maybe Natural))
-> GetComplianceDetailsByConfigRule
-> f GetComplianceDetailsByConfigRule
getComplianceDetailsByConfigRule_limit = (GetComplianceDetailsByConfigRule -> Maybe Natural)
-> (GetComplianceDetailsByConfigRule
-> Maybe Natural -> GetComplianceDetailsByConfigRule)
-> Lens
GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRule
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceDetailsByConfigRule' {Maybe Natural
limit :: Maybe Natural
$sel:limit:GetComplianceDetailsByConfigRule' :: GetComplianceDetailsByConfigRule -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: GetComplianceDetailsByConfigRule
s@GetComplianceDetailsByConfigRule' {} Maybe Natural
a -> GetComplianceDetailsByConfigRule
s {$sel:limit:GetComplianceDetailsByConfigRule' :: Maybe Natural
limit = Maybe Natural
a} :: GetComplianceDetailsByConfigRule)
getComplianceDetailsByConfigRule_configRuleName :: Lens.Lens' GetComplianceDetailsByConfigRule Prelude.Text
getComplianceDetailsByConfigRule_configRuleName :: (Text -> f Text)
-> GetComplianceDetailsByConfigRule
-> f GetComplianceDetailsByConfigRule
getComplianceDetailsByConfigRule_configRuleName = (GetComplianceDetailsByConfigRule -> Text)
-> (GetComplianceDetailsByConfigRule
-> Text -> GetComplianceDetailsByConfigRule)
-> Lens
GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRule
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceDetailsByConfigRule' {Text
configRuleName :: Text
$sel:configRuleName:GetComplianceDetailsByConfigRule' :: GetComplianceDetailsByConfigRule -> Text
configRuleName} -> Text
configRuleName) (\s :: GetComplianceDetailsByConfigRule
s@GetComplianceDetailsByConfigRule' {} Text
a -> GetComplianceDetailsByConfigRule
s {$sel:configRuleName:GetComplianceDetailsByConfigRule' :: Text
configRuleName = Text
a} :: GetComplianceDetailsByConfigRule)
instance
Core.AWSPager
GetComplianceDetailsByConfigRule
where
page :: GetComplianceDetailsByConfigRule
-> AWSResponse GetComplianceDetailsByConfigRule
-> Maybe GetComplianceDetailsByConfigRule
page GetComplianceDetailsByConfigRule
rq AWSResponse GetComplianceDetailsByConfigRule
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRuleResponse
rs
GetComplianceDetailsByConfigRuleResponse
-> Getting
(First Text) GetComplianceDetailsByConfigRuleResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetComplianceDetailsByConfigRuleResponse
-> Const (First Text) GetComplianceDetailsByConfigRuleResponse
Lens' GetComplianceDetailsByConfigRuleResponse (Maybe Text)
getComplianceDetailsByConfigRuleResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetComplianceDetailsByConfigRuleResponse
-> Const (First Text) GetComplianceDetailsByConfigRuleResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) GetComplianceDetailsByConfigRuleResponse 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 GetComplianceDetailsByConfigRule
forall a. Maybe a
Prelude.Nothing
| Maybe [EvaluationResult] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRuleResponse
rs
GetComplianceDetailsByConfigRuleResponse
-> Getting
(First [EvaluationResult])
GetComplianceDetailsByConfigRuleResponse
[EvaluationResult]
-> Maybe [EvaluationResult]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [EvaluationResult]
-> Const (First [EvaluationResult]) (Maybe [EvaluationResult]))
-> GetComplianceDetailsByConfigRuleResponse
-> Const
(First [EvaluationResult]) GetComplianceDetailsByConfigRuleResponse
Lens'
GetComplianceDetailsByConfigRuleResponse (Maybe [EvaluationResult])
getComplianceDetailsByConfigRuleResponse_evaluationResults
((Maybe [EvaluationResult]
-> Const (First [EvaluationResult]) (Maybe [EvaluationResult]))
-> GetComplianceDetailsByConfigRuleResponse
-> Const
(First [EvaluationResult])
GetComplianceDetailsByConfigRuleResponse)
-> (([EvaluationResult]
-> Const (First [EvaluationResult]) [EvaluationResult])
-> Maybe [EvaluationResult]
-> Const (First [EvaluationResult]) (Maybe [EvaluationResult]))
-> Getting
(First [EvaluationResult])
GetComplianceDetailsByConfigRuleResponse
[EvaluationResult]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EvaluationResult]
-> Const (First [EvaluationResult]) [EvaluationResult])
-> Maybe [EvaluationResult]
-> Const (First [EvaluationResult]) (Maybe [EvaluationResult])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetComplianceDetailsByConfigRule
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetComplianceDetailsByConfigRule
-> Maybe GetComplianceDetailsByConfigRule
forall a. a -> Maybe a
Prelude.Just (GetComplianceDetailsByConfigRule
-> Maybe GetComplianceDetailsByConfigRule)
-> GetComplianceDetailsByConfigRule
-> Maybe GetComplianceDetailsByConfigRule
forall a b. (a -> b) -> a -> b
Prelude.$
GetComplianceDetailsByConfigRule
rq
GetComplianceDetailsByConfigRule
-> (GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule)
-> GetComplianceDetailsByConfigRule
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetComplianceDetailsByConfigRule
-> Identity GetComplianceDetailsByConfigRule
Lens
GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRule
(Maybe Text)
(Maybe Text)
getComplianceDetailsByConfigRule_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetComplianceDetailsByConfigRule
-> Identity GetComplianceDetailsByConfigRule)
-> Maybe Text
-> GetComplianceDetailsByConfigRule
-> GetComplianceDetailsByConfigRule
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetComplianceDetailsByConfigRule
GetComplianceDetailsByConfigRuleResponse
rs
GetComplianceDetailsByConfigRuleResponse
-> Getting
(First Text) GetComplianceDetailsByConfigRuleResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetComplianceDetailsByConfigRuleResponse
-> Const (First Text) GetComplianceDetailsByConfigRuleResponse
Lens' GetComplianceDetailsByConfigRuleResponse (Maybe Text)
getComplianceDetailsByConfigRuleResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetComplianceDetailsByConfigRuleResponse
-> Const (First Text) GetComplianceDetailsByConfigRuleResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting
(First Text) GetComplianceDetailsByConfigRuleResponse 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
GetComplianceDetailsByConfigRule
where
type
AWSResponse GetComplianceDetailsByConfigRule =
GetComplianceDetailsByConfigRuleResponse
request :: GetComplianceDetailsByConfigRule
-> Request GetComplianceDetailsByConfigRule
request = Service
-> GetComplianceDetailsByConfigRule
-> Request GetComplianceDetailsByConfigRule
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetComplianceDetailsByConfigRule
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetComplianceDetailsByConfigRule)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetComplianceDetailsByConfigRule))
-> Logger
-> Service
-> Proxy GetComplianceDetailsByConfigRule
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetComplianceDetailsByConfigRule)))
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 [EvaluationResult]
-> Maybe Text -> Int -> GetComplianceDetailsByConfigRuleResponse
GetComplianceDetailsByConfigRuleResponse'
(Maybe [EvaluationResult]
-> Maybe Text -> Int -> GetComplianceDetailsByConfigRuleResponse)
-> Either String (Maybe [EvaluationResult])
-> Either
String
(Maybe Text -> Int -> GetComplianceDetailsByConfigRuleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [EvaluationResult]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EvaluationResults"
Either String (Maybe (Maybe [EvaluationResult]))
-> Maybe [EvaluationResult]
-> Either String (Maybe [EvaluationResult])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EvaluationResult]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
(Maybe Text -> Int -> GetComplianceDetailsByConfigRuleResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetComplianceDetailsByConfigRuleResponse)
forall (f :: * -> *) a b. Applicative f => 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 (Int -> GetComplianceDetailsByConfigRuleResponse)
-> Either String Int
-> Either String GetComplianceDetailsByConfigRuleResponse
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
GetComplianceDetailsByConfigRule
instance
Prelude.NFData
GetComplianceDetailsByConfigRule
instance
Core.ToHeaders
GetComplianceDetailsByConfigRule
where
toHeaders :: GetComplianceDetailsByConfigRule -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GetComplianceDetailsByConfigRule -> 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
"StarlingDoveService.GetComplianceDetailsByConfigRule" ::
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 GetComplianceDetailsByConfigRule where
toJSON :: GetComplianceDetailsByConfigRule -> Value
toJSON GetComplianceDetailsByConfigRule' {Maybe Natural
Maybe [ComplianceType]
Maybe Text
Text
configRuleName :: Text
limit :: Maybe Natural
nextToken :: Maybe Text
complianceTypes :: Maybe [ComplianceType]
$sel:configRuleName:GetComplianceDetailsByConfigRule' :: GetComplianceDetailsByConfigRule -> Text
$sel:limit:GetComplianceDetailsByConfigRule' :: GetComplianceDetailsByConfigRule -> Maybe Natural
$sel:nextToken:GetComplianceDetailsByConfigRule' :: GetComplianceDetailsByConfigRule -> Maybe Text
$sel:complianceTypes:GetComplianceDetailsByConfigRule' :: GetComplianceDetailsByConfigRule -> Maybe [ComplianceType]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ComplianceTypes" Text -> [ComplianceType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([ComplianceType] -> Pair) -> Maybe [ComplianceType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ComplianceType]
complianceTypes,
(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
"Limit" 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
limit,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ConfigRuleName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
configRuleName)
]
)
instance Core.ToPath GetComplianceDetailsByConfigRule where
toPath :: GetComplianceDetailsByConfigRule -> ByteString
toPath = ByteString -> GetComplianceDetailsByConfigRule -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
GetComplianceDetailsByConfigRule
where
toQuery :: GetComplianceDetailsByConfigRule -> QueryString
toQuery = QueryString -> GetComplianceDetailsByConfigRule -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetComplianceDetailsByConfigRuleResponse = GetComplianceDetailsByConfigRuleResponse'
{
GetComplianceDetailsByConfigRuleResponse
-> Maybe [EvaluationResult]
evaluationResults :: Prelude.Maybe [EvaluationResult],
GetComplianceDetailsByConfigRuleResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetComplianceDetailsByConfigRuleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetComplianceDetailsByConfigRuleResponse
-> GetComplianceDetailsByConfigRuleResponse -> Bool
(GetComplianceDetailsByConfigRuleResponse
-> GetComplianceDetailsByConfigRuleResponse -> Bool)
-> (GetComplianceDetailsByConfigRuleResponse
-> GetComplianceDetailsByConfigRuleResponse -> Bool)
-> Eq GetComplianceDetailsByConfigRuleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetComplianceDetailsByConfigRuleResponse
-> GetComplianceDetailsByConfigRuleResponse -> Bool
$c/= :: GetComplianceDetailsByConfigRuleResponse
-> GetComplianceDetailsByConfigRuleResponse -> Bool
== :: GetComplianceDetailsByConfigRuleResponse
-> GetComplianceDetailsByConfigRuleResponse -> Bool
$c== :: GetComplianceDetailsByConfigRuleResponse
-> GetComplianceDetailsByConfigRuleResponse -> Bool
Prelude.Eq, ReadPrec [GetComplianceDetailsByConfigRuleResponse]
ReadPrec GetComplianceDetailsByConfigRuleResponse
Int -> ReadS GetComplianceDetailsByConfigRuleResponse
ReadS [GetComplianceDetailsByConfigRuleResponse]
(Int -> ReadS GetComplianceDetailsByConfigRuleResponse)
-> ReadS [GetComplianceDetailsByConfigRuleResponse]
-> ReadPrec GetComplianceDetailsByConfigRuleResponse
-> ReadPrec [GetComplianceDetailsByConfigRuleResponse]
-> Read GetComplianceDetailsByConfigRuleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetComplianceDetailsByConfigRuleResponse]
$creadListPrec :: ReadPrec [GetComplianceDetailsByConfigRuleResponse]
readPrec :: ReadPrec GetComplianceDetailsByConfigRuleResponse
$creadPrec :: ReadPrec GetComplianceDetailsByConfigRuleResponse
readList :: ReadS [GetComplianceDetailsByConfigRuleResponse]
$creadList :: ReadS [GetComplianceDetailsByConfigRuleResponse]
readsPrec :: Int -> ReadS GetComplianceDetailsByConfigRuleResponse
$creadsPrec :: Int -> ReadS GetComplianceDetailsByConfigRuleResponse
Prelude.Read, Int -> GetComplianceDetailsByConfigRuleResponse -> ShowS
[GetComplianceDetailsByConfigRuleResponse] -> ShowS
GetComplianceDetailsByConfigRuleResponse -> String
(Int -> GetComplianceDetailsByConfigRuleResponse -> ShowS)
-> (GetComplianceDetailsByConfigRuleResponse -> String)
-> ([GetComplianceDetailsByConfigRuleResponse] -> ShowS)
-> Show GetComplianceDetailsByConfigRuleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetComplianceDetailsByConfigRuleResponse] -> ShowS
$cshowList :: [GetComplianceDetailsByConfigRuleResponse] -> ShowS
show :: GetComplianceDetailsByConfigRuleResponse -> String
$cshow :: GetComplianceDetailsByConfigRuleResponse -> String
showsPrec :: Int -> GetComplianceDetailsByConfigRuleResponse -> ShowS
$cshowsPrec :: Int -> GetComplianceDetailsByConfigRuleResponse -> ShowS
Prelude.Show, (forall x.
GetComplianceDetailsByConfigRuleResponse
-> Rep GetComplianceDetailsByConfigRuleResponse x)
-> (forall x.
Rep GetComplianceDetailsByConfigRuleResponse x
-> GetComplianceDetailsByConfigRuleResponse)
-> Generic GetComplianceDetailsByConfigRuleResponse
forall x.
Rep GetComplianceDetailsByConfigRuleResponse x
-> GetComplianceDetailsByConfigRuleResponse
forall x.
GetComplianceDetailsByConfigRuleResponse
-> Rep GetComplianceDetailsByConfigRuleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetComplianceDetailsByConfigRuleResponse x
-> GetComplianceDetailsByConfigRuleResponse
$cfrom :: forall x.
GetComplianceDetailsByConfigRuleResponse
-> Rep GetComplianceDetailsByConfigRuleResponse x
Prelude.Generic)
newGetComplianceDetailsByConfigRuleResponse ::
Prelude.Int ->
GetComplianceDetailsByConfigRuleResponse
newGetComplianceDetailsByConfigRuleResponse :: Int -> GetComplianceDetailsByConfigRuleResponse
newGetComplianceDetailsByConfigRuleResponse
Int
pHttpStatus_ =
GetComplianceDetailsByConfigRuleResponse' :: Maybe [EvaluationResult]
-> Maybe Text -> Int -> GetComplianceDetailsByConfigRuleResponse
GetComplianceDetailsByConfigRuleResponse'
{ $sel:evaluationResults:GetComplianceDetailsByConfigRuleResponse' :: Maybe [EvaluationResult]
evaluationResults =
Maybe [EvaluationResult]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetComplianceDetailsByConfigRuleResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetComplianceDetailsByConfigRuleResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getComplianceDetailsByConfigRuleResponse_evaluationResults :: Lens.Lens' GetComplianceDetailsByConfigRuleResponse (Prelude.Maybe [EvaluationResult])
getComplianceDetailsByConfigRuleResponse_evaluationResults :: (Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> GetComplianceDetailsByConfigRuleResponse
-> f GetComplianceDetailsByConfigRuleResponse
getComplianceDetailsByConfigRuleResponse_evaluationResults = (GetComplianceDetailsByConfigRuleResponse
-> Maybe [EvaluationResult])
-> (GetComplianceDetailsByConfigRuleResponse
-> Maybe [EvaluationResult]
-> GetComplianceDetailsByConfigRuleResponse)
-> Lens'
GetComplianceDetailsByConfigRuleResponse (Maybe [EvaluationResult])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceDetailsByConfigRuleResponse' {Maybe [EvaluationResult]
evaluationResults :: Maybe [EvaluationResult]
$sel:evaluationResults:GetComplianceDetailsByConfigRuleResponse' :: GetComplianceDetailsByConfigRuleResponse
-> Maybe [EvaluationResult]
evaluationResults} -> Maybe [EvaluationResult]
evaluationResults) (\s :: GetComplianceDetailsByConfigRuleResponse
s@GetComplianceDetailsByConfigRuleResponse' {} Maybe [EvaluationResult]
a -> GetComplianceDetailsByConfigRuleResponse
s {$sel:evaluationResults:GetComplianceDetailsByConfigRuleResponse' :: Maybe [EvaluationResult]
evaluationResults = Maybe [EvaluationResult]
a} :: GetComplianceDetailsByConfigRuleResponse) ((Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> GetComplianceDetailsByConfigRuleResponse
-> f GetComplianceDetailsByConfigRuleResponse)
-> ((Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> (Maybe [EvaluationResult] -> f (Maybe [EvaluationResult]))
-> GetComplianceDetailsByConfigRuleResponse
-> f GetComplianceDetailsByConfigRuleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[EvaluationResult]
[EvaluationResult]
[EvaluationResult]
[EvaluationResult]
-> Iso
(Maybe [EvaluationResult])
(Maybe [EvaluationResult])
(Maybe [EvaluationResult])
(Maybe [EvaluationResult])
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
[EvaluationResult]
[EvaluationResult]
[EvaluationResult]
[EvaluationResult]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getComplianceDetailsByConfigRuleResponse_nextToken :: Lens.Lens' GetComplianceDetailsByConfigRuleResponse (Prelude.Maybe Prelude.Text)
getComplianceDetailsByConfigRuleResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetComplianceDetailsByConfigRuleResponse
-> f GetComplianceDetailsByConfigRuleResponse
getComplianceDetailsByConfigRuleResponse_nextToken = (GetComplianceDetailsByConfigRuleResponse -> Maybe Text)
-> (GetComplianceDetailsByConfigRuleResponse
-> Maybe Text -> GetComplianceDetailsByConfigRuleResponse)
-> Lens' GetComplianceDetailsByConfigRuleResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceDetailsByConfigRuleResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetComplianceDetailsByConfigRuleResponse' :: GetComplianceDetailsByConfigRuleResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetComplianceDetailsByConfigRuleResponse
s@GetComplianceDetailsByConfigRuleResponse' {} Maybe Text
a -> GetComplianceDetailsByConfigRuleResponse
s {$sel:nextToken:GetComplianceDetailsByConfigRuleResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetComplianceDetailsByConfigRuleResponse)
getComplianceDetailsByConfigRuleResponse_httpStatus :: Lens.Lens' GetComplianceDetailsByConfigRuleResponse Prelude.Int
getComplianceDetailsByConfigRuleResponse_httpStatus :: (Int -> f Int)
-> GetComplianceDetailsByConfigRuleResponse
-> f GetComplianceDetailsByConfigRuleResponse
getComplianceDetailsByConfigRuleResponse_httpStatus = (GetComplianceDetailsByConfigRuleResponse -> Int)
-> (GetComplianceDetailsByConfigRuleResponse
-> Int -> GetComplianceDetailsByConfigRuleResponse)
-> Lens
GetComplianceDetailsByConfigRuleResponse
GetComplianceDetailsByConfigRuleResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetComplianceDetailsByConfigRuleResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetComplianceDetailsByConfigRuleResponse' :: GetComplianceDetailsByConfigRuleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetComplianceDetailsByConfigRuleResponse
s@GetComplianceDetailsByConfigRuleResponse' {} Int
a -> GetComplianceDetailsByConfigRuleResponse
s {$sel:httpStatus:GetComplianceDetailsByConfigRuleResponse' :: Int
httpStatus = Int
a} :: GetComplianceDetailsByConfigRuleResponse)
instance
Prelude.NFData
GetComplianceDetailsByConfigRuleResponse