def update_rbac_assignment(
    self,
    username: str,
    roles: str = "null",
    asset: str = "null",
) -> bool:
    """Create or update rbac assignment

    .. list-table::
        :header-rows: 1

        * - Swagger Section
          - Method
          - Endpoint
        * - rbacAssignment
          - POST
          - /rbac/assignment

    :param username: Username for assignment
    :type username: str
    :param roles: Comma separated list of roles. Required if asset value
        is not provided, e.g. "role1, role2, role3", defaults to "null"
    :type roles: str, optional
    :param asset: Appliance access group or asset name. Required if
        roles value is not provided, e.g. "group1", defaults to "null"
    :type asset: str, optional
    :return: Returns True/False based on successful call
    :rtype: bool
    :raises ValueError: Both optional parameters cannot be value of
        "null"
    """
    if roles == "null" and asset == "null":
        raise ValueError("Roles and asset variables cannot both be 'null' ")

    data = {
        "username": username,
        "roles": roles,
        "asset": asset,
    }

    return self._post(
        "/rbac/assignment",
        data=data,
        return_type="bool",
    )