module Network.AWS.ELB.SetLoadBalancerPoliciesForBackendServer
(
setLoadBalancerPoliciesForBackendServer
, SetLoadBalancerPoliciesForBackendServer
, slbpfbsLoadBalancerName
, slbpfbsInstancePort
, slbpfbsPolicyNames
, setLoadBalancerPoliciesForBackendServerResponse
, SetLoadBalancerPoliciesForBackendServerResponse
, slbpfbsrsStatus
) where
import Network.AWS.ELB.Types
import Network.AWS.ELB.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data SetLoadBalancerPoliciesForBackendServer = SetLoadBalancerPoliciesForBackendServer'
{ _slbpfbsLoadBalancerName :: !Text
, _slbpfbsInstancePort :: !Int
, _slbpfbsPolicyNames :: ![Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
setLoadBalancerPoliciesForBackendServer
:: Text
-> Int
-> SetLoadBalancerPoliciesForBackendServer
setLoadBalancerPoliciesForBackendServer pLoadBalancerName_ pInstancePort_ =
SetLoadBalancerPoliciesForBackendServer'
{ _slbpfbsLoadBalancerName = pLoadBalancerName_
, _slbpfbsInstancePort = pInstancePort_
, _slbpfbsPolicyNames = mempty
}
slbpfbsLoadBalancerName :: Lens' SetLoadBalancerPoliciesForBackendServer Text
slbpfbsLoadBalancerName = lens _slbpfbsLoadBalancerName (\ s a -> s{_slbpfbsLoadBalancerName = a});
slbpfbsInstancePort :: Lens' SetLoadBalancerPoliciesForBackendServer Int
slbpfbsInstancePort = lens _slbpfbsInstancePort (\ s a -> s{_slbpfbsInstancePort = a});
slbpfbsPolicyNames :: Lens' SetLoadBalancerPoliciesForBackendServer [Text]
slbpfbsPolicyNames = lens _slbpfbsPolicyNames (\ s a -> s{_slbpfbsPolicyNames = a}) . _Coerce;
instance AWSRequest
SetLoadBalancerPoliciesForBackendServer where
type Rs SetLoadBalancerPoliciesForBackendServer =
SetLoadBalancerPoliciesForBackendServerResponse
request = postQuery eLB
response
= receiveXMLWrapper
"SetLoadBalancerPoliciesForBackendServerResult"
(\ s h x ->
SetLoadBalancerPoliciesForBackendServerResponse' <$>
(pure (fromEnum s)))
instance ToHeaders
SetLoadBalancerPoliciesForBackendServer where
toHeaders = const mempty
instance ToPath
SetLoadBalancerPoliciesForBackendServer where
toPath = const "/"
instance ToQuery
SetLoadBalancerPoliciesForBackendServer where
toQuery SetLoadBalancerPoliciesForBackendServer'{..}
= mconcat
["Action" =:
("SetLoadBalancerPoliciesForBackendServer" ::
ByteString),
"Version" =: ("2012-06-01" :: ByteString),
"LoadBalancerName" =: _slbpfbsLoadBalancerName,
"InstancePort" =: _slbpfbsInstancePort,
"PolicyNames" =:
toQueryList "member" _slbpfbsPolicyNames]
newtype SetLoadBalancerPoliciesForBackendServerResponse = SetLoadBalancerPoliciesForBackendServerResponse'
{ _slbpfbsrsStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
setLoadBalancerPoliciesForBackendServerResponse
:: Int
-> SetLoadBalancerPoliciesForBackendServerResponse
setLoadBalancerPoliciesForBackendServerResponse pStatus_ =
SetLoadBalancerPoliciesForBackendServerResponse'
{ _slbpfbsrsStatus = pStatus_
}
slbpfbsrsStatus :: Lens' SetLoadBalancerPoliciesForBackendServerResponse Int
slbpfbsrsStatus = lens _slbpfbsrsStatus (\ s a -> s{_slbpfbsrsStatus = a});