Class QuotaControllerClientImpl (2.0.0)

public sealed class QuotaControllerClientImpl : QuotaControllerClient

QuotaController client wrapper implementation, for convenient use.

Inheritance

Object > QuotaControllerClient > QuotaControllerClientImpl

Namespace

Google.Cloud.ServiceControl.V1

Assembly

Google.Cloud.ServiceControl.V1.dll

Remarks

Google Quota Control API

Allows clients to allocate and release quota against a managed service.

Constructors

QuotaControllerClientImpl(QuotaController.QuotaControllerClient, QuotaControllerSettings, ILogger)

public QuotaControllerClientImpl(QuotaController.QuotaControllerClient grpcClient, QuotaControllerSettings settings, ILogger logger)

Constructs a client wrapper for the QuotaController service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientQuotaController.QuotaControllerClient

The underlying gRPC client.

settingsQuotaControllerSettings

The base QuotaControllerSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override QuotaController.QuotaControllerClient GrpcClient { get; }

The underlying gRPC QuotaController client

Property Value
TypeDescription
QuotaController.QuotaControllerClient
Overrides

Methods

AllocateQuota(AllocateQuotaRequest, CallSettings)

public override AllocateQuotaResponse AllocateQuota(AllocateQuotaRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AllocateQuotaResponse

The RPC response.

Overrides

AllocateQuotaAsync(AllocateQuotaRequest, CallSettings)

public override Task<AllocateQuotaResponse> AllocateQuotaAsync(AllocateQuotaRequest request, CallSettings callSettings = null)

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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AllocateQuotaResponse>

A Task containing the RPC response.

Overrides