'Set the desired capacity for the group.'

def set_capacity(self, capacity):

    params = {'AutoScalingGroupName': self.name, 'DesiredCapacity': capacity}
    req = self.connection.get_object('SetDesiredCapacity', params, Request)
    self.connection.last_request = req
    return req
