{-# 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.Redshift.DescribeClusterSecurityGroups
(
DescribeClusterSecurityGroups (..),
newDescribeClusterSecurityGroups,
describeClusterSecurityGroups_tagValues,
describeClusterSecurityGroups_tagKeys,
describeClusterSecurityGroups_clusterSecurityGroupName,
describeClusterSecurityGroups_marker,
describeClusterSecurityGroups_maxRecords,
DescribeClusterSecurityGroupsResponse (..),
newDescribeClusterSecurityGroupsResponse,
describeClusterSecurityGroupsResponse_clusterSecurityGroups,
describeClusterSecurityGroupsResponse_marker,
describeClusterSecurityGroupsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeClusterSecurityGroups = DescribeClusterSecurityGroups'
{
DescribeClusterSecurityGroups -> Maybe [Text]
tagValues :: Prelude.Maybe [Prelude.Text],
DescribeClusterSecurityGroups -> Maybe [Text]
tagKeys :: Prelude.Maybe [Prelude.Text],
DescribeClusterSecurityGroups -> Maybe Text
clusterSecurityGroupName :: Prelude.Maybe Prelude.Text,
DescribeClusterSecurityGroups -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeClusterSecurityGroups -> Maybe Int
maxRecords :: Prelude.Maybe Prelude.Int
}
deriving (DescribeClusterSecurityGroups
-> DescribeClusterSecurityGroups -> Bool
(DescribeClusterSecurityGroups
-> DescribeClusterSecurityGroups -> Bool)
-> (DescribeClusterSecurityGroups
-> DescribeClusterSecurityGroups -> Bool)
-> Eq DescribeClusterSecurityGroups
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClusterSecurityGroups
-> DescribeClusterSecurityGroups -> Bool
$c/= :: DescribeClusterSecurityGroups
-> DescribeClusterSecurityGroups -> Bool
== :: DescribeClusterSecurityGroups
-> DescribeClusterSecurityGroups -> Bool
$c== :: DescribeClusterSecurityGroups
-> DescribeClusterSecurityGroups -> Bool
Prelude.Eq, ReadPrec [DescribeClusterSecurityGroups]
ReadPrec DescribeClusterSecurityGroups
Int -> ReadS DescribeClusterSecurityGroups
ReadS [DescribeClusterSecurityGroups]
(Int -> ReadS DescribeClusterSecurityGroups)
-> ReadS [DescribeClusterSecurityGroups]
-> ReadPrec DescribeClusterSecurityGroups
-> ReadPrec [DescribeClusterSecurityGroups]
-> Read DescribeClusterSecurityGroups
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClusterSecurityGroups]
$creadListPrec :: ReadPrec [DescribeClusterSecurityGroups]
readPrec :: ReadPrec DescribeClusterSecurityGroups
$creadPrec :: ReadPrec DescribeClusterSecurityGroups
readList :: ReadS [DescribeClusterSecurityGroups]
$creadList :: ReadS [DescribeClusterSecurityGroups]
readsPrec :: Int -> ReadS DescribeClusterSecurityGroups
$creadsPrec :: Int -> ReadS DescribeClusterSecurityGroups
Prelude.Read, Int -> DescribeClusterSecurityGroups -> ShowS
[DescribeClusterSecurityGroups] -> ShowS
DescribeClusterSecurityGroups -> String
(Int -> DescribeClusterSecurityGroups -> ShowS)
-> (DescribeClusterSecurityGroups -> String)
-> ([DescribeClusterSecurityGroups] -> ShowS)
-> Show DescribeClusterSecurityGroups
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClusterSecurityGroups] -> ShowS
$cshowList :: [DescribeClusterSecurityGroups] -> ShowS
show :: DescribeClusterSecurityGroups -> String
$cshow :: DescribeClusterSecurityGroups -> String
showsPrec :: Int -> DescribeClusterSecurityGroups -> ShowS
$cshowsPrec :: Int -> DescribeClusterSecurityGroups -> ShowS
Prelude.Show, (forall x.
DescribeClusterSecurityGroups
-> Rep DescribeClusterSecurityGroups x)
-> (forall x.
Rep DescribeClusterSecurityGroups x
-> DescribeClusterSecurityGroups)
-> Generic DescribeClusterSecurityGroups
forall x.
Rep DescribeClusterSecurityGroups x
-> DescribeClusterSecurityGroups
forall x.
DescribeClusterSecurityGroups
-> Rep DescribeClusterSecurityGroups x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClusterSecurityGroups x
-> DescribeClusterSecurityGroups
$cfrom :: forall x.
DescribeClusterSecurityGroups
-> Rep DescribeClusterSecurityGroups x
Prelude.Generic)
newDescribeClusterSecurityGroups ::
DescribeClusterSecurityGroups
newDescribeClusterSecurityGroups :: DescribeClusterSecurityGroups
newDescribeClusterSecurityGroups =
DescribeClusterSecurityGroups' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> DescribeClusterSecurityGroups
DescribeClusterSecurityGroups'
{ $sel:tagValues:DescribeClusterSecurityGroups' :: Maybe [Text]
tagValues =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:tagKeys:DescribeClusterSecurityGroups' :: Maybe [Text]
tagKeys = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:clusterSecurityGroupName:DescribeClusterSecurityGroups' :: Maybe Text
clusterSecurityGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeClusterSecurityGroups' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxRecords:DescribeClusterSecurityGroups' :: Maybe Int
maxRecords = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
describeClusterSecurityGroups_tagValues :: Lens.Lens' DescribeClusterSecurityGroups (Prelude.Maybe [Prelude.Text])
describeClusterSecurityGroups_tagValues :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeClusterSecurityGroups -> f DescribeClusterSecurityGroups
describeClusterSecurityGroups_tagValues = (DescribeClusterSecurityGroups -> Maybe [Text])
-> (DescribeClusterSecurityGroups
-> Maybe [Text] -> DescribeClusterSecurityGroups)
-> Lens
DescribeClusterSecurityGroups
DescribeClusterSecurityGroups
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSecurityGroups' {Maybe [Text]
tagValues :: Maybe [Text]
$sel:tagValues:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe [Text]
tagValues} -> Maybe [Text]
tagValues) (\s :: DescribeClusterSecurityGroups
s@DescribeClusterSecurityGroups' {} Maybe [Text]
a -> DescribeClusterSecurityGroups
s {$sel:tagValues:DescribeClusterSecurityGroups' :: Maybe [Text]
tagValues = Maybe [Text]
a} :: DescribeClusterSecurityGroups) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeClusterSecurityGroups
-> f DescribeClusterSecurityGroups)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeClusterSecurityGroups
-> f DescribeClusterSecurityGroups
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
describeClusterSecurityGroups_tagKeys :: Lens.Lens' DescribeClusterSecurityGroups (Prelude.Maybe [Prelude.Text])
describeClusterSecurityGroups_tagKeys :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeClusterSecurityGroups -> f DescribeClusterSecurityGroups
describeClusterSecurityGroups_tagKeys = (DescribeClusterSecurityGroups -> Maybe [Text])
-> (DescribeClusterSecurityGroups
-> Maybe [Text] -> DescribeClusterSecurityGroups)
-> Lens
DescribeClusterSecurityGroups
DescribeClusterSecurityGroups
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSecurityGroups' {Maybe [Text]
tagKeys :: Maybe [Text]
$sel:tagKeys:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe [Text]
tagKeys} -> Maybe [Text]
tagKeys) (\s :: DescribeClusterSecurityGroups
s@DescribeClusterSecurityGroups' {} Maybe [Text]
a -> DescribeClusterSecurityGroups
s {$sel:tagKeys:DescribeClusterSecurityGroups' :: Maybe [Text]
tagKeys = Maybe [Text]
a} :: DescribeClusterSecurityGroups) ((Maybe [Text] -> f (Maybe [Text]))
-> DescribeClusterSecurityGroups
-> f DescribeClusterSecurityGroups)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeClusterSecurityGroups
-> f DescribeClusterSecurityGroups
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
describeClusterSecurityGroups_clusterSecurityGroupName :: Lens.Lens' DescribeClusterSecurityGroups (Prelude.Maybe Prelude.Text)
describeClusterSecurityGroups_clusterSecurityGroupName :: (Maybe Text -> f (Maybe Text))
-> DescribeClusterSecurityGroups -> f DescribeClusterSecurityGroups
describeClusterSecurityGroups_clusterSecurityGroupName = (DescribeClusterSecurityGroups -> Maybe Text)
-> (DescribeClusterSecurityGroups
-> Maybe Text -> DescribeClusterSecurityGroups)
-> Lens
DescribeClusterSecurityGroups
DescribeClusterSecurityGroups
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSecurityGroups' {Maybe Text
clusterSecurityGroupName :: Maybe Text
$sel:clusterSecurityGroupName:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe Text
clusterSecurityGroupName} -> Maybe Text
clusterSecurityGroupName) (\s :: DescribeClusterSecurityGroups
s@DescribeClusterSecurityGroups' {} Maybe Text
a -> DescribeClusterSecurityGroups
s {$sel:clusterSecurityGroupName:DescribeClusterSecurityGroups' :: Maybe Text
clusterSecurityGroupName = Maybe Text
a} :: DescribeClusterSecurityGroups)
describeClusterSecurityGroups_marker :: Lens.Lens' DescribeClusterSecurityGroups (Prelude.Maybe Prelude.Text)
describeClusterSecurityGroups_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeClusterSecurityGroups -> f DescribeClusterSecurityGroups
describeClusterSecurityGroups_marker = (DescribeClusterSecurityGroups -> Maybe Text)
-> (DescribeClusterSecurityGroups
-> Maybe Text -> DescribeClusterSecurityGroups)
-> Lens
DescribeClusterSecurityGroups
DescribeClusterSecurityGroups
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSecurityGroups' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeClusterSecurityGroups
s@DescribeClusterSecurityGroups' {} Maybe Text
a -> DescribeClusterSecurityGroups
s {$sel:marker:DescribeClusterSecurityGroups' :: Maybe Text
marker = Maybe Text
a} :: DescribeClusterSecurityGroups)
describeClusterSecurityGroups_maxRecords :: Lens.Lens' DescribeClusterSecurityGroups (Prelude.Maybe Prelude.Int)
describeClusterSecurityGroups_maxRecords :: (Maybe Int -> f (Maybe Int))
-> DescribeClusterSecurityGroups -> f DescribeClusterSecurityGroups
describeClusterSecurityGroups_maxRecords = (DescribeClusterSecurityGroups -> Maybe Int)
-> (DescribeClusterSecurityGroups
-> Maybe Int -> DescribeClusterSecurityGroups)
-> Lens
DescribeClusterSecurityGroups
DescribeClusterSecurityGroups
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSecurityGroups' {Maybe Int
maxRecords :: Maybe Int
$sel:maxRecords:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe Int
maxRecords} -> Maybe Int
maxRecords) (\s :: DescribeClusterSecurityGroups
s@DescribeClusterSecurityGroups' {} Maybe Int
a -> DescribeClusterSecurityGroups
s {$sel:maxRecords:DescribeClusterSecurityGroups' :: Maybe Int
maxRecords = Maybe Int
a} :: DescribeClusterSecurityGroups)
instance Core.AWSPager DescribeClusterSecurityGroups where
page :: DescribeClusterSecurityGroups
-> AWSResponse DescribeClusterSecurityGroups
-> Maybe DescribeClusterSecurityGroups
page DescribeClusterSecurityGroups
rq AWSResponse DescribeClusterSecurityGroups
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeClusterSecurityGroups
DescribeClusterSecurityGroupsResponse
rs
DescribeClusterSecurityGroupsResponse
-> Getting (First Text) DescribeClusterSecurityGroupsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeClusterSecurityGroupsResponse
-> Const (First Text) DescribeClusterSecurityGroupsResponse
Lens' DescribeClusterSecurityGroupsResponse (Maybe Text)
describeClusterSecurityGroupsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeClusterSecurityGroupsResponse
-> Const (First Text) DescribeClusterSecurityGroupsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeClusterSecurityGroupsResponse 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 DescribeClusterSecurityGroups
forall a. Maybe a
Prelude.Nothing
| Maybe [ClusterSecurityGroup] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeClusterSecurityGroups
DescribeClusterSecurityGroupsResponse
rs
DescribeClusterSecurityGroupsResponse
-> Getting
(First [ClusterSecurityGroup])
DescribeClusterSecurityGroupsResponse
[ClusterSecurityGroup]
-> Maybe [ClusterSecurityGroup]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ClusterSecurityGroup]
-> Const
(First [ClusterSecurityGroup]) (Maybe [ClusterSecurityGroup]))
-> DescribeClusterSecurityGroupsResponse
-> Const
(First [ClusterSecurityGroup])
DescribeClusterSecurityGroupsResponse
Lens'
DescribeClusterSecurityGroupsResponse
(Maybe [ClusterSecurityGroup])
describeClusterSecurityGroupsResponse_clusterSecurityGroups
((Maybe [ClusterSecurityGroup]
-> Const
(First [ClusterSecurityGroup]) (Maybe [ClusterSecurityGroup]))
-> DescribeClusterSecurityGroupsResponse
-> Const
(First [ClusterSecurityGroup])
DescribeClusterSecurityGroupsResponse)
-> (([ClusterSecurityGroup]
-> Const (First [ClusterSecurityGroup]) [ClusterSecurityGroup])
-> Maybe [ClusterSecurityGroup]
-> Const
(First [ClusterSecurityGroup]) (Maybe [ClusterSecurityGroup]))
-> Getting
(First [ClusterSecurityGroup])
DescribeClusterSecurityGroupsResponse
[ClusterSecurityGroup]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ClusterSecurityGroup]
-> Const (First [ClusterSecurityGroup]) [ClusterSecurityGroup])
-> Maybe [ClusterSecurityGroup]
-> Const
(First [ClusterSecurityGroup]) (Maybe [ClusterSecurityGroup])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeClusterSecurityGroups
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeClusterSecurityGroups
-> Maybe DescribeClusterSecurityGroups
forall a. a -> Maybe a
Prelude.Just (DescribeClusterSecurityGroups
-> Maybe DescribeClusterSecurityGroups)
-> DescribeClusterSecurityGroups
-> Maybe DescribeClusterSecurityGroups
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeClusterSecurityGroups
rq
DescribeClusterSecurityGroups
-> (DescribeClusterSecurityGroups -> DescribeClusterSecurityGroups)
-> DescribeClusterSecurityGroups
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeClusterSecurityGroups
-> Identity DescribeClusterSecurityGroups
Lens
DescribeClusterSecurityGroups
DescribeClusterSecurityGroups
(Maybe Text)
(Maybe Text)
describeClusterSecurityGroups_marker
((Maybe Text -> Identity (Maybe Text))
-> DescribeClusterSecurityGroups
-> Identity DescribeClusterSecurityGroups)
-> Maybe Text
-> DescribeClusterSecurityGroups
-> DescribeClusterSecurityGroups
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeClusterSecurityGroups
DescribeClusterSecurityGroupsResponse
rs
DescribeClusterSecurityGroupsResponse
-> Getting (First Text) DescribeClusterSecurityGroupsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeClusterSecurityGroupsResponse
-> Const (First Text) DescribeClusterSecurityGroupsResponse
Lens' DescribeClusterSecurityGroupsResponse (Maybe Text)
describeClusterSecurityGroupsResponse_marker
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeClusterSecurityGroupsResponse
-> Const (First Text) DescribeClusterSecurityGroupsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeClusterSecurityGroupsResponse 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
DescribeClusterSecurityGroups
where
type
AWSResponse DescribeClusterSecurityGroups =
DescribeClusterSecurityGroupsResponse
request :: DescribeClusterSecurityGroups
-> Request DescribeClusterSecurityGroups
request = Service
-> DescribeClusterSecurityGroups
-> Request DescribeClusterSecurityGroups
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeClusterSecurityGroups
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeClusterSecurityGroups)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DescribeClusterSecurityGroups))
-> Logger
-> Service
-> Proxy DescribeClusterSecurityGroups
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeClusterSecurityGroups)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DescribeClusterSecurityGroupsResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [ClusterSecurityGroup]
-> Maybe Text -> Int -> DescribeClusterSecurityGroupsResponse
DescribeClusterSecurityGroupsResponse'
(Maybe [ClusterSecurityGroup]
-> Maybe Text -> Int -> DescribeClusterSecurityGroupsResponse)
-> Either String (Maybe [ClusterSecurityGroup])
-> Either
String (Maybe Text -> Int -> DescribeClusterSecurityGroupsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ClusterSecurityGroups"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (Maybe [ClusterSecurityGroup]))
-> Either String (Maybe [ClusterSecurityGroup])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [ClusterSecurityGroup])
-> [Node] -> Either String (Maybe [ClusterSecurityGroup])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [ClusterSecurityGroup]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"ClusterSecurityGroup")
)
Either
String (Maybe Text -> Int -> DescribeClusterSecurityGroupsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeClusterSecurityGroupsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Marker")
Either String (Int -> DescribeClusterSecurityGroupsResponse)
-> Either String Int
-> Either String DescribeClusterSecurityGroupsResponse
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
DescribeClusterSecurityGroups
instance Prelude.NFData DescribeClusterSecurityGroups
instance Core.ToHeaders DescribeClusterSecurityGroups where
toHeaders :: DescribeClusterSecurityGroups -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeClusterSecurityGroups -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeClusterSecurityGroups where
toPath :: DescribeClusterSecurityGroups -> ByteString
toPath = ByteString -> DescribeClusterSecurityGroups -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeClusterSecurityGroups where
toQuery :: DescribeClusterSecurityGroups -> QueryString
toQuery DescribeClusterSecurityGroups' {Maybe Int
Maybe [Text]
Maybe Text
maxRecords :: Maybe Int
marker :: Maybe Text
clusterSecurityGroupName :: Maybe Text
tagKeys :: Maybe [Text]
tagValues :: Maybe [Text]
$sel:maxRecords:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe Int
$sel:marker:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe Text
$sel:clusterSecurityGroupName:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe Text
$sel:tagKeys:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> Maybe [Text]
$sel:tagValues:DescribeClusterSecurityGroups' :: DescribeClusterSecurityGroups -> 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
"DescribeClusterSecurityGroups" ::
Prelude.ByteString
),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"TagValues"
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
"TagValue" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagValues),
ByteString
"TagKeys"
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
"TagKey" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
tagKeys),
ByteString
"ClusterSecurityGroupName"
ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
clusterSecurityGroupName,
ByteString
"Marker" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
marker,
ByteString
"MaxRecords" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
maxRecords
]
data DescribeClusterSecurityGroupsResponse = DescribeClusterSecurityGroupsResponse'
{
DescribeClusterSecurityGroupsResponse
-> Maybe [ClusterSecurityGroup]
clusterSecurityGroups :: Prelude.Maybe [ClusterSecurityGroup],
DescribeClusterSecurityGroupsResponse -> Maybe Text
marker :: Prelude.Maybe Prelude.Text,
DescribeClusterSecurityGroupsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeClusterSecurityGroupsResponse
-> DescribeClusterSecurityGroupsResponse -> Bool
(DescribeClusterSecurityGroupsResponse
-> DescribeClusterSecurityGroupsResponse -> Bool)
-> (DescribeClusterSecurityGroupsResponse
-> DescribeClusterSecurityGroupsResponse -> Bool)
-> Eq DescribeClusterSecurityGroupsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeClusterSecurityGroupsResponse
-> DescribeClusterSecurityGroupsResponse -> Bool
$c/= :: DescribeClusterSecurityGroupsResponse
-> DescribeClusterSecurityGroupsResponse -> Bool
== :: DescribeClusterSecurityGroupsResponse
-> DescribeClusterSecurityGroupsResponse -> Bool
$c== :: DescribeClusterSecurityGroupsResponse
-> DescribeClusterSecurityGroupsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeClusterSecurityGroupsResponse]
ReadPrec DescribeClusterSecurityGroupsResponse
Int -> ReadS DescribeClusterSecurityGroupsResponse
ReadS [DescribeClusterSecurityGroupsResponse]
(Int -> ReadS DescribeClusterSecurityGroupsResponse)
-> ReadS [DescribeClusterSecurityGroupsResponse]
-> ReadPrec DescribeClusterSecurityGroupsResponse
-> ReadPrec [DescribeClusterSecurityGroupsResponse]
-> Read DescribeClusterSecurityGroupsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeClusterSecurityGroupsResponse]
$creadListPrec :: ReadPrec [DescribeClusterSecurityGroupsResponse]
readPrec :: ReadPrec DescribeClusterSecurityGroupsResponse
$creadPrec :: ReadPrec DescribeClusterSecurityGroupsResponse
readList :: ReadS [DescribeClusterSecurityGroupsResponse]
$creadList :: ReadS [DescribeClusterSecurityGroupsResponse]
readsPrec :: Int -> ReadS DescribeClusterSecurityGroupsResponse
$creadsPrec :: Int -> ReadS DescribeClusterSecurityGroupsResponse
Prelude.Read, Int -> DescribeClusterSecurityGroupsResponse -> ShowS
[DescribeClusterSecurityGroupsResponse] -> ShowS
DescribeClusterSecurityGroupsResponse -> String
(Int -> DescribeClusterSecurityGroupsResponse -> ShowS)
-> (DescribeClusterSecurityGroupsResponse -> String)
-> ([DescribeClusterSecurityGroupsResponse] -> ShowS)
-> Show DescribeClusterSecurityGroupsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeClusterSecurityGroupsResponse] -> ShowS
$cshowList :: [DescribeClusterSecurityGroupsResponse] -> ShowS
show :: DescribeClusterSecurityGroupsResponse -> String
$cshow :: DescribeClusterSecurityGroupsResponse -> String
showsPrec :: Int -> DescribeClusterSecurityGroupsResponse -> ShowS
$cshowsPrec :: Int -> DescribeClusterSecurityGroupsResponse -> ShowS
Prelude.Show, (forall x.
DescribeClusterSecurityGroupsResponse
-> Rep DescribeClusterSecurityGroupsResponse x)
-> (forall x.
Rep DescribeClusterSecurityGroupsResponse x
-> DescribeClusterSecurityGroupsResponse)
-> Generic DescribeClusterSecurityGroupsResponse
forall x.
Rep DescribeClusterSecurityGroupsResponse x
-> DescribeClusterSecurityGroupsResponse
forall x.
DescribeClusterSecurityGroupsResponse
-> Rep DescribeClusterSecurityGroupsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeClusterSecurityGroupsResponse x
-> DescribeClusterSecurityGroupsResponse
$cfrom :: forall x.
DescribeClusterSecurityGroupsResponse
-> Rep DescribeClusterSecurityGroupsResponse x
Prelude.Generic)
newDescribeClusterSecurityGroupsResponse ::
Prelude.Int ->
DescribeClusterSecurityGroupsResponse
newDescribeClusterSecurityGroupsResponse :: Int -> DescribeClusterSecurityGroupsResponse
newDescribeClusterSecurityGroupsResponse Int
pHttpStatus_ =
DescribeClusterSecurityGroupsResponse' :: Maybe [ClusterSecurityGroup]
-> Maybe Text -> Int -> DescribeClusterSecurityGroupsResponse
DescribeClusterSecurityGroupsResponse'
{ $sel:clusterSecurityGroups:DescribeClusterSecurityGroupsResponse' :: Maybe [ClusterSecurityGroup]
clusterSecurityGroups =
Maybe [ClusterSecurityGroup]
forall a. Maybe a
Prelude.Nothing,
$sel:marker:DescribeClusterSecurityGroupsResponse' :: Maybe Text
marker = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeClusterSecurityGroupsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeClusterSecurityGroupsResponse_clusterSecurityGroups :: Lens.Lens' DescribeClusterSecurityGroupsResponse (Prelude.Maybe [ClusterSecurityGroup])
describeClusterSecurityGroupsResponse_clusterSecurityGroups :: (Maybe [ClusterSecurityGroup] -> f (Maybe [ClusterSecurityGroup]))
-> DescribeClusterSecurityGroupsResponse
-> f DescribeClusterSecurityGroupsResponse
describeClusterSecurityGroupsResponse_clusterSecurityGroups = (DescribeClusterSecurityGroupsResponse
-> Maybe [ClusterSecurityGroup])
-> (DescribeClusterSecurityGroupsResponse
-> Maybe [ClusterSecurityGroup]
-> DescribeClusterSecurityGroupsResponse)
-> Lens'
DescribeClusterSecurityGroupsResponse
(Maybe [ClusterSecurityGroup])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSecurityGroupsResponse' {Maybe [ClusterSecurityGroup]
clusterSecurityGroups :: Maybe [ClusterSecurityGroup]
$sel:clusterSecurityGroups:DescribeClusterSecurityGroupsResponse' :: DescribeClusterSecurityGroupsResponse
-> Maybe [ClusterSecurityGroup]
clusterSecurityGroups} -> Maybe [ClusterSecurityGroup]
clusterSecurityGroups) (\s :: DescribeClusterSecurityGroupsResponse
s@DescribeClusterSecurityGroupsResponse' {} Maybe [ClusterSecurityGroup]
a -> DescribeClusterSecurityGroupsResponse
s {$sel:clusterSecurityGroups:DescribeClusterSecurityGroupsResponse' :: Maybe [ClusterSecurityGroup]
clusterSecurityGroups = Maybe [ClusterSecurityGroup]
a} :: DescribeClusterSecurityGroupsResponse) ((Maybe [ClusterSecurityGroup] -> f (Maybe [ClusterSecurityGroup]))
-> DescribeClusterSecurityGroupsResponse
-> f DescribeClusterSecurityGroupsResponse)
-> ((Maybe [ClusterSecurityGroup]
-> f (Maybe [ClusterSecurityGroup]))
-> Maybe [ClusterSecurityGroup]
-> f (Maybe [ClusterSecurityGroup]))
-> (Maybe [ClusterSecurityGroup]
-> f (Maybe [ClusterSecurityGroup]))
-> DescribeClusterSecurityGroupsResponse
-> f DescribeClusterSecurityGroupsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ClusterSecurityGroup]
[ClusterSecurityGroup]
[ClusterSecurityGroup]
[ClusterSecurityGroup]
-> Iso
(Maybe [ClusterSecurityGroup])
(Maybe [ClusterSecurityGroup])
(Maybe [ClusterSecurityGroup])
(Maybe [ClusterSecurityGroup])
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
[ClusterSecurityGroup]
[ClusterSecurityGroup]
[ClusterSecurityGroup]
[ClusterSecurityGroup]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeClusterSecurityGroupsResponse_marker :: Lens.Lens' DescribeClusterSecurityGroupsResponse (Prelude.Maybe Prelude.Text)
describeClusterSecurityGroupsResponse_marker :: (Maybe Text -> f (Maybe Text))
-> DescribeClusterSecurityGroupsResponse
-> f DescribeClusterSecurityGroupsResponse
describeClusterSecurityGroupsResponse_marker = (DescribeClusterSecurityGroupsResponse -> Maybe Text)
-> (DescribeClusterSecurityGroupsResponse
-> Maybe Text -> DescribeClusterSecurityGroupsResponse)
-> Lens' DescribeClusterSecurityGroupsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSecurityGroupsResponse' {Maybe Text
marker :: Maybe Text
$sel:marker:DescribeClusterSecurityGroupsResponse' :: DescribeClusterSecurityGroupsResponse -> Maybe Text
marker} -> Maybe Text
marker) (\s :: DescribeClusterSecurityGroupsResponse
s@DescribeClusterSecurityGroupsResponse' {} Maybe Text
a -> DescribeClusterSecurityGroupsResponse
s {$sel:marker:DescribeClusterSecurityGroupsResponse' :: Maybe Text
marker = Maybe Text
a} :: DescribeClusterSecurityGroupsResponse)
describeClusterSecurityGroupsResponse_httpStatus :: Lens.Lens' DescribeClusterSecurityGroupsResponse Prelude.Int
describeClusterSecurityGroupsResponse_httpStatus :: (Int -> f Int)
-> DescribeClusterSecurityGroupsResponse
-> f DescribeClusterSecurityGroupsResponse
describeClusterSecurityGroupsResponse_httpStatus = (DescribeClusterSecurityGroupsResponse -> Int)
-> (DescribeClusterSecurityGroupsResponse
-> Int -> DescribeClusterSecurityGroupsResponse)
-> Lens
DescribeClusterSecurityGroupsResponse
DescribeClusterSecurityGroupsResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeClusterSecurityGroupsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeClusterSecurityGroupsResponse' :: DescribeClusterSecurityGroupsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeClusterSecurityGroupsResponse
s@DescribeClusterSecurityGroupsResponse' {} Int
a -> DescribeClusterSecurityGroupsResponse
s {$sel:httpStatus:DescribeClusterSecurityGroupsResponse' :: Int
httpStatus = Int
a} :: DescribeClusterSecurityGroupsResponse)
instance
Prelude.NFData
DescribeClusterSecurityGroupsResponse