added missing param for setAffinityGroupId