Class QuotaController.QuotaControllerBase (2.0.0)

[BindServiceMethod(typeof(QuotaController), "BindService")]
public abstract class QuotaControllerBase

Base class for server-side implementations of QuotaController

Inheritance

Object > QuotaController.QuotaControllerBase

Namespace

Google.Cloud.ServiceControl.V1

Assembly

Google.Cloud.ServiceControl.V1.dll

Methods

AllocateQuota(AllocateQuotaRequest, ServerCallContext)

public virtual Task<AllocateQuotaResponse> AllocateQuota(AllocateQuotaRequest request, ServerCallContext context)

Attempts to allocate quota for the specified consumer. It should be called before the operation is executed.

This method requires the servicemanagement.services.quota permission on the specified service. For more information, see Cloud IAM.

NOTE: The client must fail-open on server errors INTERNAL, UNKNOWN, DEADLINE_EXCEEDED, and UNAVAILABLE. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.

Parameters
NameDescription
requestAllocateQuotaRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<AllocateQuotaResponse>

The response to send back to the client (wrapped by a task).