buildgrid.server.quota.service module

class buildgrid.server.quota.service.QuotaService(scheduler: Scheduler)

Bases: QuotaServicer, UninstancedServicer

SERVICE_NAME = 'Quota'
REGISTER_METHOD(server)
FULL_NAME: ClassVar[str] = 'build.buildgrid.Quota'

The full name of the servicer, used to match instances to the servicer and configure reflection. This value should be declared on the class of any Servicer implementations.

start() → None
GetInstanceQuota(request: GetInstanceQuotaRequest, context: ServicerContext) → GetInstanceQuotaResponse

Get the quota configuration for a specific instance and bot cohort

Errors: * NOT_FOUND: When the quota index by (instance_name, bot_cohort) doesn’t exist

PutInstanceQuota(request: PutInstanceQuotaRequest, context: ServicerContext) → PutInstanceQuotaResponse

Set or update the quota configuration for a specific instance and bot cohort

DeleteInstanceQuota(request: DeleteInstanceQuotaRequest, context: ServicerContext) → DeleteInstanceQuotaResponse

Delete the quota configuration for a specific instance and bot cohort Errors: * NOT_FOUND: When the quota index by (instance_name, bot_cohort) doesn’t exist

GetAllInstanceQuota(request: GetAllInstanceQuotaRequest, context: ServicerContext) → GetAllInstanceQuotaResponse

Get all quotas for a specific instance

Errors: * NOT_FOUND: When the instance name doesn’t have any quotas configured