| GitHub Repository | Product Reference |
Service Description: Service describing handlers for resources.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LbTrafficExtensionName name =
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]");
LbTrafficExtension response = depServiceClient.getLbTrafficExtension(name);
}
Note: close() needs to be called on the DepServiceClient 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 |
|---|---|---|
ListLbTrafficExtensions |
Lists |
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.
|
GetLbTrafficExtension |
Gets details of the specified |
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.
|
CreateLbTrafficExtension |
Creates a new |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateLbTrafficExtension |
Updates the parameters of the specified |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteLbTrafficExtension |
Deletes the specified |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLbRouteExtensions |
Lists |
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.
|
GetLbRouteExtension |
Gets details of the specified |
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.
|
CreateLbRouteExtension |
Creates a new |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateLbRouteExtension |
Updates the parameters of the specified |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteLbRouteExtension |
Deletes the specified |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListExtensionBindings |
Lists |
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.
|
GetExtensionBinding |
Gets details of the specified |
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.
|
CreateExtensionBinding |
Creates a new |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateExtensionBinding |
Updates the parameters of the specified |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteExtensionBinding |
Deletes the specified |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. This method lists locations based on the resource scope provided inthe ListLocationsRequest.name field: ***Global locations**: If For gRPC and client library implementations, the resource name ispassed as the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
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 DepServiceSettings 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
DepServiceSettings depServiceSettings =
DepServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DepServiceClient depServiceClient = DepServiceClient.create(depServiceSettings);
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
DepServiceSettings depServiceSettings =
DepServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
DepServiceClient depServiceClient = DepServiceClient.create(depServiceSettings);
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
DepServiceSettings depServiceSettings = DepServiceSettings.newHttpJsonBuilder().build();
DepServiceClient depServiceClient = DepServiceClient.create(depServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final DepServiceClient create()Constructs an instance of DepServiceClient with default settings.
| Returns | |
|---|---|
| Type | Description |
DepServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(DepServiceSettings settings)
public static final DepServiceClient create(DepServiceSettings settings)Constructs an instance of DepServiceClient, 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 |
DepServiceSettings |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
create(DepServiceStub stub)
public static final DepServiceClient create(DepServiceStub stub)Constructs an instance of DepServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DepServiceSettings).
| Parameter | |
|---|---|
| Name | Description |
stub |
DepServiceStub |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient |
|
Constructors
DepServiceClient(DepServiceSettings settings)
protected DepServiceClient(DepServiceSettings settings)Constructs an instance of DepServiceClient, 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 |
DepServiceSettings |
DepServiceClient(DepServiceStub stub)
protected DepServiceClient(DepServiceStub stub)| Parameter | |
|---|---|
| Name | Description |
stub |
DepServiceStub |
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()createExtensionBindingAsync(@Nullable LocationName parent, ExtensionBinding extensionBinding, String extensionBindingId)
public final OperationFuture<ExtensionBinding,OperationMetadata> createExtensionBindingAsync(@Nullable LocationName parent, ExtensionBinding extensionBinding, String extensionBindingId)Creates a new ExtensionBinding resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ExtensionBinding extensionBinding = ExtensionBinding.newBuilder().build();
String extensionBindingId = "extensionBindingId673350913";
ExtensionBinding response =
depServiceClient
.createExtensionBindingAsync(parent, extensionBinding, extensionBindingId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LocationNameRequired. The parent resource of the |
extensionBinding |
ExtensionBindingRequired. |
extensionBindingId |
StringRequired. Short name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ExtensionBinding,OperationMetadata> |
|
createExtensionBindingAsync(CreateExtensionBindingRequest request)
public final OperationFuture<ExtensionBinding,OperationMetadata> createExtensionBindingAsync(CreateExtensionBindingRequest request)Creates a new ExtensionBinding resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateExtensionBindingRequest request =
CreateExtensionBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setExtensionBindingId("extensionBindingId673350913")
.setExtensionBinding(ExtensionBinding.newBuilder().build())
.build();
ExtensionBinding response = depServiceClient.createExtensionBindingAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateExtensionBindingRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ExtensionBinding,OperationMetadata> |
|
createExtensionBindingAsync(String parent, ExtensionBinding extensionBinding, String extensionBindingId)
public final OperationFuture<ExtensionBinding,OperationMetadata> createExtensionBindingAsync(String parent, ExtensionBinding extensionBinding, String extensionBindingId)Creates a new ExtensionBinding resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ExtensionBinding extensionBinding = ExtensionBinding.newBuilder().build();
String extensionBindingId = "extensionBindingId673350913";
ExtensionBinding response =
depServiceClient
.createExtensionBindingAsync(parent, extensionBinding, extensionBindingId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the |
extensionBinding |
ExtensionBindingRequired. |
extensionBindingId |
StringRequired. Short name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ExtensionBinding,OperationMetadata> |
|
createExtensionBindingCallable()
public final UnaryCallable<CreateExtensionBindingRequest,Operation> createExtensionBindingCallable()Creates a new ExtensionBinding resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateExtensionBindingRequest request =
CreateExtensionBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setExtensionBindingId("extensionBindingId673350913")
.setExtensionBinding(ExtensionBinding.newBuilder().build())
.build();
ApiFuture<Operation> future =
depServiceClient.createExtensionBindingCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateExtensionBindingRequest,Operation> |
|
createExtensionBindingOperationCallable()
public final OperationCallable<CreateExtensionBindingRequest,ExtensionBinding,OperationMetadata> createExtensionBindingOperationCallable()Creates a new ExtensionBinding resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateExtensionBindingRequest request =
CreateExtensionBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setExtensionBindingId("extensionBindingId673350913")
.setExtensionBinding(ExtensionBinding.newBuilder().build())
.build();
OperationFuture<ExtensionBinding, OperationMetadata> future =
depServiceClient.createExtensionBindingOperationCallable().futureCall(request);
// Do something.
ExtensionBinding response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateExtensionBindingRequest,ExtensionBinding,OperationMetadata> |
|
createLbRouteExtensionAsync(@Nullable LocationName parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId)
public final OperationFuture<LbRouteExtension,OperationMetadata> createLbRouteExtensionAsync(@Nullable LocationName parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId)Creates a new LbRouteExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
LbRouteExtension lbRouteExtension = LbRouteExtension.newBuilder().build();
String lbRouteExtensionId = "lbRouteExtensionId-1336830649";
LbRouteExtension response =
depServiceClient
.createLbRouteExtensionAsync(parent, lbRouteExtension, lbRouteExtensionId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LocationNameRequired. The parent resource of the |
lbRouteExtension |
LbRouteExtensionRequired. |
lbRouteExtensionId |
StringRequired. User-provided ID of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbRouteExtension,OperationMetadata> |
|
createLbRouteExtensionAsync(CreateLbRouteExtensionRequest request)
public final OperationFuture<LbRouteExtension,OperationMetadata> createLbRouteExtensionAsync(CreateLbRouteExtensionRequest request)Creates a new LbRouteExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateLbRouteExtensionRequest request =
CreateLbRouteExtensionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLbRouteExtensionId("lbRouteExtensionId-1336830649")
.setLbRouteExtension(LbRouteExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
LbRouteExtension response = depServiceClient.createLbRouteExtensionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateLbRouteExtensionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbRouteExtension,OperationMetadata> |
|
createLbRouteExtensionAsync(String parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId)
public final OperationFuture<LbRouteExtension,OperationMetadata> createLbRouteExtensionAsync(String parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId)Creates a new LbRouteExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
LbRouteExtension lbRouteExtension = LbRouteExtension.newBuilder().build();
String lbRouteExtensionId = "lbRouteExtensionId-1336830649";
LbRouteExtension response =
depServiceClient
.createLbRouteExtensionAsync(parent, lbRouteExtension, lbRouteExtensionId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the |
lbRouteExtension |
LbRouteExtensionRequired. |
lbRouteExtensionId |
StringRequired. User-provided ID of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbRouteExtension,OperationMetadata> |
|
createLbRouteExtensionCallable()
public final UnaryCallable<CreateLbRouteExtensionRequest,Operation> createLbRouteExtensionCallable()Creates a new LbRouteExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateLbRouteExtensionRequest request =
CreateLbRouteExtensionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLbRouteExtensionId("lbRouteExtensionId-1336830649")
.setLbRouteExtension(LbRouteExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
depServiceClient.createLbRouteExtensionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateLbRouteExtensionRequest,Operation> |
|
createLbRouteExtensionOperationCallable()
public final OperationCallable<CreateLbRouteExtensionRequest,LbRouteExtension,OperationMetadata> createLbRouteExtensionOperationCallable()Creates a new LbRouteExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateLbRouteExtensionRequest request =
CreateLbRouteExtensionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLbRouteExtensionId("lbRouteExtensionId-1336830649")
.setLbRouteExtension(LbRouteExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<LbRouteExtension, OperationMetadata> future =
depServiceClient.createLbRouteExtensionOperationCallable().futureCall(request);
// Do something.
LbRouteExtension response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateLbRouteExtensionRequest,LbRouteExtension,OperationMetadata> |
|
createLbTrafficExtensionAsync(@Nullable LocationName parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId)
public final OperationFuture<LbTrafficExtension,OperationMetadata> createLbTrafficExtensionAsync(@Nullable LocationName parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId)Creates a new LbTrafficExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
LbTrafficExtension lbTrafficExtension = LbTrafficExtension.newBuilder().build();
String lbTrafficExtensionId = "lbTrafficExtensionId1150549907";
LbTrafficExtension response =
depServiceClient
.createLbTrafficExtensionAsync(parent, lbTrafficExtension, lbTrafficExtensionId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LocationNameRequired. The parent resource of the |
lbTrafficExtension |
LbTrafficExtensionRequired. |
lbTrafficExtensionId |
StringRequired. User-provided ID of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbTrafficExtension,OperationMetadata> |
|
createLbTrafficExtensionAsync(CreateLbTrafficExtensionRequest request)
public final OperationFuture<LbTrafficExtension,OperationMetadata> createLbTrafficExtensionAsync(CreateLbTrafficExtensionRequest request)Creates a new LbTrafficExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateLbTrafficExtensionRequest request =
CreateLbTrafficExtensionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLbTrafficExtensionId("lbTrafficExtensionId1150549907")
.setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
LbTrafficExtension response = depServiceClient.createLbTrafficExtensionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
CreateLbTrafficExtensionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbTrafficExtension,OperationMetadata> |
|
createLbTrafficExtensionAsync(String parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId)
public final OperationFuture<LbTrafficExtension,OperationMetadata> createLbTrafficExtensionAsync(String parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId)Creates a new LbTrafficExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
LbTrafficExtension lbTrafficExtension = LbTrafficExtension.newBuilder().build();
String lbTrafficExtensionId = "lbTrafficExtensionId1150549907";
LbTrafficExtension response =
depServiceClient
.createLbTrafficExtensionAsync(parent, lbTrafficExtension, lbTrafficExtensionId)
.get();
}
| Parameters | |
|---|---|
| Name | Description |
parent |
StringRequired. The parent resource of the |
lbTrafficExtension |
LbTrafficExtensionRequired. |
lbTrafficExtensionId |
StringRequired. User-provided ID of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbTrafficExtension,OperationMetadata> |
|
createLbTrafficExtensionCallable()
public final UnaryCallable<CreateLbTrafficExtensionRequest,Operation> createLbTrafficExtensionCallable()Creates a new LbTrafficExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateLbTrafficExtensionRequest request =
CreateLbTrafficExtensionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLbTrafficExtensionId("lbTrafficExtensionId1150549907")
.setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
depServiceClient.createLbTrafficExtensionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<CreateLbTrafficExtensionRequest,Operation> |
|
createLbTrafficExtensionOperationCallable()
public final OperationCallable<CreateLbTrafficExtensionRequest,LbTrafficExtension,OperationMetadata> createLbTrafficExtensionOperationCallable()Creates a new LbTrafficExtension resource in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
CreateLbTrafficExtensionRequest request =
CreateLbTrafficExtensionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setLbTrafficExtensionId("lbTrafficExtensionId1150549907")
.setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<LbTrafficExtension, OperationMetadata> future =
depServiceClient.createLbTrafficExtensionOperationCallable().futureCall(request);
// Do something.
LbTrafficExtension response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<CreateLbTrafficExtensionRequest,LbTrafficExtension,OperationMetadata> |
|
deleteExtensionBindingAsync(@Nullable ExtensionBindingName name)
public final OperationFuture<Empty,OperationMetadata> deleteExtensionBindingAsync(@Nullable ExtensionBindingName name)Deletes the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ExtensionBindingName name =
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]");
depServiceClient.deleteExtensionBindingAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.ExtensionBindingNameRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteExtensionBindingAsync(DeleteExtensionBindingRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteExtensionBindingAsync(DeleteExtensionBindingRequest request)Deletes the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteExtensionBindingRequest request =
DeleteExtensionBindingRequest.newBuilder()
.setName(
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]")
.toString())
.setEtag("etag3123477")
.build();
depServiceClient.deleteExtensionBindingAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteExtensionBindingRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteExtensionBindingAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteExtensionBindingAsync(String name)Deletes the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String name =
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]").toString();
depServiceClient.deleteExtensionBindingAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteExtensionBindingCallable()
public final UnaryCallable<DeleteExtensionBindingRequest,Operation> deleteExtensionBindingCallable()Deletes the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteExtensionBindingRequest request =
DeleteExtensionBindingRequest.newBuilder()
.setName(
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
depServiceClient.deleteExtensionBindingCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteExtensionBindingRequest,Operation> |
|
deleteExtensionBindingOperationCallable()
public final OperationCallable<DeleteExtensionBindingRequest,Empty,OperationMetadata> deleteExtensionBindingOperationCallable()Deletes the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteExtensionBindingRequest request =
DeleteExtensionBindingRequest.newBuilder()
.setName(
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]")
.toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
depServiceClient.deleteExtensionBindingOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteExtensionBindingRequest,Empty,OperationMetadata> |
|
deleteLbRouteExtensionAsync(@Nullable LbRouteExtensionName name)
public final OperationFuture<Empty,OperationMetadata> deleteLbRouteExtensionAsync(@Nullable LbRouteExtensionName name)Deletes the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LbRouteExtensionName name =
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]");
depServiceClient.deleteLbRouteExtensionAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LbRouteExtensionNameRequired. The name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteLbRouteExtensionAsync(DeleteLbRouteExtensionRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteLbRouteExtensionAsync(DeleteLbRouteExtensionRequest request)Deletes the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteLbRouteExtensionRequest request =
DeleteLbRouteExtensionRequest.newBuilder()
.setName(
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
.toString())
.setRequestId("requestId693933066")
.build();
depServiceClient.deleteLbRouteExtensionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteLbRouteExtensionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteLbRouteExtensionAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteLbRouteExtensionAsync(String name)Deletes the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String name =
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]").toString();
depServiceClient.deleteLbRouteExtensionAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteLbRouteExtensionCallable()
public final UnaryCallable<DeleteLbRouteExtensionRequest,Operation> deleteLbRouteExtensionCallable()Deletes the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteLbRouteExtensionRequest request =
DeleteLbRouteExtensionRequest.newBuilder()
.setName(
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
depServiceClient.deleteLbRouteExtensionCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteLbRouteExtensionRequest,Operation> |
|
deleteLbRouteExtensionOperationCallable()
public final OperationCallable<DeleteLbRouteExtensionRequest,Empty,OperationMetadata> deleteLbRouteExtensionOperationCallable()Deletes the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteLbRouteExtensionRequest request =
DeleteLbRouteExtensionRequest.newBuilder()
.setName(
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
depServiceClient.deleteLbRouteExtensionOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteLbRouteExtensionRequest,Empty,OperationMetadata> |
|
deleteLbTrafficExtensionAsync(@Nullable LbTrafficExtensionName name)
public final OperationFuture<Empty,OperationMetadata> deleteLbTrafficExtensionAsync(@Nullable LbTrafficExtensionName name)Deletes the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LbTrafficExtensionName name =
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]");
depServiceClient.deleteLbTrafficExtensionAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LbTrafficExtensionNameRequired. The name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteLbTrafficExtensionAsync(DeleteLbTrafficExtensionRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteLbTrafficExtensionAsync(DeleteLbTrafficExtensionRequest request)Deletes the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteLbTrafficExtensionRequest request =
DeleteLbTrafficExtensionRequest.newBuilder()
.setName(
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
.toString())
.setRequestId("requestId693933066")
.build();
depServiceClient.deleteLbTrafficExtensionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
DeleteLbTrafficExtensionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteLbTrafficExtensionAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteLbTrafficExtensionAsync(String name)Deletes the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String name =
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]").toString();
depServiceClient.deleteLbTrafficExtensionAsync(name).get();
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. The name of the |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<Empty,OperationMetadata> |
|
deleteLbTrafficExtensionCallable()
public final UnaryCallable<DeleteLbTrafficExtensionRequest,Operation> deleteLbTrafficExtensionCallable()Deletes the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteLbTrafficExtensionRequest request =
DeleteLbTrafficExtensionRequest.newBuilder()
.setName(
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
depServiceClient.deleteLbTrafficExtensionCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<DeleteLbTrafficExtensionRequest,Operation> |
|
deleteLbTrafficExtensionOperationCallable()
public final OperationCallable<DeleteLbTrafficExtensionRequest,Empty,OperationMetadata> deleteLbTrafficExtensionOperationCallable()Deletes the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
DeleteLbTrafficExtensionRequest request =
DeleteLbTrafficExtensionRequest.newBuilder()
.setName(
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
depServiceClient.deleteLbTrafficExtensionOperationCallable().futureCall(request);
// Do something.
future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<DeleteLbTrafficExtensionRequest,Empty,OperationMetadata> |
|
getExtensionBinding(@Nullable ExtensionBindingName name)
public final ExtensionBinding getExtensionBinding(@Nullable ExtensionBindingName name)Gets details of the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ExtensionBindingName name =
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]");
ExtensionBinding response = depServiceClient.getExtensionBinding(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.ExtensionBindingNameRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
ExtensionBinding |
|
getExtensionBinding(GetExtensionBindingRequest request)
public final ExtensionBinding getExtensionBinding(GetExtensionBindingRequest request)Gets details of the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetExtensionBindingRequest request =
GetExtensionBindingRequest.newBuilder()
.setName(
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]")
.toString())
.build();
ExtensionBinding response = depServiceClient.getExtensionBinding(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetExtensionBindingRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
ExtensionBinding |
|
getExtensionBinding(String name)
public final ExtensionBinding getExtensionBinding(String name)Gets details of the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String name =
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]").toString();
ExtensionBinding response = depServiceClient.getExtensionBinding(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
ExtensionBinding |
|
getExtensionBindingCallable()
public final UnaryCallable<GetExtensionBindingRequest,ExtensionBinding> getExtensionBindingCallable()Gets details of the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetExtensionBindingRequest request =
GetExtensionBindingRequest.newBuilder()
.setName(
ExtensionBindingName.of("[PROJECT]", "[LOCATION]", "[EXTENSION_BINDING]")
.toString())
.build();
ApiFuture<ExtensionBinding> future =
depServiceClient.getExtensionBindingCallable().futureCall(request);
// Do something.
ExtensionBinding response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetExtensionBindingRequest,ExtensionBinding> |
|
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getIamPolicy(GetIamPolicyRequest request)
public final Policy getIamPolicy(GetIamPolicyRequest request)Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = depServiceClient.getIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.GetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future = depServiceClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
|
getLbRouteExtension(@Nullable LbRouteExtensionName name)
public final LbRouteExtension getLbRouteExtension(@Nullable LbRouteExtensionName name)Gets details of the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LbRouteExtensionName name =
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]");
LbRouteExtension response = depServiceClient.getLbRouteExtension(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LbRouteExtensionNameRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
LbRouteExtension |
|
getLbRouteExtension(GetLbRouteExtensionRequest request)
public final LbRouteExtension getLbRouteExtension(GetLbRouteExtensionRequest request)Gets details of the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetLbRouteExtensionRequest request =
GetLbRouteExtensionRequest.newBuilder()
.setName(
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
.toString())
.build();
LbRouteExtension response = depServiceClient.getLbRouteExtension(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetLbRouteExtensionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LbRouteExtension |
|
getLbRouteExtension(String name)
public final LbRouteExtension getLbRouteExtension(String name)Gets details of the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String name =
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]").toString();
LbRouteExtension response = depServiceClient.getLbRouteExtension(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
LbRouteExtension |
|
getLbRouteExtensionCallable()
public final UnaryCallable<GetLbRouteExtensionRequest,LbRouteExtension> getLbRouteExtensionCallable()Gets details of the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetLbRouteExtensionRequest request =
GetLbRouteExtensionRequest.newBuilder()
.setName(
LbRouteExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_ROUTE_EXTENSION]")
.toString())
.build();
ApiFuture<LbRouteExtension> future =
depServiceClient.getLbRouteExtensionCallable().futureCall(request);
// Do something.
LbRouteExtension response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetLbRouteExtensionRequest,LbRouteExtension> |
|
getLbTrafficExtension(@Nullable LbTrafficExtensionName name)
public final LbTrafficExtension getLbTrafficExtension(@Nullable LbTrafficExtensionName name)Gets details of the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LbTrafficExtensionName name =
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]");
LbTrafficExtension response = depServiceClient.getLbTrafficExtension(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LbTrafficExtensionNameRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
LbTrafficExtension |
|
getLbTrafficExtension(GetLbTrafficExtensionRequest request)
public final LbTrafficExtension getLbTrafficExtension(GetLbTrafficExtensionRequest request)Gets details of the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetLbTrafficExtensionRequest request =
GetLbTrafficExtensionRequest.newBuilder()
.setName(
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
.toString())
.build();
LbTrafficExtension response = depServiceClient.getLbTrafficExtension(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
GetLbTrafficExtensionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
LbTrafficExtension |
|
getLbTrafficExtension(String name)
public final LbTrafficExtension getLbTrafficExtension(String name)Gets details of the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String name =
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]").toString();
LbTrafficExtension response = depServiceClient.getLbTrafficExtension(name);
}
| Parameter | |
|---|---|
| Name | Description |
name |
StringRequired. A name of the |
| Returns | |
|---|---|
| Type | Description |
LbTrafficExtension |
|
getLbTrafficExtensionCallable()
public final UnaryCallable<GetLbTrafficExtensionRequest,LbTrafficExtension> getLbTrafficExtensionCallable()Gets details of the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetLbTrafficExtensionRequest request =
GetLbTrafficExtensionRequest.newBuilder()
.setName(
LbTrafficExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_TRAFFIC_EXTENSION]")
.toString())
.build();
ApiFuture<LbTrafficExtension> future =
depServiceClient.getLbTrafficExtensionCallable().futureCall(request);
// Do something.
LbTrafficExtension response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<GetLbTrafficExtensionRequest,LbTrafficExtension> |
|
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)Gets information about a location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = depServiceClient.getLocation(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.GetLocationRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.cloud.location.Location |
|
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()Gets information about a location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = depServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
|
getOperationsClient()
public final OperationsClient getOperationsClient()Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Returns | |
|---|---|
| Type | Description |
OperationsClient |
|
getSettings()
public final @Nullable DepServiceSettings getSettings()| Returns | |
|---|---|
| Type | Description |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.DepServiceSettings |
|
getStub()
public DepServiceStub getStub()| Returns | |
|---|---|
| Type | Description |
DepServiceStub |
|
isShutdown()
public boolean isShutdown()| Returns | |
|---|---|
| Type | Description |
boolean |
|
isTerminated()
public boolean isTerminated()| Returns | |
|---|---|
| Type | Description |
boolean |
|
listExtensionBindings(@Nullable LocationName parent)
public final DepServiceClient.ListExtensionBindingsPagedResponse listExtensionBindings(@Nullable LocationName parent)Lists ExtensionBinding resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (ExtensionBinding element : depServiceClient.listExtensionBindings(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LocationNameRequired. The project and location from which the |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListExtensionBindingsPagedResponse |
|
listExtensionBindings(ListExtensionBindingsRequest request)
public final DepServiceClient.ListExtensionBindingsPagedResponse listExtensionBindings(ListExtensionBindingsRequest request)Lists ExtensionBinding resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListExtensionBindingsRequest request =
ListExtensionBindingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (ExtensionBinding element :
depServiceClient.listExtensionBindings(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListExtensionBindingsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListExtensionBindingsPagedResponse |
|
listExtensionBindings(String parent)
public final DepServiceClient.ListExtensionBindingsPagedResponse listExtensionBindings(String parent)Lists ExtensionBinding resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (ExtensionBinding element : depServiceClient.listExtensionBindings(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListExtensionBindingsPagedResponse |
|
listExtensionBindingsCallable()
public final UnaryCallable<ListExtensionBindingsRequest,ListExtensionBindingsResponse> listExtensionBindingsCallable()Lists ExtensionBinding resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListExtensionBindingsRequest request =
ListExtensionBindingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListExtensionBindingsResponse response =
depServiceClient.listExtensionBindingsCallable().call(request);
for (ExtensionBinding element : response.getExtensionBindingsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListExtensionBindingsRequest,ListExtensionBindingsResponse> |
|
listExtensionBindingsPagedCallable()
public final UnaryCallable<ListExtensionBindingsRequest,DepServiceClient.ListExtensionBindingsPagedResponse> listExtensionBindingsPagedCallable()Lists ExtensionBinding resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListExtensionBindingsRequest request =
ListExtensionBindingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<ExtensionBinding> future =
depServiceClient.listExtensionBindingsPagedCallable().futureCall(request);
// Do something.
for (ExtensionBinding element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListExtensionBindingsRequest,ListExtensionBindingsPagedResponse> |
|
listLbRouteExtensions(@Nullable LocationName parent)
public final DepServiceClient.ListLbRouteExtensionsPagedResponse listLbRouteExtensions(@Nullable LocationName parent)Lists LbRouteExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (LbRouteExtension element : depServiceClient.listLbRouteExtensions(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LocationNameRequired. The project and location from which the |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListLbRouteExtensionsPagedResponse |
|
listLbRouteExtensions(ListLbRouteExtensionsRequest request)
public final DepServiceClient.ListLbRouteExtensionsPagedResponse listLbRouteExtensions(ListLbRouteExtensionsRequest request)Lists LbRouteExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLbRouteExtensionsRequest request =
ListLbRouteExtensionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (LbRouteExtension element :
depServiceClient.listLbRouteExtensions(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListLbRouteExtensionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListLbRouteExtensionsPagedResponse |
|
listLbRouteExtensions(String parent)
public final DepServiceClient.ListLbRouteExtensionsPagedResponse listLbRouteExtensions(String parent)Lists LbRouteExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (LbRouteExtension element : depServiceClient.listLbRouteExtensions(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListLbRouteExtensionsPagedResponse |
|
listLbRouteExtensionsCallable()
public final UnaryCallable<ListLbRouteExtensionsRequest,ListLbRouteExtensionsResponse> listLbRouteExtensionsCallable()Lists LbRouteExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLbRouteExtensionsRequest request =
ListLbRouteExtensionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListLbRouteExtensionsResponse response =
depServiceClient.listLbRouteExtensionsCallable().call(request);
for (LbRouteExtension element : response.getLbRouteExtensionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListLbRouteExtensionsRequest,ListLbRouteExtensionsResponse> |
|
listLbRouteExtensionsPagedCallable()
public final UnaryCallable<ListLbRouteExtensionsRequest,DepServiceClient.ListLbRouteExtensionsPagedResponse> listLbRouteExtensionsPagedCallable()Lists LbRouteExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLbRouteExtensionsRequest request =
ListLbRouteExtensionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<LbRouteExtension> future =
depServiceClient.listLbRouteExtensionsPagedCallable().futureCall(request);
// Do something.
for (LbRouteExtension element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListLbRouteExtensionsRequest,ListLbRouteExtensionsPagedResponse> |
|
listLbTrafficExtensions(@Nullable LocationName parent)
public final DepServiceClient.ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(@Nullable LocationName parent)Lists LbTrafficExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (LbTrafficExtension element :
depServiceClient.listLbTrafficExtensions(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
@org.jspecify.annotations.Nullable com.google.cloud.networkservices.v1beta1.LocationNameRequired. The project and location from which the |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListLbTrafficExtensionsPagedResponse |
|
listLbTrafficExtensions(ListLbTrafficExtensionsRequest request)
public final DepServiceClient.ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(ListLbTrafficExtensionsRequest request)Lists LbTrafficExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLbTrafficExtensionsRequest request =
ListLbTrafficExtensionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (LbTrafficExtension element :
depServiceClient.listLbTrafficExtensions(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
ListLbTrafficExtensionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListLbTrafficExtensionsPagedResponse |
|
listLbTrafficExtensions(String parent)
public final DepServiceClient.ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(String parent)Lists LbTrafficExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (LbTrafficExtension element :
depServiceClient.listLbTrafficExtensions(parent).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
parent |
StringRequired. The project and location from which the |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListLbTrafficExtensionsPagedResponse |
|
listLbTrafficExtensionsCallable()
public final UnaryCallable<ListLbTrafficExtensionsRequest,ListLbTrafficExtensionsResponse> listLbTrafficExtensionsCallable()Lists LbTrafficExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLbTrafficExtensionsRequest request =
ListLbTrafficExtensionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListLbTrafficExtensionsResponse response =
depServiceClient.listLbTrafficExtensionsCallable().call(request);
for (LbTrafficExtension element : response.getLbTrafficExtensionsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListLbTrafficExtensionsRequest,ListLbTrafficExtensionsResponse> |
|
listLbTrafficExtensionsPagedCallable()
public final UnaryCallable<ListLbTrafficExtensionsRequest,DepServiceClient.ListLbTrafficExtensionsPagedResponse> listLbTrafficExtensionsPagedCallable()Lists LbTrafficExtension resources in a given project and location.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLbTrafficExtensionsRequest request =
ListLbTrafficExtensionsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<LbTrafficExtension> future =
depServiceClient.listLbTrafficExtensionsPagedCallable().futureCall(request);
// Do something.
for (LbTrafficExtension element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<ListLbTrafficExtensionsRequest,ListLbTrafficExtensionsPagedResponse> |
|
listLocations(ListLocationsRequest request)
public final DepServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
***Global locations**: If name is empty, the method lists thepublic
locations available to all projects. * **Project-specificlocations**: If
name follows the formatprojects/{project}, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.
For gRPC and client library implementations, the resource name ispassed as the name field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : depServiceClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.cloud.location.ListLocationsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
DepServiceClient.ListLocationsPagedResponse |
|
listLocationsCallable()
public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
***Global locations**: If name is empty, the method lists thepublic
locations available to all projects. * **Project-specificlocations**: If
name follows the formatprojects/{project}, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.
For gRPC and client library implementations, the resource name ispassed as the name field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response = depServiceClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
|
listLocationsPagedCallable()
public final UnaryCallable<ListLocationsRequest,DepServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.
This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
***Global locations**: If name is empty, the method lists thepublic
locations available to all projects. * **Project-specificlocations**: If
name follows the formatprojects/{project}, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.
For gRPC and client library implementations, the resource name ispassed as the name field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
depServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse> |
|
setIamPolicy(SetIamPolicyRequest request)
public final Policy setIamPolicy(SetIamPolicyRequest request)Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Policy response = depServiceClient.setIamPolicy(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.SetIamPolicyRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.Policy |
|
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()Sets the access control policy on the specified resource. Replacesany existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
SetIamPolicyRequest request =
SetIamPolicyRequest.newBuilder()
.setResource(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.setPolicy(Policy.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Policy> future = depServiceClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
|
shutdown()
public void shutdown()shutdownNow()
public void shutdownNow()testIamPermissions(TestIamPermissionsRequest request)
public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
TestIamPermissionsResponse response = depServiceClient.testIamPermissions(request);
}
| Parameter | |
|---|---|
| Name | Description |
request |
com.google.iam.v1.TestIamPermissionsRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
|
testIamPermissionsCallable()
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist,
this will return an empty set ofpermissions, not a NOT_FOUND error.
Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
TestIamPermissionsRequest request =
TestIamPermissionsRequest.newBuilder()
.setResource(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.addAllPermissions(new ArrayList<String>())
.build();
ApiFuture<TestIamPermissionsResponse> future =
depServiceClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestIamPermissionsResponse response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
|
updateExtensionBindingAsync(ExtensionBinding extensionBinding, FieldMask updateMask)
public final OperationFuture<ExtensionBinding,OperationMetadata> updateExtensionBindingAsync(ExtensionBinding extensionBinding, FieldMask updateMask)Updates the parameters of the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
ExtensionBinding extensionBinding = ExtensionBinding.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
ExtensionBinding response =
depServiceClient.updateExtensionBindingAsync(extensionBinding, updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
extensionBinding |
ExtensionBindingRequired. Updated |
updateMask |
FieldMaskOptional. Field mask is used to specify the fields to be overwritten in the
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ExtensionBinding,OperationMetadata> |
|
updateExtensionBindingAsync(UpdateExtensionBindingRequest request)
public final OperationFuture<ExtensionBinding,OperationMetadata> updateExtensionBindingAsync(UpdateExtensionBindingRequest request)Updates the parameters of the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateExtensionBindingRequest request =
UpdateExtensionBindingRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setExtensionBinding(ExtensionBinding.newBuilder().build())
.build();
ExtensionBinding response = depServiceClient.updateExtensionBindingAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateExtensionBindingRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<ExtensionBinding,OperationMetadata> |
|
updateExtensionBindingCallable()
public final UnaryCallable<UpdateExtensionBindingRequest,Operation> updateExtensionBindingCallable()Updates the parameters of the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateExtensionBindingRequest request =
UpdateExtensionBindingRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setExtensionBinding(ExtensionBinding.newBuilder().build())
.build();
ApiFuture<Operation> future =
depServiceClient.updateExtensionBindingCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateExtensionBindingRequest,Operation> |
|
updateExtensionBindingOperationCallable()
public final OperationCallable<UpdateExtensionBindingRequest,ExtensionBinding,OperationMetadata> updateExtensionBindingOperationCallable()Updates the parameters of the specified ExtensionBinding resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateExtensionBindingRequest request =
UpdateExtensionBindingRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setExtensionBinding(ExtensionBinding.newBuilder().build())
.build();
OperationFuture<ExtensionBinding, OperationMetadata> future =
depServiceClient.updateExtensionBindingOperationCallable().futureCall(request);
// Do something.
ExtensionBinding response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateExtensionBindingRequest,ExtensionBinding,OperationMetadata> |
|
updateLbRouteExtensionAsync(LbRouteExtension lbRouteExtension, FieldMask updateMask)
public final OperationFuture<LbRouteExtension,OperationMetadata> updateLbRouteExtensionAsync(LbRouteExtension lbRouteExtension, FieldMask updateMask)Updates the parameters of the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LbRouteExtension lbRouteExtension = LbRouteExtension.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
LbRouteExtension response =
depServiceClient.updateLbRouteExtensionAsync(lbRouteExtension, updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
lbRouteExtension |
LbRouteExtensionRequired. |
updateMask |
FieldMaskRequired. Used to specify the fields to be overwritten in the
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbRouteExtension,OperationMetadata> |
|
updateLbRouteExtensionAsync(UpdateLbRouteExtensionRequest request)
public final OperationFuture<LbRouteExtension,OperationMetadata> updateLbRouteExtensionAsync(UpdateLbRouteExtensionRequest request)Updates the parameters of the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateLbRouteExtensionRequest request =
UpdateLbRouteExtensionRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLbRouteExtension(LbRouteExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
LbRouteExtension response = depServiceClient.updateLbRouteExtensionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateLbRouteExtensionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbRouteExtension,OperationMetadata> |
|
updateLbRouteExtensionCallable()
public final UnaryCallable<UpdateLbRouteExtensionRequest,Operation> updateLbRouteExtensionCallable()Updates the parameters of the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateLbRouteExtensionRequest request =
UpdateLbRouteExtensionRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLbRouteExtension(LbRouteExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
depServiceClient.updateLbRouteExtensionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateLbRouteExtensionRequest,Operation> |
|
updateLbRouteExtensionOperationCallable()
public final OperationCallable<UpdateLbRouteExtensionRequest,LbRouteExtension,OperationMetadata> updateLbRouteExtensionOperationCallable()Updates the parameters of the specified LbRouteExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateLbRouteExtensionRequest request =
UpdateLbRouteExtensionRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLbRouteExtension(LbRouteExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<LbRouteExtension, OperationMetadata> future =
depServiceClient.updateLbRouteExtensionOperationCallable().futureCall(request);
// Do something.
LbRouteExtension response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateLbRouteExtensionRequest,LbRouteExtension,OperationMetadata> |
|
updateLbTrafficExtensionAsync(LbTrafficExtension lbTrafficExtension, FieldMask updateMask)
public final OperationFuture<LbTrafficExtension,OperationMetadata> updateLbTrafficExtensionAsync(LbTrafficExtension lbTrafficExtension, FieldMask updateMask)Updates the parameters of the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
LbTrafficExtension lbTrafficExtension = LbTrafficExtension.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
LbTrafficExtension response =
depServiceClient.updateLbTrafficExtensionAsync(lbTrafficExtension, updateMask).get();
}
| Parameters | |
|---|---|
| Name | Description |
lbTrafficExtension |
LbTrafficExtensionRequired. |
updateMask |
FieldMaskRequired. Used to specify the fields to be overwritten in the
|
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbTrafficExtension,OperationMetadata> |
|
updateLbTrafficExtensionAsync(UpdateLbTrafficExtensionRequest request)
public final OperationFuture<LbTrafficExtension,OperationMetadata> updateLbTrafficExtensionAsync(UpdateLbTrafficExtensionRequest request)Updates the parameters of the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateLbTrafficExtensionRequest request =
UpdateLbTrafficExtensionRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
LbTrafficExtension response = depServiceClient.updateLbTrafficExtensionAsync(request).get();
}
| Parameter | |
|---|---|
| Name | Description |
request |
UpdateLbTrafficExtensionRequestThe request object containing all of the parameters for the API call. |
| Returns | |
|---|---|
| Type | Description |
OperationFuture<LbTrafficExtension,OperationMetadata> |
|
updateLbTrafficExtensionCallable()
public final UnaryCallable<UpdateLbTrafficExtensionRequest,Operation> updateLbTrafficExtensionCallable()Updates the parameters of the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateLbTrafficExtensionRequest request =
UpdateLbTrafficExtensionRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
depServiceClient.updateLbTrafficExtensionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
UnaryCallable<UpdateLbTrafficExtensionRequest,Operation> |
|
updateLbTrafficExtensionOperationCallable()
public final OperationCallable<UpdateLbTrafficExtensionRequest,LbTrafficExtension,OperationMetadata> updateLbTrafficExtensionOperationCallable()Updates the parameters of the specified LbTrafficExtension resource.
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 (DepServiceClient depServiceClient = DepServiceClient.create()) {
UpdateLbTrafficExtensionRequest request =
UpdateLbTrafficExtensionRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setLbTrafficExtension(LbTrafficExtension.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<LbTrafficExtension, OperationMetadata> future =
depServiceClient.updateLbTrafficExtensionOperationCallable().futureCall(request);
// Do something.
LbTrafficExtension response = future.get();
}
| Returns | |
|---|---|
| Type | Description |
OperationCallable<UpdateLbTrafficExtensionRequest,LbTrafficExtension,OperationMetadata> |
|