| GitHub Repository | Product Reference |
Service Description: The GlobalFrontendSettings API.
This client uses GlobalFrontendSettingsService version 2026-09-01.
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 (GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create()) {
String project = "project-309310695";
GlobalFrontendSettings response = globalFrontendSettingsServiceClient.get(project);
}
Note: close() needs to be called on the GlobalFrontendSettingsServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
| Method | Description | Method Variants |
|---|---|---|
Get |
Gets the Global Frontend Billing Bundle Settings for a project. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Patch |
Updates the Global Frontend Billing Bundle Settings for a project. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return 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 GlobalFrontendSettingsServiceSettings 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
GlobalFrontendSettingsServiceSettings globalFrontendSettingsServiceSettings =
GlobalFrontendSettingsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create(globalFrontendSettingsServiceSettings);
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
GlobalFrontendSettingsServiceSettings globalFrontendSettingsServiceSettings =
GlobalFrontendSettingsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create(globalFrontendSettingsServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final GlobalFrontendSettingsServiceClient create()Constructs an instance of GlobalFrontendSettingsServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
GlobalFrontendSettingsServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(GlobalFrontendSettingsServiceSettings settings)
public static final GlobalFrontendSettingsServiceClient create(GlobalFrontendSettingsServiceSettings settings)Constructs an instance of GlobalFrontendSettingsServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Parameter | |
|---|---|
| Name | Description |
settings |
GlobalFrontendSettingsServiceSettings |
| Returns | |
|---|---|
| Type | Description |
GlobalFrontendSettingsServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(GlobalFrontendSettingsServiceStub stub)
public static final GlobalFrontendSettingsServiceClient create(GlobalFrontendSettingsServiceStub stub)Constructs an instance of GlobalFrontendSettingsServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(GlobalFrontendSettingsServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
GlobalFrontendSettingsServiceStub |
| Returns | |
|---|---|
| Type | Description |
GlobalFrontendSettingsServiceClient |
|
Constructors
GlobalFrontendSettingsServiceClient(GlobalFrontendSettingsServiceSettings settings)
protected GlobalFrontendSettingsServiceClient(GlobalFrontendSettingsServiceSettings settings)Constructs an instance of GlobalFrontendSettingsServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Parameter | |
|---|---|
| Name | Description |
settings |
GlobalFrontendSettingsServiceSettings |
GlobalFrontendSettingsServiceClient(GlobalFrontendSettingsServiceStub stub)
protected GlobalFrontendSettingsServiceClient(GlobalFrontendSettingsServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
GlobalFrontendSettingsServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)| Parameters | |
|---|---|
| Name | Description |
duration |
long |
unit |
TimeUnit |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
| Exceptions | |
|---|---|
| Type | Description |
InterruptedException |
|
close()
public final void close()get(GetGlobalFrontendSettingRequest request)
public final GlobalFrontendSettings get(GetGlobalFrontendSettingRequest request)Gets the Global Frontend Billing Bundle Settings for a project.
Sample code:
// 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 (GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create()) {
GetGlobalFrontendSettingRequest request =
GetGlobalFrontendSettingRequest.newBuilder().setProject("project-309310695").build();
GlobalFrontendSettings response = globalFrontendSettingsServiceClient.get(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetGlobalFrontendSettingRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
GlobalFrontendSettings |
|
get(String project)
public final GlobalFrontendSettings get(String project)Gets the Global Frontend Billing Bundle Settings for a project.
Sample code:
// 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 (GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create()) {
String project = "project-309310695";
GlobalFrontendSettings response = globalFrontendSettingsServiceClient.get(project);
}
| Parameter | |
|---|---|
| Name | Description |
project |
StringRequired. Project ID for this request. |
| Returns | |
|---|---|
| Type | Description |
GlobalFrontendSettings |
|
getCallable()
public final UnaryCallable<GetGlobalFrontendSettingRequest,GlobalFrontendSettings> getCallable()Gets the Global Frontend Billing Bundle Settings for a project.
Sample code:
// 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 (GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create()) {
GetGlobalFrontendSettingRequest request =
GetGlobalFrontendSettingRequest.newBuilder().setProject("project-309310695").build();
ApiFuture<GlobalFrontendSettings> future =
globalFrontendSettingsServiceClient.getCallable().futureCall(request);
// Do something.
GlobalFrontendSettings response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetGlobalFrontendSettingRequest,GlobalFrontendSettings> |
|
getSettings()
public final @Nullable GlobalFrontendSettingsServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.cloud.compute.v1.GlobalFrontendSettingsServiceSettings |
|
getStub()
public GlobalFrontendSettingsServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
GlobalFrontendSettingsServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
patch(PatchGlobalFrontendSettingRequest request)
public final GlobalFrontendSettingsPatchResponse patch(PatchGlobalFrontendSettingRequest request)Updates the Global Frontend Billing Bundle Settings for a project.
Sample code:
// 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 (GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create()) {
PatchGlobalFrontendSettingRequest request =
PatchGlobalFrontendSettingRequest.newBuilder()
.setGlobalFrontendSettingsResource(GlobalFrontendSettings.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setUpdateMask("updateMask-296147115")
.build();
GlobalFrontendSettingsPatchResponse response =
globalFrontendSettingsServiceClient.patch(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
PatchGlobalFrontendSettingRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
GlobalFrontendSettingsPatchResponse |
|
patch(String project, GlobalFrontendSettings globalFrontendSettingsResource)
public final GlobalFrontendSettingsPatchResponse patch(String project, GlobalFrontendSettings globalFrontendSettingsResource)Updates the Global Frontend Billing Bundle Settings for a project.
Sample code:
// 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 (GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create()) {
String project = "project-309310695";
GlobalFrontendSettings globalFrontendSettingsResource =
GlobalFrontendSettings.newBuilder().build();
GlobalFrontendSettingsPatchResponse response =
globalFrontendSettingsServiceClient.patch(project, globalFrontendSettingsResource);
}
| Parameters | |
|---|---|
| Name | Description |
project |
StringRequired. Project ID for this request. |
globalFrontendSettingsResource |
GlobalFrontendSettingsThe body resource for this request |
| Returns | |
|---|---|
| Type | Description |
GlobalFrontendSettingsPatchResponse |
|
patchCallable()
public final UnaryCallable<PatchGlobalFrontendSettingRequest,GlobalFrontendSettingsPatchResponse> patchCallable()Updates the Global Frontend Billing Bundle Settings for a project.
Sample code:
// 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 (GlobalFrontendSettingsServiceClient globalFrontendSettingsServiceClient =
GlobalFrontendSettingsServiceClient.create()) {
PatchGlobalFrontendSettingRequest request =
PatchGlobalFrontendSettingRequest.newBuilder()
.setGlobalFrontendSettingsResource(GlobalFrontendSettings.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setUpdateMask("updateMask-296147115")
.build();
ApiFuture<GlobalFrontendSettingsPatchResponse> future =
globalFrontendSettingsServiceClient.patchCallable().futureCall(request);
// Do something.
GlobalFrontendSettingsPatchResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<PatchGlobalFrontendSettingRequest,GlobalFrontendSettingsPatchResponse> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()