Service Control v1 API - Class ServiceController.ServiceControllerClient (2.2.0)

public class ServiceController.ServiceControllerClient : ClientBase<ServiceController.ServiceControllerClient>

Reference documentation and code samples for the Service Control v1 API class ServiceController.ServiceControllerClient.

Client for ServiceController

Inheritance

object > ClientBase > ClientBaseServiceControllerServiceControllerClient > ServiceController.ServiceControllerClient

Namespace

Google.Cloud.ServiceControl.V1

Assembly

Google.Cloud.ServiceControl.V1.dll

Constructors

ServiceControllerClient()

protected ServiceControllerClient()

Protected parameterless constructor to allow creation of test doubles.

ServiceControllerClient(CallInvoker)

public ServiceControllerClient(CallInvoker callInvoker)

Creates a new client for ServiceController that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ServiceControllerClient(ChannelBase)

public ServiceControllerClient(ChannelBase channel)

Creates a new client for ServiceController

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ServiceControllerClient(ClientBaseConfiguration)

protected ServiceControllerClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

Check(CheckRequest, CallOptions)

public virtual CheckResponse Check(CheckRequest request, CallOptions options)

Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed.

If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the Check method having the latest policy information.

NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the size limit (wire-format byte size) of 1MB.

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

Parameters
NameDescription
requestCheckRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CheckResponse

The response received from the server.

Check(CheckRequest, Metadata, DateTime?, CancellationToken)

public virtual CheckResponse Check(CheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed.

If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the Check method having the latest policy information.

NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the size limit (wire-format byte size) of 1MB.

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

Parameters
NameDescription
requestCheckRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CheckResponse

The response received from the server.

CheckAsync(CheckRequest, CallOptions)

public virtual AsyncUnaryCall<CheckResponse> CheckAsync(CheckRequest request, CallOptions options)

Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed.

If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the Check method having the latest policy information.

NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the size limit (wire-format byte size) of 1MB.

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

Parameters
NameDescription
requestCheckRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallCheckResponse

The call object.

CheckAsync(CheckRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<CheckResponse> CheckAsync(CheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed.

If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the Check method having the latest policy information.

NOTE: the [CheckRequest][google.api.servicecontrol.v1.CheckRequest] has the size limit (wire-format byte size) of 1MB.

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

Parameters
NameDescription
requestCheckRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallCheckResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override ServiceController.ServiceControllerClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
ServiceControllerServiceControllerClient
Overrides

Report(ReportRequest, CallOptions)

public virtual ReportResponse Report(ReportRequest request, CallOptions options)

Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed.

If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons.

NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has the size limit (wire-format byte size) of 1MB.

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

Parameters
NameDescription
requestReportRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ReportResponse

The response received from the server.

Report(ReportRequest, Metadata, DateTime?, CancellationToken)

public virtual ReportResponse Report(ReportRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed.

If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons.

NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has the size limit (wire-format byte size) of 1MB.

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

Parameters
NameDescription
requestReportRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ReportResponse

The response received from the server.

ReportAsync(ReportRequest, CallOptions)

public virtual AsyncUnaryCall<ReportResponse> ReportAsync(ReportRequest request, CallOptions options)

Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed.

If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons.

NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has the size limit (wire-format byte size) of 1MB.

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

Parameters
NameDescription
requestReportRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallReportResponse

The call object.

ReportAsync(ReportRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ReportResponse> ReportAsync(ReportRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed.

If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons.

NOTE: the [ReportRequest][google.api.servicecontrol.v1.ReportRequest] has the size limit (wire-format byte size) of 1MB.

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

Parameters
NameDescription
requestReportRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallReportResponse

The call object.