{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.ElastiCache.AuthorizeCacheSecurityGroupIngress
(
authorizeCacheSecurityGroupIngress
, AuthorizeCacheSecurityGroupIngress
, acsgiCacheSecurityGroupName
, acsgiEC2SecurityGroupName
, acsgiEC2SecurityGroupOwnerId
, authorizeCacheSecurityGroupIngressResponse
, AuthorizeCacheSecurityGroupIngressResponse
, acsgirsCacheSecurityGroup
, acsgirsResponseStatus
) where
import Network.AWS.ElastiCache.Types
import Network.AWS.ElastiCache.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data AuthorizeCacheSecurityGroupIngress = AuthorizeCacheSecurityGroupIngress'
{ _acsgiCacheSecurityGroupName :: !Text
, _acsgiEC2SecurityGroupName :: !Text
, _acsgiEC2SecurityGroupOwnerId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
authorizeCacheSecurityGroupIngress
:: Text
-> Text
-> Text
-> AuthorizeCacheSecurityGroupIngress
authorizeCacheSecurityGroupIngress pCacheSecurityGroupName_ pEC2SecurityGroupName_ pEC2SecurityGroupOwnerId_ =
AuthorizeCacheSecurityGroupIngress'
{ _acsgiCacheSecurityGroupName = pCacheSecurityGroupName_
, _acsgiEC2SecurityGroupName = pEC2SecurityGroupName_
, _acsgiEC2SecurityGroupOwnerId = pEC2SecurityGroupOwnerId_
}
acsgiCacheSecurityGroupName :: Lens' AuthorizeCacheSecurityGroupIngress Text
acsgiCacheSecurityGroupName = lens _acsgiCacheSecurityGroupName (\ s a -> s{_acsgiCacheSecurityGroupName = a})
acsgiEC2SecurityGroupName :: Lens' AuthorizeCacheSecurityGroupIngress Text
acsgiEC2SecurityGroupName = lens _acsgiEC2SecurityGroupName (\ s a -> s{_acsgiEC2SecurityGroupName = a})
acsgiEC2SecurityGroupOwnerId :: Lens' AuthorizeCacheSecurityGroupIngress Text
acsgiEC2SecurityGroupOwnerId = lens _acsgiEC2SecurityGroupOwnerId (\ s a -> s{_acsgiEC2SecurityGroupOwnerId = a})
instance AWSRequest
AuthorizeCacheSecurityGroupIngress
where
type Rs AuthorizeCacheSecurityGroupIngress =
AuthorizeCacheSecurityGroupIngressResponse
request = postQuery elastiCache
response
= receiveXMLWrapper
"AuthorizeCacheSecurityGroupIngressResult"
(\ s h x ->
AuthorizeCacheSecurityGroupIngressResponse' <$>
(x .@? "CacheSecurityGroup") <*> (pure (fromEnum s)))
instance Hashable AuthorizeCacheSecurityGroupIngress
where
instance NFData AuthorizeCacheSecurityGroupIngress
where
instance ToHeaders AuthorizeCacheSecurityGroupIngress
where
toHeaders = const mempty
instance ToPath AuthorizeCacheSecurityGroupIngress
where
toPath = const "/"
instance ToQuery AuthorizeCacheSecurityGroupIngress
where
toQuery AuthorizeCacheSecurityGroupIngress'{..}
= mconcat
["Action" =:
("AuthorizeCacheSecurityGroupIngress" :: ByteString),
"Version" =: ("2015-02-02" :: ByteString),
"CacheSecurityGroupName" =:
_acsgiCacheSecurityGroupName,
"EC2SecurityGroupName" =: _acsgiEC2SecurityGroupName,
"EC2SecurityGroupOwnerId" =:
_acsgiEC2SecurityGroupOwnerId]
data AuthorizeCacheSecurityGroupIngressResponse = AuthorizeCacheSecurityGroupIngressResponse'
{ _acsgirsCacheSecurityGroup :: !(Maybe CacheSecurityGroup)
, _acsgirsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
authorizeCacheSecurityGroupIngressResponse
:: Int
-> AuthorizeCacheSecurityGroupIngressResponse
authorizeCacheSecurityGroupIngressResponse pResponseStatus_ =
AuthorizeCacheSecurityGroupIngressResponse'
{ _acsgirsCacheSecurityGroup = Nothing
, _acsgirsResponseStatus = pResponseStatus_
}
acsgirsCacheSecurityGroup :: Lens' AuthorizeCacheSecurityGroupIngressResponse (Maybe CacheSecurityGroup)
acsgirsCacheSecurityGroup = lens _acsgirsCacheSecurityGroup (\ s a -> s{_acsgirsCacheSecurityGroup = a})
acsgirsResponseStatus :: Lens' AuthorizeCacheSecurityGroupIngressResponse Int
acsgirsResponseStatus = lens _acsgirsResponseStatus (\ s a -> s{_acsgirsResponseStatus = a})
instance NFData
AuthorizeCacheSecurityGroupIngressResponse
where