{-# 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.ElastiCache.RevokeCacheSecurityGroupIngress
(
RevokeCacheSecurityGroupIngress (..),
newRevokeCacheSecurityGroupIngress,
revokeCacheSecurityGroupIngress_cacheSecurityGroupName,
revokeCacheSecurityGroupIngress_eC2SecurityGroupName,
revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId,
RevokeCacheSecurityGroupIngressResponse (..),
newRevokeCacheSecurityGroupIngressResponse,
revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup,
revokeCacheSecurityGroupIngressResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.ElastiCache.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RevokeCacheSecurityGroupIngress = RevokeCacheSecurityGroupIngress'
{
RevokeCacheSecurityGroupIngress -> Text
cacheSecurityGroupName :: Prelude.Text,
RevokeCacheSecurityGroupIngress -> Text
eC2SecurityGroupName :: Prelude.Text,
RevokeCacheSecurityGroupIngress -> Text
eC2SecurityGroupOwnerId :: Prelude.Text
}
deriving (RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
$c/= :: RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
== :: RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
$c== :: RevokeCacheSecurityGroupIngress
-> RevokeCacheSecurityGroupIngress -> Bool
Prelude.Eq, ReadPrec [RevokeCacheSecurityGroupIngress]
ReadPrec RevokeCacheSecurityGroupIngress
Int -> ReadS RevokeCacheSecurityGroupIngress
ReadS [RevokeCacheSecurityGroupIngress]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeCacheSecurityGroupIngress]
$creadListPrec :: ReadPrec [RevokeCacheSecurityGroupIngress]
readPrec :: ReadPrec RevokeCacheSecurityGroupIngress
$creadPrec :: ReadPrec RevokeCacheSecurityGroupIngress
readList :: ReadS [RevokeCacheSecurityGroupIngress]
$creadList :: ReadS [RevokeCacheSecurityGroupIngress]
readsPrec :: Int -> ReadS RevokeCacheSecurityGroupIngress
$creadsPrec :: Int -> ReadS RevokeCacheSecurityGroupIngress
Prelude.Read, Int -> RevokeCacheSecurityGroupIngress -> ShowS
[RevokeCacheSecurityGroupIngress] -> ShowS
RevokeCacheSecurityGroupIngress -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeCacheSecurityGroupIngress] -> ShowS
$cshowList :: [RevokeCacheSecurityGroupIngress] -> ShowS
show :: RevokeCacheSecurityGroupIngress -> String
$cshow :: RevokeCacheSecurityGroupIngress -> String
showsPrec :: Int -> RevokeCacheSecurityGroupIngress -> ShowS
$cshowsPrec :: Int -> RevokeCacheSecurityGroupIngress -> ShowS
Prelude.Show, forall x.
Rep RevokeCacheSecurityGroupIngress x
-> RevokeCacheSecurityGroupIngress
forall x.
RevokeCacheSecurityGroupIngress
-> Rep RevokeCacheSecurityGroupIngress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeCacheSecurityGroupIngress x
-> RevokeCacheSecurityGroupIngress
$cfrom :: forall x.
RevokeCacheSecurityGroupIngress
-> Rep RevokeCacheSecurityGroupIngress x
Prelude.Generic)
newRevokeCacheSecurityGroupIngress ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
RevokeCacheSecurityGroupIngress
newRevokeCacheSecurityGroupIngress :: Text -> Text -> Text -> RevokeCacheSecurityGroupIngress
newRevokeCacheSecurityGroupIngress
Text
pCacheSecurityGroupName_
Text
pEC2SecurityGroupName_
Text
pEC2SecurityGroupOwnerId_ =
RevokeCacheSecurityGroupIngress'
{ $sel:cacheSecurityGroupName:RevokeCacheSecurityGroupIngress' :: Text
cacheSecurityGroupName =
Text
pCacheSecurityGroupName_,
$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: Text
eC2SecurityGroupName =
Text
pEC2SecurityGroupName_,
$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: Text
eC2SecurityGroupOwnerId =
Text
pEC2SecurityGroupOwnerId_
}
revokeCacheSecurityGroupIngress_cacheSecurityGroupName :: Lens.Lens' RevokeCacheSecurityGroupIngress Prelude.Text
revokeCacheSecurityGroupIngress_cacheSecurityGroupName :: Lens' RevokeCacheSecurityGroupIngress Text
revokeCacheSecurityGroupIngress_cacheSecurityGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeCacheSecurityGroupIngress' {Text
cacheSecurityGroupName :: Text
$sel:cacheSecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
cacheSecurityGroupName} -> Text
cacheSecurityGroupName) (\s :: RevokeCacheSecurityGroupIngress
s@RevokeCacheSecurityGroupIngress' {} Text
a -> RevokeCacheSecurityGroupIngress
s {$sel:cacheSecurityGroupName:RevokeCacheSecurityGroupIngress' :: Text
cacheSecurityGroupName = Text
a} :: RevokeCacheSecurityGroupIngress)
revokeCacheSecurityGroupIngress_eC2SecurityGroupName :: Lens.Lens' RevokeCacheSecurityGroupIngress Prelude.Text
revokeCacheSecurityGroupIngress_eC2SecurityGroupName :: Lens' RevokeCacheSecurityGroupIngress Text
revokeCacheSecurityGroupIngress_eC2SecurityGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeCacheSecurityGroupIngress' {Text
eC2SecurityGroupName :: Text
$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
eC2SecurityGroupName} -> Text
eC2SecurityGroupName) (\s :: RevokeCacheSecurityGroupIngress
s@RevokeCacheSecurityGroupIngress' {} Text
a -> RevokeCacheSecurityGroupIngress
s {$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: Text
eC2SecurityGroupName = Text
a} :: RevokeCacheSecurityGroupIngress)
revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId :: Lens.Lens' RevokeCacheSecurityGroupIngress Prelude.Text
revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId :: Lens' RevokeCacheSecurityGroupIngress Text
revokeCacheSecurityGroupIngress_eC2SecurityGroupOwnerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeCacheSecurityGroupIngress' {Text
eC2SecurityGroupOwnerId :: Text
$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
eC2SecurityGroupOwnerId} -> Text
eC2SecurityGroupOwnerId) (\s :: RevokeCacheSecurityGroupIngress
s@RevokeCacheSecurityGroupIngress' {} Text
a -> RevokeCacheSecurityGroupIngress
s {$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: Text
eC2SecurityGroupOwnerId = Text
a} :: RevokeCacheSecurityGroupIngress)
instance
Core.AWSRequest
RevokeCacheSecurityGroupIngress
where
type
AWSResponse RevokeCacheSecurityGroupIngress =
RevokeCacheSecurityGroupIngressResponse
request :: (Service -> Service)
-> RevokeCacheSecurityGroupIngress
-> Request RevokeCacheSecurityGroupIngress
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RevokeCacheSecurityGroupIngress
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse RevokeCacheSecurityGroupIngress)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"RevokeCacheSecurityGroupIngressResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe CacheSecurityGroup
-> Int -> RevokeCacheSecurityGroupIngressResponse
RevokeCacheSecurityGroupIngressResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"CacheSecurityGroup")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
RevokeCacheSecurityGroupIngress
where
hashWithSalt :: Int -> RevokeCacheSecurityGroupIngress -> Int
hashWithSalt
Int
_salt
RevokeCacheSecurityGroupIngress' {Text
eC2SecurityGroupOwnerId :: Text
eC2SecurityGroupName :: Text
cacheSecurityGroupName :: Text
$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
$sel:cacheSecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
cacheSecurityGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
eC2SecurityGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
eC2SecurityGroupOwnerId
instance
Prelude.NFData
RevokeCacheSecurityGroupIngress
where
rnf :: RevokeCacheSecurityGroupIngress -> ()
rnf RevokeCacheSecurityGroupIngress' {Text
eC2SecurityGroupOwnerId :: Text
eC2SecurityGroupName :: Text
cacheSecurityGroupName :: Text
$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
$sel:cacheSecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
cacheSecurityGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
eC2SecurityGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
eC2SecurityGroupOwnerId
instance
Data.ToHeaders
RevokeCacheSecurityGroupIngress
where
toHeaders :: RevokeCacheSecurityGroupIngress -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath RevokeCacheSecurityGroupIngress where
toPath :: RevokeCacheSecurityGroupIngress -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery RevokeCacheSecurityGroupIngress where
toQuery :: RevokeCacheSecurityGroupIngress -> QueryString
toQuery RevokeCacheSecurityGroupIngress' {Text
eC2SecurityGroupOwnerId :: Text
eC2SecurityGroupName :: Text
cacheSecurityGroupName :: Text
$sel:eC2SecurityGroupOwnerId:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
$sel:eC2SecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
$sel:cacheSecurityGroupName:RevokeCacheSecurityGroupIngress' :: RevokeCacheSecurityGroupIngress -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"RevokeCacheSecurityGroupIngress" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2015-02-02" :: Prelude.ByteString),
ByteString
"CacheSecurityGroupName"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
cacheSecurityGroupName,
ByteString
"EC2SecurityGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
eC2SecurityGroupName,
ByteString
"EC2SecurityGroupOwnerId"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
eC2SecurityGroupOwnerId
]
data RevokeCacheSecurityGroupIngressResponse = RevokeCacheSecurityGroupIngressResponse'
{ RevokeCacheSecurityGroupIngressResponse -> Maybe CacheSecurityGroup
cacheSecurityGroup :: Prelude.Maybe CacheSecurityGroup,
RevokeCacheSecurityGroupIngressResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RevokeCacheSecurityGroupIngressResponse
-> RevokeCacheSecurityGroupIngressResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RevokeCacheSecurityGroupIngressResponse
-> RevokeCacheSecurityGroupIngressResponse -> Bool
$c/= :: RevokeCacheSecurityGroupIngressResponse
-> RevokeCacheSecurityGroupIngressResponse -> Bool
== :: RevokeCacheSecurityGroupIngressResponse
-> RevokeCacheSecurityGroupIngressResponse -> Bool
$c== :: RevokeCacheSecurityGroupIngressResponse
-> RevokeCacheSecurityGroupIngressResponse -> Bool
Prelude.Eq, ReadPrec [RevokeCacheSecurityGroupIngressResponse]
ReadPrec RevokeCacheSecurityGroupIngressResponse
Int -> ReadS RevokeCacheSecurityGroupIngressResponse
ReadS [RevokeCacheSecurityGroupIngressResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RevokeCacheSecurityGroupIngressResponse]
$creadListPrec :: ReadPrec [RevokeCacheSecurityGroupIngressResponse]
readPrec :: ReadPrec RevokeCacheSecurityGroupIngressResponse
$creadPrec :: ReadPrec RevokeCacheSecurityGroupIngressResponse
readList :: ReadS [RevokeCacheSecurityGroupIngressResponse]
$creadList :: ReadS [RevokeCacheSecurityGroupIngressResponse]
readsPrec :: Int -> ReadS RevokeCacheSecurityGroupIngressResponse
$creadsPrec :: Int -> ReadS RevokeCacheSecurityGroupIngressResponse
Prelude.Read, Int -> RevokeCacheSecurityGroupIngressResponse -> ShowS
[RevokeCacheSecurityGroupIngressResponse] -> ShowS
RevokeCacheSecurityGroupIngressResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RevokeCacheSecurityGroupIngressResponse] -> ShowS
$cshowList :: [RevokeCacheSecurityGroupIngressResponse] -> ShowS
show :: RevokeCacheSecurityGroupIngressResponse -> String
$cshow :: RevokeCacheSecurityGroupIngressResponse -> String
showsPrec :: Int -> RevokeCacheSecurityGroupIngressResponse -> ShowS
$cshowsPrec :: Int -> RevokeCacheSecurityGroupIngressResponse -> ShowS
Prelude.Show, forall x.
Rep RevokeCacheSecurityGroupIngressResponse x
-> RevokeCacheSecurityGroupIngressResponse
forall x.
RevokeCacheSecurityGroupIngressResponse
-> Rep RevokeCacheSecurityGroupIngressResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RevokeCacheSecurityGroupIngressResponse x
-> RevokeCacheSecurityGroupIngressResponse
$cfrom :: forall x.
RevokeCacheSecurityGroupIngressResponse
-> Rep RevokeCacheSecurityGroupIngressResponse x
Prelude.Generic)
newRevokeCacheSecurityGroupIngressResponse ::
Prelude.Int ->
RevokeCacheSecurityGroupIngressResponse
newRevokeCacheSecurityGroupIngressResponse :: Int -> RevokeCacheSecurityGroupIngressResponse
newRevokeCacheSecurityGroupIngressResponse
Int
pHttpStatus_ =
RevokeCacheSecurityGroupIngressResponse'
{ $sel:cacheSecurityGroup:RevokeCacheSecurityGroupIngressResponse' :: Maybe CacheSecurityGroup
cacheSecurityGroup =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RevokeCacheSecurityGroupIngressResponse' :: Int
httpStatus = Int
pHttpStatus_
}
revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup :: Lens.Lens' RevokeCacheSecurityGroupIngressResponse (Prelude.Maybe CacheSecurityGroup)
revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup :: Lens'
RevokeCacheSecurityGroupIngressResponse (Maybe CacheSecurityGroup)
revokeCacheSecurityGroupIngressResponse_cacheSecurityGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeCacheSecurityGroupIngressResponse' {Maybe CacheSecurityGroup
cacheSecurityGroup :: Maybe CacheSecurityGroup
$sel:cacheSecurityGroup:RevokeCacheSecurityGroupIngressResponse' :: RevokeCacheSecurityGroupIngressResponse -> Maybe CacheSecurityGroup
cacheSecurityGroup} -> Maybe CacheSecurityGroup
cacheSecurityGroup) (\s :: RevokeCacheSecurityGroupIngressResponse
s@RevokeCacheSecurityGroupIngressResponse' {} Maybe CacheSecurityGroup
a -> RevokeCacheSecurityGroupIngressResponse
s {$sel:cacheSecurityGroup:RevokeCacheSecurityGroupIngressResponse' :: Maybe CacheSecurityGroup
cacheSecurityGroup = Maybe CacheSecurityGroup
a} :: RevokeCacheSecurityGroupIngressResponse)
revokeCacheSecurityGroupIngressResponse_httpStatus :: Lens.Lens' RevokeCacheSecurityGroupIngressResponse Prelude.Int
revokeCacheSecurityGroupIngressResponse_httpStatus :: Lens' RevokeCacheSecurityGroupIngressResponse Int
revokeCacheSecurityGroupIngressResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RevokeCacheSecurityGroupIngressResponse' {Int
httpStatus :: Int
$sel:httpStatus:RevokeCacheSecurityGroupIngressResponse' :: RevokeCacheSecurityGroupIngressResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RevokeCacheSecurityGroupIngressResponse
s@RevokeCacheSecurityGroupIngressResponse' {} Int
a -> RevokeCacheSecurityGroupIngressResponse
s {$sel:httpStatus:RevokeCacheSecurityGroupIngressResponse' :: Int
httpStatus = Int
a} :: RevokeCacheSecurityGroupIngressResponse)
instance
Prelude.NFData
RevokeCacheSecurityGroupIngressResponse
where
rnf :: RevokeCacheSecurityGroupIngressResponse -> ()
rnf RevokeCacheSecurityGroupIngressResponse' {Int
Maybe CacheSecurityGroup
httpStatus :: Int
cacheSecurityGroup :: Maybe CacheSecurityGroup
$sel:httpStatus:RevokeCacheSecurityGroupIngressResponse' :: RevokeCacheSecurityGroupIngressResponse -> Int
$sel:cacheSecurityGroup:RevokeCacheSecurityGroupIngressResponse' :: RevokeCacheSecurityGroupIngressResponse -> Maybe CacheSecurityGroup
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CacheSecurityGroup
cacheSecurityGroup
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus