{-# 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.Redshift.AuthorizeClusterSecurityGroupIngress
(
authorizeClusterSecurityGroupIngress
, AuthorizeClusterSecurityGroupIngress
, acsgiEC2SecurityGroupOwnerId
, acsgiEC2SecurityGroupName
, acsgiCIdRIP
, acsgiClusterSecurityGroupName
, authorizeClusterSecurityGroupIngressResponse
, AuthorizeClusterSecurityGroupIngressResponse
, acsgirsClusterSecurityGroup
, acsgirsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Redshift.Types
import Network.AWS.Redshift.Types.Product
import Network.AWS.Request
import Network.AWS.Response
data AuthorizeClusterSecurityGroupIngress = AuthorizeClusterSecurityGroupIngress'
{ _acsgiEC2SecurityGroupOwnerId :: !(Maybe Text)
, _acsgiEC2SecurityGroupName :: !(Maybe Text)
, _acsgiCIdRIP :: !(Maybe Text)
, _acsgiClusterSecurityGroupName :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
authorizeClusterSecurityGroupIngress
:: Text
-> AuthorizeClusterSecurityGroupIngress
authorizeClusterSecurityGroupIngress pClusterSecurityGroupName_ =
AuthorizeClusterSecurityGroupIngress'
{ _acsgiEC2SecurityGroupOwnerId = Nothing
, _acsgiEC2SecurityGroupName = Nothing
, _acsgiCIdRIP = Nothing
, _acsgiClusterSecurityGroupName = pClusterSecurityGroupName_
}
acsgiEC2SecurityGroupOwnerId :: Lens' AuthorizeClusterSecurityGroupIngress (Maybe Text)
acsgiEC2SecurityGroupOwnerId = lens _acsgiEC2SecurityGroupOwnerId (\ s a -> s{_acsgiEC2SecurityGroupOwnerId = a})
acsgiEC2SecurityGroupName :: Lens' AuthorizeClusterSecurityGroupIngress (Maybe Text)
acsgiEC2SecurityGroupName = lens _acsgiEC2SecurityGroupName (\ s a -> s{_acsgiEC2SecurityGroupName = a})
acsgiCIdRIP :: Lens' AuthorizeClusterSecurityGroupIngress (Maybe Text)
acsgiCIdRIP = lens _acsgiCIdRIP (\ s a -> s{_acsgiCIdRIP = a})
acsgiClusterSecurityGroupName :: Lens' AuthorizeClusterSecurityGroupIngress Text
acsgiClusterSecurityGroupName = lens _acsgiClusterSecurityGroupName (\ s a -> s{_acsgiClusterSecurityGroupName = a})
instance AWSRequest
AuthorizeClusterSecurityGroupIngress
where
type Rs AuthorizeClusterSecurityGroupIngress =
AuthorizeClusterSecurityGroupIngressResponse
request = postQuery redshift
response
= receiveXMLWrapper
"AuthorizeClusterSecurityGroupIngressResult"
(\ s h x ->
AuthorizeClusterSecurityGroupIngressResponse' <$>
(x .@? "ClusterSecurityGroup") <*>
(pure (fromEnum s)))
instance Hashable
AuthorizeClusterSecurityGroupIngress
where
instance NFData AuthorizeClusterSecurityGroupIngress
where
instance ToHeaders
AuthorizeClusterSecurityGroupIngress
where
toHeaders = const mempty
instance ToPath AuthorizeClusterSecurityGroupIngress
where
toPath = const "/"
instance ToQuery AuthorizeClusterSecurityGroupIngress
where
toQuery AuthorizeClusterSecurityGroupIngress'{..}
= mconcat
["Action" =:
("AuthorizeClusterSecurityGroupIngress" ::
ByteString),
"Version" =: ("2012-12-01" :: ByteString),
"EC2SecurityGroupOwnerId" =:
_acsgiEC2SecurityGroupOwnerId,
"EC2SecurityGroupName" =: _acsgiEC2SecurityGroupName,
"CIDRIP" =: _acsgiCIdRIP,
"ClusterSecurityGroupName" =:
_acsgiClusterSecurityGroupName]
data AuthorizeClusterSecurityGroupIngressResponse = AuthorizeClusterSecurityGroupIngressResponse'
{ _acsgirsClusterSecurityGroup :: !(Maybe ClusterSecurityGroup)
, _acsgirsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
authorizeClusterSecurityGroupIngressResponse
:: Int
-> AuthorizeClusterSecurityGroupIngressResponse
authorizeClusterSecurityGroupIngressResponse pResponseStatus_ =
AuthorizeClusterSecurityGroupIngressResponse'
{ _acsgirsClusterSecurityGroup = Nothing
, _acsgirsResponseStatus = pResponseStatus_
}
acsgirsClusterSecurityGroup :: Lens' AuthorizeClusterSecurityGroupIngressResponse (Maybe ClusterSecurityGroup)
acsgirsClusterSecurityGroup = lens _acsgirsClusterSecurityGroup (\ s a -> s{_acsgirsClusterSecurityGroup = a})
acsgirsResponseStatus :: Lens' AuthorizeClusterSecurityGroupIngressResponse Int
acsgirsResponseStatus = lens _acsgirsResponseStatus (\ s a -> s{_acsgirsResponseStatus = a})
instance NFData
AuthorizeClusterSecurityGroupIngressResponse
where