{-# 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.UpdateSecurityGroupRuleDescriptionsIngress
(
updateSecurityGroupRuleDescriptionsIngress
, UpdateSecurityGroupRuleDescriptionsIngress
, usgrdiGroupId
, usgrdiGroupName
, usgrdiDryRun
, usgrdiIPPermissions
, updateSecurityGroupRuleDescriptionsIngressResponse
, UpdateSecurityGroupRuleDescriptionsIngressResponse
, usgrdirsReturn
, usgrdirsResponseStatus
) 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 UpdateSecurityGroupRuleDescriptionsIngress = UpdateSecurityGroupRuleDescriptionsIngress'
{ _usgrdiGroupId :: !(Maybe Text)
, _usgrdiGroupName :: !(Maybe Text)
, _usgrdiDryRun :: !(Maybe Bool)
, _usgrdiIPPermissions :: ![IPPermission]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateSecurityGroupRuleDescriptionsIngress
:: UpdateSecurityGroupRuleDescriptionsIngress
updateSecurityGroupRuleDescriptionsIngress =
UpdateSecurityGroupRuleDescriptionsIngress'
{ _usgrdiGroupId = Nothing
, _usgrdiGroupName = Nothing
, _usgrdiDryRun = Nothing
, _usgrdiIPPermissions = mempty
}
usgrdiGroupId :: Lens' UpdateSecurityGroupRuleDescriptionsIngress (Maybe Text)
usgrdiGroupId = lens _usgrdiGroupId (\ s a -> s{_usgrdiGroupId = a})
usgrdiGroupName :: Lens' UpdateSecurityGroupRuleDescriptionsIngress (Maybe Text)
usgrdiGroupName = lens _usgrdiGroupName (\ s a -> s{_usgrdiGroupName = a})
usgrdiDryRun :: Lens' UpdateSecurityGroupRuleDescriptionsIngress (Maybe Bool)
usgrdiDryRun = lens _usgrdiDryRun (\ s a -> s{_usgrdiDryRun = a})
usgrdiIPPermissions :: Lens' UpdateSecurityGroupRuleDescriptionsIngress [IPPermission]
usgrdiIPPermissions = lens _usgrdiIPPermissions (\ s a -> s{_usgrdiIPPermissions = a}) . _Coerce
instance AWSRequest
UpdateSecurityGroupRuleDescriptionsIngress
where
type Rs UpdateSecurityGroupRuleDescriptionsIngress =
UpdateSecurityGroupRuleDescriptionsIngressResponse
request = postQuery ec2
response
= receiveXML
(\ s h x ->
UpdateSecurityGroupRuleDescriptionsIngressResponse'
<$> (x .@? "return") <*> (pure (fromEnum s)))
instance Hashable
UpdateSecurityGroupRuleDescriptionsIngress
where
instance NFData
UpdateSecurityGroupRuleDescriptionsIngress
where
instance ToHeaders
UpdateSecurityGroupRuleDescriptionsIngress
where
toHeaders = const mempty
instance ToPath
UpdateSecurityGroupRuleDescriptionsIngress
where
toPath = const "/"
instance ToQuery
UpdateSecurityGroupRuleDescriptionsIngress
where
toQuery
UpdateSecurityGroupRuleDescriptionsIngress'{..}
= mconcat
["Action" =:
("UpdateSecurityGroupRuleDescriptionsIngress" ::
ByteString),
"Version" =: ("2016-11-15" :: ByteString),
"GroupId" =: _usgrdiGroupId,
"GroupName" =: _usgrdiGroupName,
"DryRun" =: _usgrdiDryRun,
toQueryList "IpPermissions" _usgrdiIPPermissions]
data UpdateSecurityGroupRuleDescriptionsIngressResponse = UpdateSecurityGroupRuleDescriptionsIngressResponse'
{ _usgrdirsReturn :: !(Maybe Bool)
, _usgrdirsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateSecurityGroupRuleDescriptionsIngressResponse
:: Int
-> UpdateSecurityGroupRuleDescriptionsIngressResponse
updateSecurityGroupRuleDescriptionsIngressResponse pResponseStatus_ =
UpdateSecurityGroupRuleDescriptionsIngressResponse'
{_usgrdirsReturn = Nothing, _usgrdirsResponseStatus = pResponseStatus_}
usgrdirsReturn :: Lens' UpdateSecurityGroupRuleDescriptionsIngressResponse (Maybe Bool)
usgrdirsReturn = lens _usgrdirsReturn (\ s a -> s{_usgrdirsReturn = a})
usgrdirsResponseStatus :: Lens' UpdateSecurityGroupRuleDescriptionsIngressResponse Int
usgrdirsResponseStatus = lens _usgrdirsResponseStatus (\ s a -> s{_usgrdirsResponseStatus = a})
instance NFData
UpdateSecurityGroupRuleDescriptionsIngressResponse
where