module Network.AWS.AutoScaling.SetDesiredCapacity
(
setDesiredCapacity
, SetDesiredCapacity
, sdcHonorCooldown
, sdcAutoScalingGroupName
, sdcDesiredCapacity
, setDesiredCapacityResponse
, SetDesiredCapacityResponse
) where
import Network.AWS.AutoScaling.Types
import Network.AWS.AutoScaling.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data SetDesiredCapacity = SetDesiredCapacity'
{ _sdcHonorCooldown :: !(Maybe Bool)
, _sdcAutoScalingGroupName :: !Text
, _sdcDesiredCapacity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
setDesiredCapacity
:: Text
-> Int
-> SetDesiredCapacity
setDesiredCapacity pAutoScalingGroupName_ pDesiredCapacity_ =
SetDesiredCapacity'
{ _sdcHonorCooldown = Nothing
, _sdcAutoScalingGroupName = pAutoScalingGroupName_
, _sdcDesiredCapacity = pDesiredCapacity_
}
sdcHonorCooldown :: Lens' SetDesiredCapacity (Maybe Bool)
sdcHonorCooldown = lens _sdcHonorCooldown (\ s a -> s{_sdcHonorCooldown = a});
sdcAutoScalingGroupName :: Lens' SetDesiredCapacity Text
sdcAutoScalingGroupName = lens _sdcAutoScalingGroupName (\ s a -> s{_sdcAutoScalingGroupName = a});
sdcDesiredCapacity :: Lens' SetDesiredCapacity Int
sdcDesiredCapacity = lens _sdcDesiredCapacity (\ s a -> s{_sdcDesiredCapacity = a});
instance AWSRequest SetDesiredCapacity where
type Rs SetDesiredCapacity =
SetDesiredCapacityResponse
request = postQuery autoScaling
response = receiveNull SetDesiredCapacityResponse'
instance ToHeaders SetDesiredCapacity where
toHeaders = const mempty
instance ToPath SetDesiredCapacity where
toPath = const "/"
instance ToQuery SetDesiredCapacity where
toQuery SetDesiredCapacity'{..}
= mconcat
["Action" =: ("SetDesiredCapacity" :: ByteString),
"Version" =: ("2011-01-01" :: ByteString),
"HonorCooldown" =: _sdcHonorCooldown,
"AutoScalingGroupName" =: _sdcAutoScalingGroupName,
"DesiredCapacity" =: _sdcDesiredCapacity]
data SetDesiredCapacityResponse =
SetDesiredCapacityResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
setDesiredCapacityResponse
:: SetDesiredCapacityResponse
setDesiredCapacityResponse = SetDesiredCapacityResponse'