{-# 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.EC2.UpdateSecurityGroupRuleDescriptionsEgress
(
updateSecurityGroupRuleDescriptionsEgress
, UpdateSecurityGroupRuleDescriptionsEgress
, usgrdeGroupId
, usgrdeGroupName
, usgrdeDryRun
, usgrdeIPPermissions
, updateSecurityGroupRuleDescriptionsEgressResponse
, UpdateSecurityGroupRuleDescriptionsEgressResponse
, usgrdersReturn
, usgrdersResponseStatus
) where
import Network.AWS.EC2.Types
import Network.AWS.EC2.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateSecurityGroupRuleDescriptionsEgress = UpdateSecurityGroupRuleDescriptionsEgress'
{ _usgrdeGroupId :: !(Maybe Text)
, _usgrdeGroupName :: !(Maybe Text)
, _usgrdeDryRun :: !(Maybe Bool)
, _usgrdeIPPermissions :: ![IPPermission]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateSecurityGroupRuleDescriptionsEgress
:: UpdateSecurityGroupRuleDescriptionsEgress
updateSecurityGroupRuleDescriptionsEgress =
UpdateSecurityGroupRuleDescriptionsEgress'
{ _usgrdeGroupId = Nothing
, _usgrdeGroupName = Nothing
, _usgrdeDryRun = Nothing
, _usgrdeIPPermissions = mempty
}
usgrdeGroupId :: Lens' UpdateSecurityGroupRuleDescriptionsEgress (Maybe Text)
usgrdeGroupId = lens _usgrdeGroupId (\ s a -> s{_usgrdeGroupId = a})
usgrdeGroupName :: Lens' UpdateSecurityGroupRuleDescriptionsEgress (Maybe Text)
usgrdeGroupName = lens _usgrdeGroupName (\ s a -> s{_usgrdeGroupName = a})
usgrdeDryRun :: Lens' UpdateSecurityGroupRuleDescriptionsEgress (Maybe Bool)
usgrdeDryRun = lens _usgrdeDryRun (\ s a -> s{_usgrdeDryRun = a})
usgrdeIPPermissions :: Lens' UpdateSecurityGroupRuleDescriptionsEgress [IPPermission]
usgrdeIPPermissions = lens _usgrdeIPPermissions (\ s a -> s{_usgrdeIPPermissions = a}) . _Coerce
instance AWSRequest
UpdateSecurityGroupRuleDescriptionsEgress
where
type Rs UpdateSecurityGroupRuleDescriptionsEgress =
UpdateSecurityGroupRuleDescriptionsEgressResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
UpdateSecurityGroupRuleDescriptionsEgressResponse'
<$> (x .@? "return") <*> (pure (fromEnum s)))
instance Hashable
UpdateSecurityGroupRuleDescriptionsEgress
where
instance NFData
UpdateSecurityGroupRuleDescriptionsEgress
where
instance ToHeaders
UpdateSecurityGroupRuleDescriptionsEgress
where
toHeaders = const mempty
instance ToPath
UpdateSecurityGroupRuleDescriptionsEgress
where
toPath = const "/"
instance ToQuery
UpdateSecurityGroupRuleDescriptionsEgress
where
toQuery
UpdateSecurityGroupRuleDescriptionsEgress'{..}
= mconcat
["Action" =:
("UpdateSecurityGroupRuleDescriptionsEgress" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"GroupId" =: _usgrdeGroupId,
"GroupName" =: _usgrdeGroupName,
"DryRun" =: _usgrdeDryRun,
toQueryList "IpPermissions" _usgrdeIPPermissions]
data UpdateSecurityGroupRuleDescriptionsEgressResponse = UpdateSecurityGroupRuleDescriptionsEgressResponse'
{ _usgrdersReturn :: !(Maybe Bool)
, _usgrdersResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateSecurityGroupRuleDescriptionsEgressResponse
:: Int
-> UpdateSecurityGroupRuleDescriptionsEgressResponse
updateSecurityGroupRuleDescriptionsEgressResponse pResponseStatus_ =
UpdateSecurityGroupRuleDescriptionsEgressResponse'
{_usgrdersReturn = Nothing, _usgrdersResponseStatus = pResponseStatus_}
usgrdersReturn :: Lens' UpdateSecurityGroupRuleDescriptionsEgressResponse (Maybe Bool)
usgrdersReturn = lens _usgrdersReturn (\ s a -> s{_usgrdersReturn = a})
usgrdersResponseStatus :: Lens' UpdateSecurityGroupRuleDescriptionsEgressResponse Int
usgrdersResponseStatus = lens _usgrdersResponseStatus (\ s a -> s{_usgrdersResponseStatus = a})
instance NFData
UpdateSecurityGroupRuleDescriptionsEgressResponse
where