def METHOD_NAME(self, recorded_test, monitor_info):
    client = self.create_client_from_credential(
        LogsIngestionClient, self.get_credential(LogsIngestionClient), endpoint=monitor_info['dce'])
    body = [{"foo": "bar"}]
    with pytest.raises(HttpResponseError) as ex:
        client.upload(rule_id='bad-rule', stream_name=monitor_info['stream_name'], logs=body)