Class DepServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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 `LbTrafficExtension` resources in a given project and location. |
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 `LbTrafficExtension` resource. |
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 `LbTrafficExtension` resource in a given project and location. |
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 `OperationFuture`, which is used to track polling of the service.
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 `LbTrafficExtension` resource. |
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 `OperationFuture`, which is used to track polling of the service.
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 `LbTrafficExtension` resource. |
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 `OperationFuture`, which is used to track polling of the service.
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 `LbRouteExtension` resources in a given project and location. |
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 `LbRouteExtension` resource. |
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 `LbRouteExtension` resource in a given project and location. |
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 `OperationFuture`, which is used to track polling of the service.
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 `LbRouteExtension` resource. |
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 `OperationFuture`, which is used to track polling of the service.
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 `LbRouteExtension` resource. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLbEdgeExtensions |
Lists `LbEdgeExtension` resources in a given project and location. |
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.
|
GetLbEdgeExtension |
Gets details of the specified `LbEdgeExtension` resource. |
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.
|
CreateLbEdgeExtension |
Creates a new `LbEdgeExtension` resource in a given project and location. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateLbEdgeExtension |
Updates the parameters of the specified `LbEdgeExtension` resource. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteLbEdgeExtension |
Deletes the specified `LbEdgeExtension` resource. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListAuthzExtensions |
Lists `AuthzExtension` resources in a given project and location. |
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.
|
GetAuthzExtension |
Gets details of the specified `AuthzExtension` resource. |
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.
|
CreateAuthzExtension |
Creates a new `AuthzExtension` resource in a given project and location. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateAuthzExtension |
Updates the parameters of the specified `AuthzExtension` resource. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteAuthzExtension |
Deletes the specified `AuthzExtension` resource. |
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 `OperationFuture`, which is used to track polling of the service.
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 `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
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 `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. |
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDepServiceClient(DepServiceSettings settings) Constructs an instance of DepServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final DepServiceClientcreate()Constructs an instance of DepServiceClient with default settings.static final DepServiceClientcreate(DepServiceSettings settings) Constructs an instance of DepServiceClient, using the given settings.static final DepServiceClientcreate(DepServiceStub stub) Constructs an instance of DepServiceClient, using the given stub for making calls.Creates a new `AuthzExtension` resource in a given project and location.createAuthzExtensionAsync(LocationName parent, AuthzExtension authzExtension, String authzExtensionId) Creates a new `AuthzExtension` resource in a given project and location.createAuthzExtensionAsync(String parent, AuthzExtension authzExtension, String authzExtensionId) Creates a new `AuthzExtension` resource in a given project and location.Creates a new `AuthzExtension` resource in a given project and location.Creates a new `AuthzExtension` resource in a given project and location.Creates a new `LbEdgeExtension` resource in a given project and location.createLbEdgeExtensionAsync(LocationName parent, LbEdgeExtension lbEdgeExtension, String lbEdgeExtensionId) Creates a new `LbEdgeExtension` resource in a given project and location.createLbEdgeExtensionAsync(String parent, LbEdgeExtension lbEdgeExtension, String lbEdgeExtensionId) Creates a new `LbEdgeExtension` resource in a given project and location.Creates a new `LbEdgeExtension` resource in a given project and location.Creates a new `LbEdgeExtension` resource in a given project and location.Creates a new `LbRouteExtension` resource in a given project and location.createLbRouteExtensionAsync(LocationName parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId) Creates a new `LbRouteExtension` resource in a given project and location.createLbRouteExtensionAsync(String parent, LbRouteExtension lbRouteExtension, String lbRouteExtensionId) Creates a new `LbRouteExtension` resource in a given project and location.Creates a new `LbRouteExtension` resource in a given project and location.Creates a new `LbRouteExtension` resource in a given project and location.Creates a new `LbTrafficExtension` resource in a given project and location.createLbTrafficExtensionAsync(LocationName parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId) Creates a new `LbTrafficExtension` resource in a given project and location.createLbTrafficExtensionAsync(String parent, LbTrafficExtension lbTrafficExtension, String lbTrafficExtensionId) Creates a new `LbTrafficExtension` resource in a given project and location.Creates a new `LbTrafficExtension` resource in a given project and location.Creates a new `LbTrafficExtension` resource in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `AuthzExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `AuthzExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `AuthzExtension` resource.Deletes the specified `AuthzExtension` resource.final OperationCallable<DeleteAuthzExtensionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified `AuthzExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbEdgeExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbEdgeExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbEdgeExtension` resource.Deletes the specified `LbEdgeExtension` resource.final OperationCallable<DeleteLbEdgeExtensionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified `LbEdgeExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbRouteExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbRouteExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbRouteExtension` resource.Deletes the specified `LbRouteExtension` resource.final OperationCallable<DeleteLbRouteExtensionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified `LbRouteExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbTrafficExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbTrafficExtension` resource.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes the specified `LbTrafficExtension` resource.Deletes the specified `LbTrafficExtension` resource.final OperationCallable<DeleteLbTrafficExtensionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes the specified `LbTrafficExtension` resource.final AuthzExtensionGets details of the specified `AuthzExtension` resource.final AuthzExtensionGets details of the specified `AuthzExtension` resource.final AuthzExtensiongetAuthzExtension(String name) Gets details of the specified `AuthzExtension` resource.Gets details of the specified `AuthzExtension` resource.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LbEdgeExtensionGets details of the specified `LbEdgeExtension` resource.final LbEdgeExtensionGets details of the specified `LbEdgeExtension` resource.final LbEdgeExtensiongetLbEdgeExtension(String name) Gets details of the specified `LbEdgeExtension` resource.Gets details of the specified `LbEdgeExtension` resource.final LbRouteExtensionGets details of the specified `LbRouteExtension` resource.final LbRouteExtensionGets details of the specified `LbRouteExtension` resource.final LbRouteExtensiongetLbRouteExtension(String name) Gets details of the specified `LbRouteExtension` resource.Gets details of the specified `LbRouteExtension` resource.final LbTrafficExtensionGets details of the specified `LbTrafficExtension` resource.final LbTrafficExtensionGets details of the specified `LbTrafficExtension` resource.final LbTrafficExtensiongetLbTrafficExtension(String name) Gets details of the specified `LbTrafficExtension` resource.Gets details of the specified `LbTrafficExtension` resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final DepServiceSettingsgetStub()booleanbooleanLists `AuthzExtension` resources in a given project and location.listAuthzExtensions(LocationName parent) Lists `AuthzExtension` resources in a given project and location.listAuthzExtensions(String parent) Lists `AuthzExtension` resources in a given project and location.Lists `AuthzExtension` resources in a given project and location.Lists `AuthzExtension` resources in a given project and location.Lists `LbEdgeExtension` resources in a given project and location.listLbEdgeExtensions(LocationName parent) Lists `LbEdgeExtension` resources in a given project and location.listLbEdgeExtensions(String parent) Lists `LbEdgeExtension` resources in a given project and location.Lists `LbEdgeExtension` resources in a given project and location.Lists `LbEdgeExtension` resources in a given project and location.Lists `LbRouteExtension` resources in a given project and location.listLbRouteExtensions(LocationName parent) Lists `LbRouteExtension` resources in a given project and location.listLbRouteExtensions(String parent) Lists `LbRouteExtension` resources in a given project and location.Lists `LbRouteExtension` resources in a given project and location.final UnaryCallable<ListLbRouteExtensionsRequest,DepServiceClient.ListLbRouteExtensionsPagedResponse> Lists `LbRouteExtension` resources in a given project and location.Lists `LbTrafficExtension` resources in a given project and location.listLbTrafficExtensions(LocationName parent) Lists `LbTrafficExtension` resources in a given project and location.listLbTrafficExtensions(String parent) Lists `LbTrafficExtension` resources in a given project and location.Lists `LbTrafficExtension` resources in a given project and location.final UnaryCallable<ListLbTrafficExtensionsRequest,DepServiceClient.ListLbTrafficExtensionsPagedResponse> Lists `LbTrafficExtension` resources in a given project and location.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateAuthzExtensionAsync(AuthzExtension authzExtension, com.google.protobuf.FieldMask updateMask) Updates the parameters of the specified `AuthzExtension` resource.Updates the parameters of the specified `AuthzExtension` resource.Updates the parameters of the specified `AuthzExtension` resource.Updates the parameters of the specified `AuthzExtension` resource.updateLbEdgeExtensionAsync(LbEdgeExtension lbEdgeExtension, com.google.protobuf.FieldMask updateMask) Updates the parameters of the specified `LbEdgeExtension` resource.Updates the parameters of the specified `LbEdgeExtension` resource.Updates the parameters of the specified `LbEdgeExtension` resource.Updates the parameters of the specified `LbEdgeExtension` resource.updateLbRouteExtensionAsync(LbRouteExtension lbRouteExtension, com.google.protobuf.FieldMask updateMask) Updates the parameters of the specified `LbRouteExtension` resource.Updates the parameters of the specified `LbRouteExtension` resource.Updates the parameters of the specified `LbRouteExtension` resource.Updates the parameters of the specified `LbRouteExtension` resource.updateLbTrafficExtensionAsync(LbTrafficExtension lbTrafficExtension, com.google.protobuf.FieldMask updateMask) Updates the parameters of the specified `LbTrafficExtension` resource.Updates the parameters of the specified `LbTrafficExtension` resource.Updates the parameters of the specified `LbTrafficExtension` resource.Updates the parameters of the specified `LbTrafficExtension` resource.
-
Constructor Details
-
DepServiceClient
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.- Throws:
IOException
-
DepServiceClient
-
-
Method Details
-
create
Constructs an instance of DepServiceClient with default settings.- Throws:
IOException
-
create
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.- Throws:
IOException
-
create
Constructs an instance of DepServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DepServiceSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listLbTrafficExtensions
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); } }- Parameters:
parent- Required. The project and location from which the `LbTrafficExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listLbTrafficExtensions
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); } }- Parameters:
parent- Required. The project and location from which the `LbTrafficExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listLbTrafficExtensions
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getLbTrafficExtension
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); }- Parameters:
name- Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.- Throws:
ApiException- if the remote call fails
-
getLbTrafficExtension
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); }- Parameters:
name- Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.- Throws:
ApiException- if the remote call fails
-
getLbTrafficExtension
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createLbTrafficExtensionAsync
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:
parent- Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.lbTrafficExtension- Required. `LbTrafficExtension` resource to be created.lbTrafficExtensionId- Required. User-provided ID of the `LbTrafficExtension` resource to be created.- Throws:
ApiException- if the remote call fails
-
createLbTrafficExtensionAsync
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:
parent- Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.lbTrafficExtension- Required. `LbTrafficExtension` resource to be created.lbTrafficExtensionId- Required. User-provided ID of the `LbTrafficExtension` resource to be created.- Throws:
ApiException- if the remote call fails
-
createLbTrafficExtensionAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createLbTrafficExtensionOperationCallable
public final OperationCallable<CreateLbTrafficExtensionRequest,LbTrafficExtension, createLbTrafficExtensionOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateLbTrafficExtensionAsync
public final OperationFuture<LbTrafficExtension,OperationMetadata> updateLbTrafficExtensionAsync(LbTrafficExtension lbTrafficExtension, com.google.protobuf.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:
lbTrafficExtension- Required. `LbTrafficExtension` resource being updated.updateMask- Optional. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.- Throws:
ApiException- if the remote call fails
-
updateLbTrafficExtensionAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateLbTrafficExtensionOperationCallable
public final OperationCallable<UpdateLbTrafficExtensionRequest,LbTrafficExtension, updateLbTrafficExtensionOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteLbTrafficExtensionAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.- Throws:
ApiException- if the remote call fails
-
deleteLbTrafficExtensionAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.- Throws:
ApiException- if the remote call fails
-
deleteLbTrafficExtensionAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteLbTrafficExtensionOperationCallable
public final OperationCallable<DeleteLbTrafficExtensionRequest,com.google.protobuf.Empty, deleteLbTrafficExtensionOperationCallable()OperationMetadata> 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(); } -
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(); } -
listLbRouteExtensions
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); } }- Parameters:
parent- Required. The project and location from which the `LbRouteExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listLbRouteExtensions
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); } }- Parameters:
parent- Required. The project and location from which the `LbRouteExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listLbRouteExtensions
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getLbRouteExtension
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); }- Parameters:
name- Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.- Throws:
ApiException- if the remote call fails
-
getLbRouteExtension
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); }- Parameters:
name- Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.- Throws:
ApiException- if the remote call fails
-
getLbRouteExtension
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createLbRouteExtensionAsync
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:
parent- Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.lbRouteExtension- Required. `LbRouteExtension` resource to be created.lbRouteExtensionId- Required. User-provided ID of the `LbRouteExtension` resource to be created.- Throws:
ApiException- if the remote call fails
-
createLbRouteExtensionAsync
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:
parent- Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.lbRouteExtension- Required. `LbRouteExtension` resource to be created.lbRouteExtensionId- Required. User-provided ID of the `LbRouteExtension` resource to be created.- Throws:
ApiException- if the remote call fails
-
createLbRouteExtensionAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createLbRouteExtensionOperationCallable
public final OperationCallable<CreateLbRouteExtensionRequest,LbRouteExtension, createLbRouteExtensionOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateLbRouteExtensionAsync
public final OperationFuture<LbRouteExtension,OperationMetadata> updateLbRouteExtensionAsync(LbRouteExtension lbRouteExtension, com.google.protobuf.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:
lbRouteExtension- Required. `LbRouteExtension` resource being updated.updateMask- Optional. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.- Throws:
ApiException- if the remote call fails
-
updateLbRouteExtensionAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateLbRouteExtensionOperationCallable
public final OperationCallable<UpdateLbRouteExtensionRequest,LbRouteExtension, updateLbRouteExtensionOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteLbRouteExtensionAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.- Throws:
ApiException- if the remote call fails
-
deleteLbRouteExtensionAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.- Throws:
ApiException- if the remote call fails
-
deleteLbRouteExtensionAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteLbRouteExtensionOperationCallable
public final OperationCallable<DeleteLbRouteExtensionRequest,com.google.protobuf.Empty, deleteLbRouteExtensionOperationCallable()OperationMetadata> 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(); } -
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(); } -
listLbEdgeExtensions
public final DepServiceClient.ListLbEdgeExtensionsPagedResponse listLbEdgeExtensions(LocationName parent) Lists `LbEdgeExtension` 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 (LbEdgeExtension element : depServiceClient.listLbEdgeExtensions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the `LbEdgeExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listLbEdgeExtensions
Lists `LbEdgeExtension` 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 (LbEdgeExtension element : depServiceClient.listLbEdgeExtensions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the `LbEdgeExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listLbEdgeExtensions
public final DepServiceClient.ListLbEdgeExtensionsPagedResponse listLbEdgeExtensions(ListLbEdgeExtensionsRequest request) Lists `LbEdgeExtension` 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()) { ListLbEdgeExtensionsRequest request = ListLbEdgeExtensionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (LbEdgeExtension element : depServiceClient.listLbEdgeExtensions(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLbEdgeExtensionsPagedCallable
public final UnaryCallable<ListLbEdgeExtensionsRequest,DepServiceClient.ListLbEdgeExtensionsPagedResponse> listLbEdgeExtensionsPagedCallable()Lists `LbEdgeExtension` 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()) { ListLbEdgeExtensionsRequest request = ListLbEdgeExtensionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<LbEdgeExtension> future = depServiceClient.listLbEdgeExtensionsPagedCallable().futureCall(request); // Do something. for (LbEdgeExtension element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLbEdgeExtensionsCallable
public final UnaryCallable<ListLbEdgeExtensionsRequest,ListLbEdgeExtensionsResponse> listLbEdgeExtensionsCallable()Lists `LbEdgeExtension` 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()) { ListLbEdgeExtensionsRequest request = ListLbEdgeExtensionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListLbEdgeExtensionsResponse response = depServiceClient.listLbEdgeExtensionsCallable().call(request); for (LbEdgeExtension element : response.getLbEdgeExtensionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLbEdgeExtension
Gets details of the specified `LbEdgeExtension` 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()) { LbEdgeExtensionName name = LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]"); LbEdgeExtension response = depServiceClient.getLbEdgeExtension(name); }- Parameters:
name- Required. A name of the `LbEdgeExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.- Throws:
ApiException- if the remote call fails
-
getLbEdgeExtension
Gets details of the specified `LbEdgeExtension` 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 = LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]").toString(); LbEdgeExtension response = depServiceClient.getLbEdgeExtension(name); }- Parameters:
name- Required. A name of the `LbEdgeExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.- Throws:
ApiException- if the remote call fails
-
getLbEdgeExtension
Gets details of the specified `LbEdgeExtension` 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()) { GetLbEdgeExtensionRequest request = GetLbEdgeExtensionRequest.newBuilder() .setName( LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]") .toString()) .build(); LbEdgeExtension response = depServiceClient.getLbEdgeExtension(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLbEdgeExtensionCallable
Gets details of the specified `LbEdgeExtension` 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()) { GetLbEdgeExtensionRequest request = GetLbEdgeExtensionRequest.newBuilder() .setName( LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]") .toString()) .build(); ApiFuture<LbEdgeExtension> future = depServiceClient.getLbEdgeExtensionCallable().futureCall(request); // Do something. LbEdgeExtension response = future.get(); } -
createLbEdgeExtensionAsync
public final OperationFuture<LbEdgeExtension,OperationMetadata> createLbEdgeExtensionAsync(LocationName parent, LbEdgeExtension lbEdgeExtension, String lbEdgeExtensionId) Creates a new `LbEdgeExtension` 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]"); LbEdgeExtension lbEdgeExtension = LbEdgeExtension.newBuilder().build(); String lbEdgeExtensionId = "lbEdgeExtensionId673551207"; LbEdgeExtension response = depServiceClient .createLbEdgeExtensionAsync(parent, lbEdgeExtension, lbEdgeExtensionId) .get(); }- Parameters:
parent- Required. The parent resource of the `LbEdgeExtension` resource. Must be in the format `projects/{project}/locations/{location}`.lbEdgeExtension- Required. `LbEdgeExtension` resource to be created.lbEdgeExtensionId- Required. User-provided ID of the `LbEdgeExtension` resource to be created.- Throws:
ApiException- if the remote call fails
-
createLbEdgeExtensionAsync
public final OperationFuture<LbEdgeExtension,OperationMetadata> createLbEdgeExtensionAsync(String parent, LbEdgeExtension lbEdgeExtension, String lbEdgeExtensionId) Creates a new `LbEdgeExtension` 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(); LbEdgeExtension lbEdgeExtension = LbEdgeExtension.newBuilder().build(); String lbEdgeExtensionId = "lbEdgeExtensionId673551207"; LbEdgeExtension response = depServiceClient .createLbEdgeExtensionAsync(parent, lbEdgeExtension, lbEdgeExtensionId) .get(); }- Parameters:
parent- Required. The parent resource of the `LbEdgeExtension` resource. Must be in the format `projects/{project}/locations/{location}`.lbEdgeExtension- Required. `LbEdgeExtension` resource to be created.lbEdgeExtensionId- Required. User-provided ID of the `LbEdgeExtension` resource to be created.- Throws:
ApiException- if the remote call fails
-
createLbEdgeExtensionAsync
public final OperationFuture<LbEdgeExtension,OperationMetadata> createLbEdgeExtensionAsync(CreateLbEdgeExtensionRequest request) Creates a new `LbEdgeExtension` 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()) { CreateLbEdgeExtensionRequest request = CreateLbEdgeExtensionRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setLbEdgeExtensionId("lbEdgeExtensionId673551207") .setLbEdgeExtension(LbEdgeExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); LbEdgeExtension response = depServiceClient.createLbEdgeExtensionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createLbEdgeExtensionOperationCallable
public final OperationCallable<CreateLbEdgeExtensionRequest,LbEdgeExtension, createLbEdgeExtensionOperationCallable()OperationMetadata> Creates a new `LbEdgeExtension` 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()) { CreateLbEdgeExtensionRequest request = CreateLbEdgeExtensionRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setLbEdgeExtensionId("lbEdgeExtensionId673551207") .setLbEdgeExtension(LbEdgeExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<LbEdgeExtension, OperationMetadata> future = depServiceClient.createLbEdgeExtensionOperationCallable().futureCall(request); // Do something. LbEdgeExtension response = future.get(); } -
createLbEdgeExtensionCallable
Creates a new `LbEdgeExtension` 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()) { CreateLbEdgeExtensionRequest request = CreateLbEdgeExtensionRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setLbEdgeExtensionId("lbEdgeExtensionId673551207") .setLbEdgeExtension(LbEdgeExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = depServiceClient.createLbEdgeExtensionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateLbEdgeExtensionAsync
public final OperationFuture<LbEdgeExtension,OperationMetadata> updateLbEdgeExtensionAsync(LbEdgeExtension lbEdgeExtension, com.google.protobuf.FieldMask updateMask) Updates the parameters of the specified `LbEdgeExtension` 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()) { LbEdgeExtension lbEdgeExtension = LbEdgeExtension.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); LbEdgeExtension response = depServiceClient.updateLbEdgeExtensionAsync(lbEdgeExtension, updateMask).get(); }- Parameters:
lbEdgeExtension- Required. `LbEdgeExtension` resource being updated.updateMask- Optional. Used to specify the fields to be overwritten in the `LbEdgeExtension` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.- Throws:
ApiException- if the remote call fails
-
updateLbEdgeExtensionAsync
public final OperationFuture<LbEdgeExtension,OperationMetadata> updateLbEdgeExtensionAsync(UpdateLbEdgeExtensionRequest request) Updates the parameters of the specified `LbEdgeExtension` 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()) { UpdateLbEdgeExtensionRequest request = UpdateLbEdgeExtensionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setLbEdgeExtension(LbEdgeExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); LbEdgeExtension response = depServiceClient.updateLbEdgeExtensionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateLbEdgeExtensionOperationCallable
public final OperationCallable<UpdateLbEdgeExtensionRequest,LbEdgeExtension, updateLbEdgeExtensionOperationCallable()OperationMetadata> Updates the parameters of the specified `LbEdgeExtension` 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()) { UpdateLbEdgeExtensionRequest request = UpdateLbEdgeExtensionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setLbEdgeExtension(LbEdgeExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<LbEdgeExtension, OperationMetadata> future = depServiceClient.updateLbEdgeExtensionOperationCallable().futureCall(request); // Do something. LbEdgeExtension response = future.get(); } -
updateLbEdgeExtensionCallable
Updates the parameters of the specified `LbEdgeExtension` 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()) { UpdateLbEdgeExtensionRequest request = UpdateLbEdgeExtensionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setLbEdgeExtension(LbEdgeExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = depServiceClient.updateLbEdgeExtensionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteLbEdgeExtensionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLbEdgeExtensionAsync(LbEdgeExtensionName name) Deletes the specified `LbEdgeExtension` 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()) { LbEdgeExtensionName name = LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]"); depServiceClient.deleteLbEdgeExtensionAsync(name).get(); }- Parameters:
name- Required. The name of the `LbEdgeExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.- Throws:
ApiException- if the remote call fails
-
deleteLbEdgeExtensionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLbEdgeExtensionAsync(String name) Deletes the specified `LbEdgeExtension` 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 = LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]").toString(); depServiceClient.deleteLbEdgeExtensionAsync(name).get(); }- Parameters:
name- Required. The name of the `LbEdgeExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbEdgeExtensions/{lb_edge_extension}`.- Throws:
ApiException- if the remote call fails
-
deleteLbEdgeExtensionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteLbEdgeExtensionAsync(DeleteLbEdgeExtensionRequest request) Deletes the specified `LbEdgeExtension` 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()) { DeleteLbEdgeExtensionRequest request = DeleteLbEdgeExtensionRequest.newBuilder() .setName( LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]") .toString()) .setRequestId("requestId693933066") .build(); depServiceClient.deleteLbEdgeExtensionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteLbEdgeExtensionOperationCallable
public final OperationCallable<DeleteLbEdgeExtensionRequest,com.google.protobuf.Empty, deleteLbEdgeExtensionOperationCallable()OperationMetadata> Deletes the specified `LbEdgeExtension` 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()) { DeleteLbEdgeExtensionRequest request = DeleteLbEdgeExtensionRequest.newBuilder() .setName( LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]") .toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = depServiceClient.deleteLbEdgeExtensionOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteLbEdgeExtensionCallable
Deletes the specified `LbEdgeExtension` 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()) { DeleteLbEdgeExtensionRequest request = DeleteLbEdgeExtensionRequest.newBuilder() .setName( LbEdgeExtensionName.of("[PROJECT]", "[LOCATION]", "[LB_EDGE_EXTENSION]") .toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = depServiceClient.deleteLbEdgeExtensionCallable().futureCall(request); // Do something. future.get(); } -
listAuthzExtensions
public final DepServiceClient.ListAuthzExtensionsPagedResponse listAuthzExtensions(LocationName parent) Lists `AuthzExtension` 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 (AuthzExtension element : depServiceClient.listAuthzExtensions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the `AuthzExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listAuthzExtensions
Lists `AuthzExtension` 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 (AuthzExtension element : depServiceClient.listAuthzExtensions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The project and location from which the `AuthzExtension` resources are listed. These values are specified in the following format: `projects/{project}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listAuthzExtensions
public final DepServiceClient.ListAuthzExtensionsPagedResponse listAuthzExtensions(ListAuthzExtensionsRequest request) Lists `AuthzExtension` 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()) { ListAuthzExtensionsRequest request = ListAuthzExtensionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (AuthzExtension element : depServiceClient.listAuthzExtensions(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listAuthzExtensionsPagedCallable
public final UnaryCallable<ListAuthzExtensionsRequest,DepServiceClient.ListAuthzExtensionsPagedResponse> listAuthzExtensionsPagedCallable()Lists `AuthzExtension` 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()) { ListAuthzExtensionsRequest request = ListAuthzExtensionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<AuthzExtension> future = depServiceClient.listAuthzExtensionsPagedCallable().futureCall(request); // Do something. for (AuthzExtension element : future.get().iterateAll()) { // doThingsWith(element); } } -
listAuthzExtensionsCallable
public final UnaryCallable<ListAuthzExtensionsRequest,ListAuthzExtensionsResponse> listAuthzExtensionsCallable()Lists `AuthzExtension` 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()) { ListAuthzExtensionsRequest request = ListAuthzExtensionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListAuthzExtensionsResponse response = depServiceClient.listAuthzExtensionsCallable().call(request); for (AuthzExtension element : response.getAuthzExtensionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getAuthzExtension
Gets details of the specified `AuthzExtension` 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()) { AuthzExtensionName name = AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); AuthzExtension response = depServiceClient.getAuthzExtension(name); }- Parameters:
name- Required. A name of the `AuthzExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.- Throws:
ApiException- if the remote call fails
-
getAuthzExtension
Gets details of the specified `AuthzExtension` 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 = AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString(); AuthzExtension response = depServiceClient.getAuthzExtension(name); }- Parameters:
name- Required. A name of the `AuthzExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.- Throws:
ApiException- if the remote call fails
-
getAuthzExtension
Gets details of the specified `AuthzExtension` 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()) { GetAuthzExtensionRequest request = GetAuthzExtensionRequest.newBuilder() .setName( AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) .build(); AuthzExtension response = depServiceClient.getAuthzExtension(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getAuthzExtensionCallable
Gets details of the specified `AuthzExtension` 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()) { GetAuthzExtensionRequest request = GetAuthzExtensionRequest.newBuilder() .setName( AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) .build(); ApiFuture<AuthzExtension> future = depServiceClient.getAuthzExtensionCallable().futureCall(request); // Do something. AuthzExtension response = future.get(); } -
createAuthzExtensionAsync
public final OperationFuture<AuthzExtension,OperationMetadata> createAuthzExtensionAsync(LocationName parent, AuthzExtension authzExtension, String authzExtensionId) Creates a new `AuthzExtension` 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]"); AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); String authzExtensionId = "authzExtensionId-973067640"; AuthzExtension response = depServiceClient .createAuthzExtensionAsync(parent, authzExtension, authzExtensionId) .get(); }- Parameters:
parent- Required. The parent resource of the `AuthzExtension` resource. Must be in the format `projects/{project}/locations/{location}`.authzExtension- Required. `AuthzExtension` resource to be created.authzExtensionId- Required. User-provided ID of the `AuthzExtension` resource to be created.- Throws:
ApiException- if the remote call fails
-
createAuthzExtensionAsync
public final OperationFuture<AuthzExtension,OperationMetadata> createAuthzExtensionAsync(String parent, AuthzExtension authzExtension, String authzExtensionId) Creates a new `AuthzExtension` 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(); AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); String authzExtensionId = "authzExtensionId-973067640"; AuthzExtension response = depServiceClient .createAuthzExtensionAsync(parent, authzExtension, authzExtensionId) .get(); }- Parameters:
parent- Required. The parent resource of the `AuthzExtension` resource. Must be in the format `projects/{project}/locations/{location}`.authzExtension- Required. `AuthzExtension` resource to be created.authzExtensionId- Required. User-provided ID of the `AuthzExtension` resource to be created.- Throws:
ApiException- if the remote call fails
-
createAuthzExtensionAsync
public final OperationFuture<AuthzExtension,OperationMetadata> createAuthzExtensionAsync(CreateAuthzExtensionRequest request) Creates a new `AuthzExtension` 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()) { CreateAuthzExtensionRequest request = CreateAuthzExtensionRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setAuthzExtensionId("authzExtensionId-973067640") .setAuthzExtension(AuthzExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); AuthzExtension response = depServiceClient.createAuthzExtensionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createAuthzExtensionOperationCallable
public final OperationCallable<CreateAuthzExtensionRequest,AuthzExtension, createAuthzExtensionOperationCallable()OperationMetadata> Creates a new `AuthzExtension` 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()) { CreateAuthzExtensionRequest request = CreateAuthzExtensionRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setAuthzExtensionId("authzExtensionId-973067640") .setAuthzExtension(AuthzExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<AuthzExtension, OperationMetadata> future = depServiceClient.createAuthzExtensionOperationCallable().futureCall(request); // Do something. AuthzExtension response = future.get(); } -
createAuthzExtensionCallable
Creates a new `AuthzExtension` 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()) { CreateAuthzExtensionRequest request = CreateAuthzExtensionRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setAuthzExtensionId("authzExtensionId-973067640") .setAuthzExtension(AuthzExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = depServiceClient.createAuthzExtensionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateAuthzExtensionAsync
public final OperationFuture<AuthzExtension,OperationMetadata> updateAuthzExtensionAsync(AuthzExtension authzExtension, com.google.protobuf.FieldMask updateMask) Updates the parameters of the specified `AuthzExtension` 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()) { AuthzExtension authzExtension = AuthzExtension.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); AuthzExtension response = depServiceClient.updateAuthzExtensionAsync(authzExtension, updateMask).get(); }- Parameters:
authzExtension- Required. `AuthzExtension` resource being updated.updateMask- Required. Used to specify the fields to be overwritten in the `AuthzExtension` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.- Throws:
ApiException- if the remote call fails
-
updateAuthzExtensionAsync
public final OperationFuture<AuthzExtension,OperationMetadata> updateAuthzExtensionAsync(UpdateAuthzExtensionRequest request) Updates the parameters of the specified `AuthzExtension` 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()) { UpdateAuthzExtensionRequest request = UpdateAuthzExtensionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setAuthzExtension(AuthzExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); AuthzExtension response = depServiceClient.updateAuthzExtensionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateAuthzExtensionOperationCallable
public final OperationCallable<UpdateAuthzExtensionRequest,AuthzExtension, updateAuthzExtensionOperationCallable()OperationMetadata> Updates the parameters of the specified `AuthzExtension` 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()) { UpdateAuthzExtensionRequest request = UpdateAuthzExtensionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setAuthzExtension(AuthzExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); OperationFuture<AuthzExtension, OperationMetadata> future = depServiceClient.updateAuthzExtensionOperationCallable().futureCall(request); // Do something. AuthzExtension response = future.get(); } -
updateAuthzExtensionCallable
Updates the parameters of the specified `AuthzExtension` 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()) { UpdateAuthzExtensionRequest request = UpdateAuthzExtensionRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setAuthzExtension(AuthzExtension.newBuilder().build()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = depServiceClient.updateAuthzExtensionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteAuthzExtensionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAuthzExtensionAsync(AuthzExtensionName name) Deletes the specified `AuthzExtension` 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()) { AuthzExtensionName name = AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]"); depServiceClient.deleteAuthzExtensionAsync(name).get(); }- Parameters:
name- Required. The name of the `AuthzExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.- Throws:
ApiException- if the remote call fails
-
deleteAuthzExtensionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAuthzExtensionAsync(String name) Deletes the specified `AuthzExtension` 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 = AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString(); depServiceClient.deleteAuthzExtensionAsync(name).get(); }- Parameters:
name- Required. The name of the `AuthzExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/authzExtensions/{authz_extension}`.- Throws:
ApiException- if the remote call fails
-
deleteAuthzExtensionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAuthzExtensionAsync(DeleteAuthzExtensionRequest request) Deletes the specified `AuthzExtension` 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()) { DeleteAuthzExtensionRequest request = DeleteAuthzExtensionRequest.newBuilder() .setName( AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) .setRequestId("requestId693933066") .build(); depServiceClient.deleteAuthzExtensionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteAuthzExtensionOperationCallable
public final OperationCallable<DeleteAuthzExtensionRequest,com.google.protobuf.Empty, deleteAuthzExtensionOperationCallable()OperationMetadata> Deletes the specified `AuthzExtension` 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()) { DeleteAuthzExtensionRequest request = DeleteAuthzExtensionRequest.newBuilder() .setName( AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) .setRequestId("requestId693933066") .build(); OperationFuture<Empty, OperationMetadata> future = depServiceClient.deleteAuthzExtensionOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteAuthzExtensionCallable
Deletes the specified `AuthzExtension` 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()) { DeleteAuthzExtensionRequest request = DeleteAuthzExtensionRequest.newBuilder() .setName( AuthzExtensionName.of("[PROJECT]", "[LOCATION]", "[AUTHZ_EXTENSION]").toString()) .setRequestId("requestId693933066") .build(); ApiFuture<Operation> future = depServiceClient.deleteAuthzExtensionCallable().futureCall(request); // Do something. future.get(); } -
listLocations
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getLocation
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
setIamPolicy
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
getIamPolicy
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
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 `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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-