'Stop a deployed container
:param container: The container to stop
:type  container: :class:`libcloud.container.base.Container`
:rtype: :class:`libcloud.container.base.Container`'

def stop_container(self, container):

    request = {'task': container.extra['taskArn']}
    response = self.connection.request(ROOT, method='POST', data=json.dumps(request), headers=self._get_headers('StopTask')).object
    containers = []
    containers.extend(self._to_containers(response['task'], container.extra['taskDefinitionArn']))
    return containers
