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.
|
ListLocations |
Lists information about the supported locations for this service. |
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()
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 |
CreateLbRouteExtensionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<LbRouteExtension,OperationMetadata> |
createLbRouteExtensionAsync(LocationName parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId)
public final OperationFuture<LbRouteExtension,OperationMetadata> createLbRouteExtensionAsync(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 |
LocationName Required. The parent resource of the |
lbRouteExtension |
LbRouteExtension Required. |
lbRouteExtensionId |
String Required. User-provided ID of the |
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 |
String Required. The parent resource of the |
lbRouteExtension |
LbRouteExtension Required. |
lbRouteExtensionId |
String Required. 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(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 |
CreateLbTrafficExtensionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<LbTrafficExtension,OperationMetadata> |
createLbTrafficExtensionAsync(LocationName parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId)
public final OperationFuture<LbTrafficExtension,OperationMetadata> createLbTrafficExtensionAsync(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 |
LocationName Required. The parent resource of the |
lbTrafficExtension |
LbTrafficExtension Required. |
lbTrafficExtensionId |
String Required. User-provided ID of the |
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 |
String Required. The parent resource of the |
lbTrafficExtension |
LbTrafficExtension Required. |
lbTrafficExtensionId |
String Required. 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> |
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 |
DeleteLbRouteExtensionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteLbRouteExtensionAsync(LbRouteExtensionName name)
public final OperationFuture<Empty,OperationMetadata> deleteLbRouteExtensionAsync(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 |
LbRouteExtensionName Required. The name of the |
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 |
String Required. 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(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 |
DeleteLbTrafficExtensionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteLbTrafficExtensionAsync(LbTrafficExtensionName name)
public final OperationFuture<Empty,OperationMetadata> deleteLbTrafficExtensionAsync(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 |
LbTrafficExtensionName Required. The name of the |
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 |
String Required. 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> |
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.GetIamPolicyRequest The 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(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 |
GetLbRouteExtensionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
LbRouteExtension |
getLbRouteExtension(LbRouteExtensionName name)
public final LbRouteExtension getLbRouteExtension(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 |
LbRouteExtensionName Required. A name of the |
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 |
String Required. 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(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 |
GetLbTrafficExtensionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
LbTrafficExtension |
getLbTrafficExtension(LbTrafficExtensionName name)
public final LbTrafficExtension getLbTrafficExtension(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 |
LbTrafficExtensionName Required. A name of the |
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 |
String Required. 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.GetLocationRequest The 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 DepServiceSettings getSettings()
Returns | |
---|---|
Type | Description |
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 |
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 |
ListLbRouteExtensionsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
DepServiceClient.ListLbRouteExtensionsPagedResponse |
listLbRouteExtensions(LocationName parent)
public final DepServiceClient.ListLbRouteExtensionsPagedResponse listLbRouteExtensions(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 |
LocationName Required. The project and location from which the |
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 |
String Required. 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(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 |
ListLbTrafficExtensionsRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
DepServiceClient.ListLbTrafficExtensionsPagedResponse |
listLbTrafficExtensions(LocationName parent)
public final DepServiceClient.ListLbTrafficExtensionsPagedResponse listLbTrafficExtensions(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 |
LocationName Required. The project and location from which the |
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 |
String Required. 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.
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.ListLocationsRequest The 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.
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.
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_DENIED
errors.
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.SetIamPolicyRequest The 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_DENIED
errors.
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.TestIamPermissionsRequest The 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> |
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 |
LbRouteExtension Required. |
updateMask |
FieldMask Optional. 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 |
UpdateLbRouteExtensionRequest The 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 |
LbTrafficExtension Required. |
updateMask |
FieldMask Optional. 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 |
UpdateLbTrafficExtensionRequest The 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> |