module Network.AWS.Redshift.AuthorizeClusterSecurityGroupIngress
(
AuthorizeClusterSecurityGroupIngress
, authorizeClusterSecurityGroupIngress
, acsgiCIDRIP
, acsgiClusterSecurityGroupName
, acsgiEC2SecurityGroupName
, acsgiEC2SecurityGroupOwnerId
, AuthorizeClusterSecurityGroupIngressResponse
, authorizeClusterSecurityGroupIngressResponse
, acsgirClusterSecurityGroup
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.Redshift.Types
import qualified GHC.Exts
data AuthorizeClusterSecurityGroupIngress = AuthorizeClusterSecurityGroupIngress
{ _acsgiCIDRIP :: Maybe Text
, _acsgiClusterSecurityGroupName :: Text
, _acsgiEC2SecurityGroupName :: Maybe Text
, _acsgiEC2SecurityGroupOwnerId :: Maybe Text
} deriving (Eq, Ord, Read, Show)
authorizeClusterSecurityGroupIngress :: Text
-> AuthorizeClusterSecurityGroupIngress
authorizeClusterSecurityGroupIngress p1 = AuthorizeClusterSecurityGroupIngress
{ _acsgiClusterSecurityGroupName = p1
, _acsgiCIDRIP = Nothing
, _acsgiEC2SecurityGroupName = Nothing
, _acsgiEC2SecurityGroupOwnerId = Nothing
}
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 })
acsgiEC2SecurityGroupName :: Lens' AuthorizeClusterSecurityGroupIngress (Maybe Text)
acsgiEC2SecurityGroupName =
lens _acsgiEC2SecurityGroupName
(\s a -> s { _acsgiEC2SecurityGroupName = a })
acsgiEC2SecurityGroupOwnerId :: Lens' AuthorizeClusterSecurityGroupIngress (Maybe Text)
acsgiEC2SecurityGroupOwnerId =
lens _acsgiEC2SecurityGroupOwnerId
(\s a -> s { _acsgiEC2SecurityGroupOwnerId = a })
newtype AuthorizeClusterSecurityGroupIngressResponse = AuthorizeClusterSecurityGroupIngressResponse
{ _acsgirClusterSecurityGroup :: Maybe ClusterSecurityGroup
} deriving (Eq, Read, Show)
authorizeClusterSecurityGroupIngressResponse :: AuthorizeClusterSecurityGroupIngressResponse
authorizeClusterSecurityGroupIngressResponse = AuthorizeClusterSecurityGroupIngressResponse
{ _acsgirClusterSecurityGroup = Nothing
}
acsgirClusterSecurityGroup :: Lens' AuthorizeClusterSecurityGroupIngressResponse (Maybe ClusterSecurityGroup)
acsgirClusterSecurityGroup =
lens _acsgirClusterSecurityGroup
(\s a -> s { _acsgirClusterSecurityGroup = a })
instance ToPath AuthorizeClusterSecurityGroupIngress where
toPath = const "/"
instance ToQuery AuthorizeClusterSecurityGroupIngress where
toQuery AuthorizeClusterSecurityGroupIngress{..} = mconcat
[ "CIDRIP" =? _acsgiCIDRIP
, "ClusterSecurityGroupName" =? _acsgiClusterSecurityGroupName
, "EC2SecurityGroupName" =? _acsgiEC2SecurityGroupName
, "EC2SecurityGroupOwnerId" =? _acsgiEC2SecurityGroupOwnerId
]
instance ToHeaders AuthorizeClusterSecurityGroupIngress
instance AWSRequest AuthorizeClusterSecurityGroupIngress where
type Sv AuthorizeClusterSecurityGroupIngress = Redshift
type Rs AuthorizeClusterSecurityGroupIngress = AuthorizeClusterSecurityGroupIngressResponse
request = post "AuthorizeClusterSecurityGroupIngress"
response = xmlResponse
instance FromXML AuthorizeClusterSecurityGroupIngressResponse where
parseXML = withElement "AuthorizeClusterSecurityGroupIngressResult" $ \x -> AuthorizeClusterSecurityGroupIngressResponse
<$> x .@? "ClusterSecurityGroup"