public sealed class QuotaControllerClientImpl : QuotaControllerClient
Reference documentation and code samples for the Service Control v1 API class QuotaControllerClientImpl.
QuotaController client wrapper implementation, for convenient use.
Namespace
Google.Cloud.ServiceControl.V1Assembly
Google.Cloud.ServiceControl.V1.dll
Remarks
Allows clients to allocate and release quota against a managed service.
Constructors
QuotaControllerClientImpl(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 | |
---|---|
Name | Description |
grpcClient |
QuotaControllerQuotaControllerClient The underlying gRPC client. |
settings |
QuotaControllerSettings The base QuotaControllerSettings used within this client. |
logger |
ILogger Optional ILogger to use within this client. |
Properties
GrpcClient
public override QuotaController.QuotaControllerClient GrpcClient { get; }
The underlying gRPC QuotaController client
Property Value | |
---|---|
Type | Description |
QuotaControllerQuotaControllerClient |
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 | |
---|---|
Name | Description |
request |
AllocateQuotaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AllocateQuotaResponse |
The RPC response. |
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 | |
---|---|
Name | Description |
request |
AllocateQuotaRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAllocateQuotaResponse |
A Task containing the RPC response. |