def METHOD_NAME(user):
    values = flask.request.json
    check_json_is_valid(create_pipeline_schema, values)
    values.update(v1_utils.common_values_dict())
    if not user.is_in_team(values["team_id"]):
        raise dci_exc.Unauthorized()
    created_pipeline = base.create_resource_orm(models2.Pipeline, values)
    result = json.dumps({"pipeline": created_pipeline})
    return flask.Response(result, 201, content_type="application/json")