module Network.AWS.EC2.AuthorizeSecurityGroupIngress
(
AuthorizeSecurityGroupIngress
, authorizeSecurityGroupIngress
, asgiCidrIp
, asgiDryRun
, asgiFromPort
, asgiGroupId
, asgiGroupName
, asgiIpPermissions
, asgiIpProtocol
, asgiSourceSecurityGroupName
, asgiSourceSecurityGroupOwnerId
, asgiToPort
, AuthorizeSecurityGroupIngressResponse
, authorizeSecurityGroupIngressResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data AuthorizeSecurityGroupIngress = AuthorizeSecurityGroupIngress
{ _asgiCidrIp :: Maybe Text
, _asgiDryRun :: Maybe Bool
, _asgiFromPort :: Maybe Int
, _asgiGroupId :: Maybe Text
, _asgiGroupName :: Maybe Text
, _asgiIpPermissions :: List "item" IpPermission
, _asgiIpProtocol :: Maybe Text
, _asgiSourceSecurityGroupName :: Maybe Text
, _asgiSourceSecurityGroupOwnerId :: Maybe Text
, _asgiToPort :: Maybe Int
} deriving (Eq, Show)
authorizeSecurityGroupIngress :: AuthorizeSecurityGroupIngress
authorizeSecurityGroupIngress = AuthorizeSecurityGroupIngress
{ _asgiDryRun = Nothing
, _asgiGroupName = Nothing
, _asgiGroupId = Nothing
, _asgiSourceSecurityGroupName = Nothing
, _asgiSourceSecurityGroupOwnerId = Nothing
, _asgiIpProtocol = Nothing
, _asgiFromPort = Nothing
, _asgiToPort = Nothing
, _asgiCidrIp = Nothing
, _asgiIpPermissions = mempty
}
asgiCidrIp :: Lens' AuthorizeSecurityGroupIngress (Maybe Text)
asgiCidrIp = lens _asgiCidrIp (\s a -> s { _asgiCidrIp = a })
asgiDryRun :: Lens' AuthorizeSecurityGroupIngress (Maybe Bool)
asgiDryRun = lens _asgiDryRun (\s a -> s { _asgiDryRun = a })
asgiFromPort :: Lens' AuthorizeSecurityGroupIngress (Maybe Int)
asgiFromPort = lens _asgiFromPort (\s a -> s { _asgiFromPort = a })
asgiGroupId :: Lens' AuthorizeSecurityGroupIngress (Maybe Text)
asgiGroupId = lens _asgiGroupId (\s a -> s { _asgiGroupId = a })
asgiGroupName :: Lens' AuthorizeSecurityGroupIngress (Maybe Text)
asgiGroupName = lens _asgiGroupName (\s a -> s { _asgiGroupName = a })
asgiIpPermissions :: Lens' AuthorizeSecurityGroupIngress [IpPermission]
asgiIpPermissions =
lens _asgiIpPermissions (\s a -> s { _asgiIpPermissions = a })
. _List
asgiIpProtocol :: Lens' AuthorizeSecurityGroupIngress (Maybe Text)
asgiIpProtocol = lens _asgiIpProtocol (\s a -> s { _asgiIpProtocol = a })
asgiSourceSecurityGroupName :: Lens' AuthorizeSecurityGroupIngress (Maybe Text)
asgiSourceSecurityGroupName =
lens _asgiSourceSecurityGroupName
(\s a -> s { _asgiSourceSecurityGroupName = a })
asgiSourceSecurityGroupOwnerId :: Lens' AuthorizeSecurityGroupIngress (Maybe Text)
asgiSourceSecurityGroupOwnerId =
lens _asgiSourceSecurityGroupOwnerId
(\s a -> s { _asgiSourceSecurityGroupOwnerId = a })
asgiToPort :: Lens' AuthorizeSecurityGroupIngress (Maybe Int)
asgiToPort = lens _asgiToPort (\s a -> s { _asgiToPort = a })
data AuthorizeSecurityGroupIngressResponse = AuthorizeSecurityGroupIngressResponse
deriving (Eq, Ord, Show, Generic)
authorizeSecurityGroupIngressResponse :: AuthorizeSecurityGroupIngressResponse
authorizeSecurityGroupIngressResponse = AuthorizeSecurityGroupIngressResponse
instance ToPath AuthorizeSecurityGroupIngress where
toPath = const "/"
instance ToQuery AuthorizeSecurityGroupIngress where
toQuery AuthorizeSecurityGroupIngress{..} = mconcat
[ "CidrIp" =? _asgiCidrIp
, "dryRun" =? _asgiDryRun
, "FromPort" =? _asgiFromPort
, "GroupId" =? _asgiGroupId
, "GroupName" =? _asgiGroupName
, "IpPermissions" `toQueryList` _asgiIpPermissions
, "IpProtocol" =? _asgiIpProtocol
, "SourceSecurityGroupName" =? _asgiSourceSecurityGroupName
, "SourceSecurityGroupOwnerId" =? _asgiSourceSecurityGroupOwnerId
, "ToPort" =? _asgiToPort
]
instance ToHeaders AuthorizeSecurityGroupIngress
instance AWSRequest AuthorizeSecurityGroupIngress where
type Sv AuthorizeSecurityGroupIngress = EC2
type Rs AuthorizeSecurityGroupIngress = AuthorizeSecurityGroupIngressResponse
request = post "AuthorizeSecurityGroupIngress"
response = nullResponse AuthorizeSecurityGroupIngressResponse