Disable shared CI runners using Python APIs

Is there a way to use Gitlab’s Python APIs to disable shared CI runners? Thanks.