module Network.AWS.Redshift.AuthorizeClusterSecurityGroupIngress
(
authorizeClusterSecurityGroupIngress
, AuthorizeClusterSecurityGroupIngress
, acsgiEC2SecurityGroupOwnerId
, acsgiEC2SecurityGroupName
, acsgiCIdRIP
, acsgiClusterSecurityGroupName
, authorizeClusterSecurityGroupIngressResponse
, AuthorizeClusterSecurityGroupIngressResponse
, acsgirsClusterSecurityGroup
, acsgirsStatus
) where
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 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)
, _acsgirsStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
authorizeClusterSecurityGroupIngressResponse
:: Int
-> AuthorizeClusterSecurityGroupIngressResponse
authorizeClusterSecurityGroupIngressResponse pStatus_ =
AuthorizeClusterSecurityGroupIngressResponse'
{ _acsgirsClusterSecurityGroup = Nothing
, _acsgirsStatus = pStatus_
}
acsgirsClusterSecurityGroup :: Lens' AuthorizeClusterSecurityGroupIngressResponse (Maybe ClusterSecurityGroup)
acsgirsClusterSecurityGroup = lens _acsgirsClusterSecurityGroup (\ s a -> s{_acsgirsClusterSecurityGroup = a});
acsgirsStatus :: Lens' AuthorizeClusterSecurityGroupIngressResponse Int
acsgirsStatus = lens _acsgirsStatus (\ s a -> s{_acsgirsStatus = a});