module Network.AWS.EC2.AuthorizeSecurityGroupEgress
(
AuthorizeSecurityGroupEgress
, authorizeSecurityGroupEgress
, asgeCidrIp
, asgeDryRun
, asgeFromPort
, asgeGroupId
, asgeIpPermissions
, asgeIpProtocol
, asgeSourceSecurityGroupName
, asgeSourceSecurityGroupOwnerId
, asgeToPort
, AuthorizeSecurityGroupEgressResponse
, authorizeSecurityGroupEgressResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.EC2.Types
import qualified GHC.Exts
data AuthorizeSecurityGroupEgress = AuthorizeSecurityGroupEgress
{ _asgeCidrIp :: Maybe Text
, _asgeDryRun :: Maybe Bool
, _asgeFromPort :: Maybe Int
, _asgeGroupId :: Text
, _asgeIpPermissions :: List "item" IpPermission
, _asgeIpProtocol :: Maybe Text
, _asgeSourceSecurityGroupName :: Maybe Text
, _asgeSourceSecurityGroupOwnerId :: Maybe Text
, _asgeToPort :: Maybe Int
} deriving (Eq, Show)
authorizeSecurityGroupEgress :: Text
-> AuthorizeSecurityGroupEgress
authorizeSecurityGroupEgress p1 = AuthorizeSecurityGroupEgress
{ _asgeGroupId = p1
, _asgeDryRun = Nothing
, _asgeSourceSecurityGroupName = Nothing
, _asgeSourceSecurityGroupOwnerId = Nothing
, _asgeIpProtocol = Nothing
, _asgeFromPort = Nothing
, _asgeToPort = Nothing
, _asgeCidrIp = Nothing
, _asgeIpPermissions = mempty
}
asgeCidrIp :: Lens' AuthorizeSecurityGroupEgress (Maybe Text)
asgeCidrIp = lens _asgeCidrIp (\s a -> s { _asgeCidrIp = a })
asgeDryRun :: Lens' AuthorizeSecurityGroupEgress (Maybe Bool)
asgeDryRun = lens _asgeDryRun (\s a -> s { _asgeDryRun = a })
asgeFromPort :: Lens' AuthorizeSecurityGroupEgress (Maybe Int)
asgeFromPort = lens _asgeFromPort (\s a -> s { _asgeFromPort = a })
asgeGroupId :: Lens' AuthorizeSecurityGroupEgress Text
asgeGroupId = lens _asgeGroupId (\s a -> s { _asgeGroupId = a })
asgeIpPermissions :: Lens' AuthorizeSecurityGroupEgress [IpPermission]
asgeIpPermissions =
lens _asgeIpPermissions (\s a -> s { _asgeIpPermissions = a })
. _List
asgeIpProtocol :: Lens' AuthorizeSecurityGroupEgress (Maybe Text)
asgeIpProtocol = lens _asgeIpProtocol (\s a -> s { _asgeIpProtocol = a })
asgeSourceSecurityGroupName :: Lens' AuthorizeSecurityGroupEgress (Maybe Text)
asgeSourceSecurityGroupName =
lens _asgeSourceSecurityGroupName
(\s a -> s { _asgeSourceSecurityGroupName = a })
asgeSourceSecurityGroupOwnerId :: Lens' AuthorizeSecurityGroupEgress (Maybe Text)
asgeSourceSecurityGroupOwnerId =
lens _asgeSourceSecurityGroupOwnerId
(\s a -> s { _asgeSourceSecurityGroupOwnerId = a })
asgeToPort :: Lens' AuthorizeSecurityGroupEgress (Maybe Int)
asgeToPort = lens _asgeToPort (\s a -> s { _asgeToPort = a })
data AuthorizeSecurityGroupEgressResponse = AuthorizeSecurityGroupEgressResponse
deriving (Eq, Ord, Show, Generic)
authorizeSecurityGroupEgressResponse :: AuthorizeSecurityGroupEgressResponse
authorizeSecurityGroupEgressResponse = AuthorizeSecurityGroupEgressResponse
instance ToPath AuthorizeSecurityGroupEgress where
toPath = const "/"
instance ToQuery AuthorizeSecurityGroupEgress where
toQuery AuthorizeSecurityGroupEgress{..} = mconcat
[ "cidrIp" =? _asgeCidrIp
, "dryRun" =? _asgeDryRun
, "fromPort" =? _asgeFromPort
, "groupId" =? _asgeGroupId
, "ipPermissions" =? _asgeIpPermissions
, "ipProtocol" =? _asgeIpProtocol
, "sourceSecurityGroupName" =? _asgeSourceSecurityGroupName
, "sourceSecurityGroupOwnerId" =? _asgeSourceSecurityGroupOwnerId
, "toPort" =? _asgeToPort
]
instance ToHeaders AuthorizeSecurityGroupEgress
instance AWSRequest AuthorizeSecurityGroupEgress where
type Sv AuthorizeSecurityGroupEgress = EC2
type Rs AuthorizeSecurityGroupEgress = AuthorizeSecurityGroupEgressResponse
request = post "AuthorizeSecurityGroupEgress"
response = nullResponse AuthorizeSecurityGroupEgressResponse