module Network.AWS.AutoScaling.SetDesiredCapacity
(
SetDesiredCapacity
, setDesiredCapacity
, sdcAutoScalingGroupName
, sdcDesiredCapacity
, sdcHonorCooldown
, SetDesiredCapacityResponse
, setDesiredCapacityResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.AutoScaling.Types
import qualified GHC.Exts
data SetDesiredCapacity = SetDesiredCapacity
{ _sdcAutoScalingGroupName :: Text
, _sdcDesiredCapacity :: Int
, _sdcHonorCooldown :: Maybe Bool
} deriving (Eq, Ord, Show)
setDesiredCapacity :: Text
-> Int
-> SetDesiredCapacity
setDesiredCapacity p1 p2 = SetDesiredCapacity
{ _sdcAutoScalingGroupName = p1
, _sdcDesiredCapacity = p2
, _sdcHonorCooldown = Nothing
}
sdcAutoScalingGroupName :: Lens' SetDesiredCapacity Text
sdcAutoScalingGroupName =
lens _sdcAutoScalingGroupName (\s a -> s { _sdcAutoScalingGroupName = a })
sdcDesiredCapacity :: Lens' SetDesiredCapacity Int
sdcDesiredCapacity =
lens _sdcDesiredCapacity (\s a -> s { _sdcDesiredCapacity = a })
sdcHonorCooldown :: Lens' SetDesiredCapacity (Maybe Bool)
sdcHonorCooldown = lens _sdcHonorCooldown (\s a -> s { _sdcHonorCooldown = a })
data SetDesiredCapacityResponse = SetDesiredCapacityResponse
deriving (Eq, Ord, Show, Generic)
setDesiredCapacityResponse :: SetDesiredCapacityResponse
setDesiredCapacityResponse = SetDesiredCapacityResponse
instance ToPath SetDesiredCapacity where
toPath = const "/"
instance ToQuery SetDesiredCapacity where
toQuery SetDesiredCapacity{..} = mconcat
[ "AutoScalingGroupName" =? _sdcAutoScalingGroupName
, "DesiredCapacity" =? _sdcDesiredCapacity
, "HonorCooldown" =? _sdcHonorCooldown
]
instance ToHeaders SetDesiredCapacity
instance AWSRequest SetDesiredCapacity where
type Sv SetDesiredCapacity = AutoScaling
type Rs SetDesiredCapacity = SetDesiredCapacityResponse
request = post "SetDesiredCapacity"
response = nullResponse SetDesiredCapacityResponse