module Network.AWS.ElastiCache.AuthorizeCacheSecurityGroupIngress
(
authorizeCacheSecurityGroupIngress
, AuthorizeCacheSecurityGroupIngress
, acsgiCacheSecurityGroupName
, acsgiEC2SecurityGroupName
, acsgiEC2SecurityGroupOwnerId
, authorizeCacheSecurityGroupIngressResponse
, AuthorizeCacheSecurityGroupIngressResponse
, acsgirsCacheSecurityGroup
, acsgirsStatus
) where
import Network.AWS.ElastiCache.Types
import Network.AWS.ElastiCache.Types.Product
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 Sv AuthorizeCacheSecurityGroupIngress =
ElastiCache
type Rs AuthorizeCacheSecurityGroupIngress =
AuthorizeCacheSecurityGroupIngressResponse
request = postQuery
response
= receiveXMLWrapper
"AuthorizeCacheSecurityGroupIngressResult"
(\ s h x ->
AuthorizeCacheSecurityGroupIngressResponse' <$>
(x .@? "CacheSecurityGroup") <*> (pure (fromEnum s)))
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)
, _acsgirsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
authorizeCacheSecurityGroupIngressResponse
:: Int
-> AuthorizeCacheSecurityGroupIngressResponse
authorizeCacheSecurityGroupIngressResponse pStatus_ =
AuthorizeCacheSecurityGroupIngressResponse'
{ _acsgirsCacheSecurityGroup = Nothing
, _acsgirsStatus = pStatus_
}
acsgirsCacheSecurityGroup :: Lens' AuthorizeCacheSecurityGroupIngressResponse (Maybe CacheSecurityGroup)
acsgirsCacheSecurityGroup = lens _acsgirsCacheSecurityGroup (\ s a -> s{_acsgirsCacheSecurityGroup = a});
acsgirsStatus :: Lens' AuthorizeCacheSecurityGroupIngressResponse Int
acsgirsStatus = lens _acsgirsStatus (\ s a -> s{_acsgirsStatus = a});