- 1.53.0 (latest)
- 1.52.0
- 1.51.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.1.10
A client to Service Control API
The interfaces provided are listed below, along with usage samples.
QuotaControllerClient
Service Description: Google Quota Control API
Allows clients to allocate and release quota against a managed service.
Sample for QuotaControllerClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (QuotaControllerClient quotaControllerClient = QuotaControllerClient.create()) {
AllocateQuotaRequest request =
AllocateQuotaRequest.newBuilder()
.setServiceName("serviceName-1928572192")
.setAllocateOperation(QuotaOperation.newBuilder().build())
.setServiceConfigId("serviceConfigId650537426")
.build();
AllocateQuotaResponse response = quotaControllerClient.allocateQuota(request);
}
ServiceControllerClient
Service Description: Google Service Control API
Lets clients check and report operations against a managed service.
Sample for ServiceControllerClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ServiceControllerClient serviceControllerClient = ServiceControllerClient.create()) {
CheckRequest request =
CheckRequest.newBuilder()
.setServiceName("serviceName-1928572192")
.setOperation(Operation.newBuilder().build())
.setServiceConfigId("serviceConfigId650537426")
.build();
CheckResponse response = serviceControllerClient.check(request);
}
Classes
AllocateQuotaRequest
Request message for the AllocateQuota method.
Protobuf type google.api.servicecontrol.v1.AllocateQuotaRequest
AllocateQuotaRequest.Builder
Request message for the AllocateQuota method.
Protobuf type google.api.servicecontrol.v1.AllocateQuotaRequest
AllocateQuotaResponse
Response message for the AllocateQuota method.
Protobuf type google.api.servicecontrol.v1.AllocateQuotaResponse
AllocateQuotaResponse.Builder
Response message for the AllocateQuota method.
Protobuf type google.api.servicecontrol.v1.AllocateQuotaResponse
CheckError
Defines the errors to be returned in google.api.servicecontrol.v1.CheckResponse.check_errors.
Protobuf type google.api.servicecontrol.v1.CheckError
CheckError.Builder
Defines the errors to be returned in google.api.servicecontrol.v1.CheckResponse.check_errors.
Protobuf type google.api.servicecontrol.v1.CheckError
CheckErrorProto
CheckRequest
Request message for the Check method.
Protobuf type google.api.servicecontrol.v1.CheckRequest
CheckRequest.Builder
Request message for the Check method.
Protobuf type google.api.servicecontrol.v1.CheckRequest
CheckResponse
Response message for the Check method.
Protobuf type google.api.servicecontrol.v1.CheckResponse
CheckResponse.Builder
Response message for the Check method.
Protobuf type google.api.servicecontrol.v1.CheckResponse
CheckResponse.CheckInfo
Contains additional information about the check operation.
Protobuf type google.api.servicecontrol.v1.CheckResponse.CheckInfo
CheckResponse.CheckInfo.Builder
Contains additional information about the check operation.
Protobuf type google.api.servicecontrol.v1.CheckResponse.CheckInfo
CheckResponse.ConsumerInfo
ConsumerInfo
provides information about the consumer.
Protobuf type google.api.servicecontrol.v1.CheckResponse.ConsumerInfo
CheckResponse.ConsumerInfo.Builder
ConsumerInfo
provides information about the consumer.
Protobuf type google.api.servicecontrol.v1.CheckResponse.ConsumerInfo
Distribution
Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information:
- the arithmetic mean of the samples
- the minimum and maximum of the samples
- the sum-squared-deviation of the samples, used to compute variance
- a histogram of the values of the sample points
Protobuf type google.api.servicecontrol.v1.Distribution
Distribution.Builder
Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information:
- the arithmetic mean of the samples
- the minimum and maximum of the samples
- the sum-squared-deviation of the samples, used to compute variance
- a histogram of the values of the sample points
Protobuf type google.api.servicecontrol.v1.Distribution
Distribution.ExplicitBuckets
Describing buckets with arbitrary user-provided width.
Protobuf type google.api.servicecontrol.v1.Distribution.ExplicitBuckets
Distribution.ExplicitBuckets.Builder
Describing buckets with arbitrary user-provided width.
Protobuf type google.api.servicecontrol.v1.Distribution.ExplicitBuckets
Distribution.ExponentialBuckets
Describing buckets with exponentially growing width.
Protobuf type google.api.servicecontrol.v1.Distribution.ExponentialBuckets
Distribution.ExponentialBuckets.Builder
Describing buckets with exponentially growing width.
Protobuf type google.api.servicecontrol.v1.Distribution.ExponentialBuckets
Distribution.LinearBuckets
Describing buckets with constant width.
Protobuf type google.api.servicecontrol.v1.Distribution.LinearBuckets
Distribution.LinearBuckets.Builder
Describing buckets with constant width.
Protobuf type google.api.servicecontrol.v1.Distribution.LinearBuckets
DistributionProto
HttpRequest
A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.
Protobuf type google.api.servicecontrol.v1.HttpRequest
HttpRequest.Builder
A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.
Protobuf type google.api.servicecontrol.v1.HttpRequest
HttpRequestProto
LogEntry
An individual log entry.
Protobuf type google.api.servicecontrol.v1.LogEntry
LogEntry.Builder
An individual log entry.
Protobuf type google.api.servicecontrol.v1.LogEntry
LogEntryOperation
Additional information about a potentially long-running operation with which a log entry is associated.
Protobuf type google.api.servicecontrol.v1.LogEntryOperation
LogEntryOperation.Builder
Additional information about a potentially long-running operation with which a log entry is associated.
Protobuf type google.api.servicecontrol.v1.LogEntryOperation
LogEntryProto
LogEntrySourceLocation
Additional information about the source code location that produced the log entry.
Protobuf type google.api.servicecontrol.v1.LogEntrySourceLocation
LogEntrySourceLocation.Builder
Additional information about the source code location that produced the log entry.
Protobuf type google.api.servicecontrol.v1.LogEntrySourceLocation
MetricValue
Represents a single metric value.
Protobuf type google.api.servicecontrol.v1.MetricValue
MetricValue.Builder
Represents a single metric value.
Protobuf type google.api.servicecontrol.v1.MetricValue
MetricValueSet
Represents a set of metric values in the same metric. Each metric value in the set should have a unique combination of start time, end time, and label values.
Protobuf type google.api.servicecontrol.v1.MetricValueSet
MetricValueSet.Builder
Represents a set of metric values in the same metric. Each metric value in the set should have a unique combination of start time, end time, and label values.
Protobuf type google.api.servicecontrol.v1.MetricValueSet
MetricValueSetProto
Operation
Represents information regarding an operation.
Protobuf type google.api.servicecontrol.v1.Operation
Operation.Builder
Represents information regarding an operation.
Protobuf type google.api.servicecontrol.v1.Operation
OperationProto
QuotaControllerClient
Service Description: Google Quota Control API
Allows clients to allocate and release quota against a managed service.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (QuotaControllerClient quotaControllerClient = QuotaControllerClient.create()) {
AllocateQuotaRequest request =
AllocateQuotaRequest.newBuilder()
.setServiceName("serviceName-1928572192")
.setAllocateOperation(QuotaOperation.newBuilder().build())
.setServiceConfigId("serviceConfigId650537426")
.build();
AllocateQuotaResponse response = quotaControllerClient.allocateQuota(request);
}
Note: close() needs to be called on the QuotaControllerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of QuotaControllerSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
QuotaControllerSettings quotaControllerSettings =
QuotaControllerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
QuotaControllerClient quotaControllerClient =
QuotaControllerClient.create(quotaControllerSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
QuotaControllerSettings quotaControllerSettings =
QuotaControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
QuotaControllerClient quotaControllerClient =
QuotaControllerClient.create(quotaControllerSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
QuotaControllerSettings quotaControllerSettings =
QuotaControllerSettings.newHttpJsonBuilder().build();
QuotaControllerClient quotaControllerClient =
QuotaControllerClient.create(quotaControllerSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
QuotaControllerGrpc
Google Quota Control API Allows clients to allocate and release quota against a managed service.
QuotaControllerGrpc.QuotaControllerBlockingStub
A stub to allow clients to do synchronous rpc calls to service QuotaController.
Google Quota Control API Allows clients to allocate and release quota against a managed service.
QuotaControllerGrpc.QuotaControllerFutureStub
A stub to allow clients to do ListenableFuture-style rpc calls to service QuotaController.
Google Quota Control API Allows clients to allocate and release quota against a managed service.
QuotaControllerGrpc.QuotaControllerImplBase
Base class for the server implementation of the service QuotaController.
Google Quota Control API Allows clients to allocate and release quota against a managed service.
QuotaControllerGrpc.QuotaControllerStub
A stub to allow clients to do asynchronous rpc calls to service QuotaController.
Google Quota Control API Allows clients to allocate and release quota against a managed service.
QuotaControllerProto
QuotaControllerSettings
Settings class to configure an instance of QuotaControllerClient.
The default instance has everything set to sensible defaults:
- The default service address (servicecontrol.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of allocateQuota to 30 seconds:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
QuotaControllerSettings.Builder quotaControllerSettingsBuilder =
QuotaControllerSettings.newBuilder();
quotaControllerSettingsBuilder
.allocateQuotaSettings()
.setRetrySettings(
quotaControllerSettingsBuilder
.allocateQuotaSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
QuotaControllerSettings quotaControllerSettings = quotaControllerSettingsBuilder.build();
QuotaControllerSettings.Builder
Builder for QuotaControllerSettings.
QuotaError
Represents error information for QuotaOperation.
Protobuf type google.api.servicecontrol.v1.QuotaError
QuotaError.Builder
Represents error information for QuotaOperation.
Protobuf type google.api.servicecontrol.v1.QuotaError
QuotaOperation
Represents information regarding a quota operation.
Protobuf type google.api.servicecontrol.v1.QuotaOperation
QuotaOperation.Builder
Represents information regarding a quota operation.
Protobuf type google.api.servicecontrol.v1.QuotaOperation
ReportRequest
Request message for the Report method.
Protobuf type google.api.servicecontrol.v1.ReportRequest
ReportRequest.Builder
Request message for the Report method.
Protobuf type google.api.servicecontrol.v1.ReportRequest
ReportResponse
Response message for the Report method.
Protobuf type google.api.servicecontrol.v1.ReportResponse
ReportResponse.Builder
Response message for the Report method.
Protobuf type google.api.servicecontrol.v1.ReportResponse
ReportResponse.ReportError
Represents the processing error of one Operation in the request.
Protobuf type google.api.servicecontrol.v1.ReportResponse.ReportError
ReportResponse.ReportError.Builder
Represents the processing error of one Operation in the request.
Protobuf type google.api.servicecontrol.v1.ReportResponse.ReportError
ServiceControllerClient
Service Description: Google Service Control API
Lets clients check and report operations against a managed service.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (ServiceControllerClient serviceControllerClient = ServiceControllerClient.create()) {
CheckRequest request =
CheckRequest.newBuilder()
.setServiceName("serviceName-1928572192")
.setOperation(Operation.newBuilder().build())
.setServiceConfigId("serviceConfigId650537426")
.build();
CheckResponse response = serviceControllerClient.check(request);
}
Note: close() needs to be called on the ServiceControllerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of ServiceControllerSettings to create(). For example:
To customize credentials:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ServiceControllerSettings serviceControllerSettings =
ServiceControllerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
ServiceControllerClient serviceControllerClient =
ServiceControllerClient.create(serviceControllerSettings);
To customize the endpoint:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ServiceControllerSettings serviceControllerSettings =
ServiceControllerSettings.newBuilder().setEndpoint(myEndpoint).build();
ServiceControllerClient serviceControllerClient =
ServiceControllerClient.create(serviceControllerSettings);
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ServiceControllerSettings serviceControllerSettings =
ServiceControllerSettings.newHttpJsonBuilder().build();
ServiceControllerClient serviceControllerClient =
ServiceControllerClient.create(serviceControllerSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
ServiceControllerGrpc
Google Service Control API Lets clients check and report operations against a managed service.
ServiceControllerGrpc.ServiceControllerBlockingStub
A stub to allow clients to do synchronous rpc calls to service ServiceController.
Google Service Control API Lets clients check and report operations against a managed service.
ServiceControllerGrpc.ServiceControllerFutureStub
A stub to allow clients to do ListenableFuture-style rpc calls to service ServiceController.
Google Service Control API Lets clients check and report operations against a managed service.
ServiceControllerGrpc.ServiceControllerImplBase
Base class for the server implementation of the service ServiceController.
Google Service Control API Lets clients check and report operations against a managed service.
ServiceControllerGrpc.ServiceControllerStub
A stub to allow clients to do asynchronous rpc calls to service ServiceController.
Google Service Control API Lets clients check and report operations against a managed service.
ServiceControllerProto
ServiceControllerSettings
Settings class to configure an instance of ServiceControllerClient.
The default instance has everything set to sensible defaults:
- The default service address (servicecontrol.googleapis.com) and default port (443) are used.
- Credentials are acquired automatically through Application Default Credentials.
- Retries are configured for idempotent methods but not for non-idempotent methods.
The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.
For example, to set the total timeout of check to 30 seconds:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
ServiceControllerSettings.Builder serviceControllerSettingsBuilder =
ServiceControllerSettings.newBuilder();
serviceControllerSettingsBuilder
.checkSettings()
.setRetrySettings(
serviceControllerSettingsBuilder
.checkSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
ServiceControllerSettings serviceControllerSettings = serviceControllerSettingsBuilder.build();
ServiceControllerSettings.Builder
Builder for ServiceControllerSettings.
Interfaces
AllocateQuotaRequestOrBuilder
AllocateQuotaResponseOrBuilder
CheckErrorOrBuilder
CheckRequestOrBuilder
CheckResponse.CheckInfoOrBuilder
CheckResponse.ConsumerInfoOrBuilder
CheckResponseOrBuilder
Distribution.ExplicitBucketsOrBuilder
Distribution.ExponentialBucketsOrBuilder
Distribution.LinearBucketsOrBuilder
DistributionOrBuilder
HttpRequestOrBuilder
LogEntryOperationOrBuilder
LogEntryOrBuilder
LogEntrySourceLocationOrBuilder
MetricValueOrBuilder
MetricValueSetOrBuilder
OperationOrBuilder
QuotaControllerGrpc.AsyncService
Google Quota Control API Allows clients to allocate and release quota against a managed service.
QuotaErrorOrBuilder
QuotaOperationOrBuilder
ReportRequestOrBuilder
ReportResponse.ReportErrorOrBuilder
ReportResponseOrBuilder
ServiceControllerGrpc.AsyncService
Google Service Control API Lets clients check and report operations against a managed service.
Enums
CheckError.Code
Error codes for Check responses.
Protobuf enum google.api.servicecontrol.v1.CheckError.Code
CheckResponse.ConsumerInfo.ConsumerType
The type of the consumer as defined in Google Resource Manager.
Protobuf enum google.api.servicecontrol.v1.CheckResponse.ConsumerInfo.ConsumerType
Distribution.BucketOptionCase
LogEntry.PayloadCase
MetricValue.ValueCase
Operation.Importance
Defines the importance of the data contained in the operation.
Protobuf enum google.api.servicecontrol.v1.Operation.Importance
QuotaError.Code
Error codes related to project config validations are deprecated since the quota controller methods do not perform these validations. Instead services have to call the Check method, without quota_properties field, to perform these validations before calling the quota controller methods. These methods check only for project deletion to be wipe out compliant.
Protobuf enum google.api.servicecontrol.v1.QuotaError.Code
QuotaOperation.QuotaMode
Supported quota modes.
Protobuf enum google.api.servicecontrol.v1.QuotaOperation.QuotaMode