Class RegionBackendBucketsClient (1.105.0)

GitHub RepositoryProduct Reference

Service Description: The RegionBackendBuckets API.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String backendBucket = "backendBucket713751966";
   BackendBucket response = regionBackendBucketsClient.get(project, region, backendBucket);
 }
 

Note: close() needs to be called on the RegionBackendBucketsClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

Delete

Deletes the specified regional BackendBucket resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteAsync(DeleteRegionBackendBucketRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteAsync(String project, String region, String backendBucket)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteOperationCallable()

  • deleteCallable()

Get

Returns the specified regional BackendBucket resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • get(GetRegionBackendBucketRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • get(String project, String region, String backendBucket)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCallable()

GetIamPolicy

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRegionBackendBucketRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getIamPolicy(String project, String region, String resource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

Insert

Creates a RegionBackendBucket in the specified project in the given scope using the parameters that are included in the request.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • insertAsync(InsertRegionBackendBucketRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • insertAsync(String project, String region, BackendBucket backendBucketResource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • insertOperationCallable()

  • insertCallable()

List

Retrieves the list of BackendBucket resources available to the specified project in the given region.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • list(ListRegionBackendBucketsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • list(String project, String region)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPagedCallable()

  • listCallable()

ListUsable

Retrieves a list of all usable backend buckets in the specified project in the given region.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listUsable(ListUsableRegionBackendBucketsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listUsable(String project, String region)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listUsablePagedCallable()

  • listUsableCallable()

Patch

Updates the specified BackendBucket resource with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • patchAsync(PatchRegionBackendBucketRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • patchAsync(String project, String region, String backendBucket, BackendBucket backendBucketResource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • patchOperationCallable()

  • patchCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replaces any existing policy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRegionBackendBucketRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • setIamPolicy(String project, String region, String resource, RegionSetPolicyRequest regionSetPolicyRequestResource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRegionBackendBucketRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • testIamPermissions(String project, String region, String resource, TestPermissionsRequest testPermissionsRequestResource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

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 RegionBackendBucketsSettings 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
 RegionBackendBucketsSettings regionBackendBucketsSettings =
     RegionBackendBucketsSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create(regionBackendBucketsSettings);
 

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
 RegionBackendBucketsSettings regionBackendBucketsSettings =
     RegionBackendBucketsSettings.newBuilder().setEndpoint(myEndpoint).build();
 RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create(regionBackendBucketsSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > RegionBackendBucketsClient

Static Methods

create()

public static final RegionBackendBucketsClient create()

Constructs an instance of RegionBackendBucketsClient with default settings.

Returns
Type Description
RegionBackendBucketsClient
Exceptions
Type Description
IOException

create(RegionBackendBucketsSettings settings)

public static final RegionBackendBucketsClient create(RegionBackendBucketsSettings settings)

Constructs an instance of RegionBackendBucketsClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings RegionBackendBucketsSettings
Returns
Type Description
RegionBackendBucketsClient
Exceptions
Type Description
IOException

create(RegionBackendBucketsStub stub)

public static final RegionBackendBucketsClient create(RegionBackendBucketsStub stub)

Constructs an instance of RegionBackendBucketsClient, using the given stub for making calls. This is for advanced usage - prefer using create(RegionBackendBucketsSettings).

Parameter
Name Description
stub RegionBackendBucketsStub
Returns
Type Description
RegionBackendBucketsClient

Constructors

RegionBackendBucketsClient(RegionBackendBucketsSettings settings)

protected RegionBackendBucketsClient(RegionBackendBucketsSettings settings)

Constructs an instance of RegionBackendBucketsClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings RegionBackendBucketsSettings

RegionBackendBucketsClient(RegionBackendBucketsStub stub)

protected RegionBackendBucketsClient(RegionBackendBucketsStub stub)
Parameter
Name Description
stub RegionBackendBucketsStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

deleteAsync(DeleteRegionBackendBucketRequest request)

public final OperationFuture<Operation,Operation> deleteAsync(DeleteRegionBackendBucketRequest request)

Deletes the specified regional BackendBucket 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   DeleteRegionBackendBucketRequest request =
       DeleteRegionBackendBucketRequest.newBuilder()
           .setBackendBucket("backendBucket713751966")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionBackendBucketsClient.deleteAsync(request).get();
 }
 
Parameter
Name Description
request DeleteRegionBackendBucketRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Operation,Operation>

deleteAsync(String project, String region, String backendBucket)

public final OperationFuture<Operation,Operation> deleteAsync(String project, String region, String backendBucket)

Deletes the specified regional BackendBucket 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String backendBucket = "backendBucket713751966";
   Operation response =
       regionBackendBucketsClient.deleteAsync(project, region, backendBucket).get();
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request.

backendBucket String

Name of the BackendBucket resource to delete.

Returns
Type Description
OperationFuture<Operation,Operation>

deleteCallable()

public final UnaryCallable<DeleteRegionBackendBucketRequest,Operation> deleteCallable()

Deletes the specified regional BackendBucket 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   DeleteRegionBackendBucketRequest request =
       DeleteRegionBackendBucketRequest.newBuilder()
           .setBackendBucket("backendBucket713751966")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = regionBackendBucketsClient.deleteCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteRegionBackendBucketRequest,Operation>

deleteOperationCallable()

public final OperationCallable<DeleteRegionBackendBucketRequest,Operation,Operation> deleteOperationCallable()

Deletes the specified regional BackendBucket 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   DeleteRegionBackendBucketRequest request =
       DeleteRegionBackendBucketRequest.newBuilder()
           .setBackendBucket("backendBucket713751966")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionBackendBucketsClient.deleteOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteRegionBackendBucketRequest,Operation,Operation>

get(GetRegionBackendBucketRequest request)

public final BackendBucket get(GetRegionBackendBucketRequest request)

Returns the specified regional BackendBucket 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   GetRegionBackendBucketRequest request =
       GetRegionBackendBucketRequest.newBuilder()
           .setBackendBucket("backendBucket713751966")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   BackendBucket response = regionBackendBucketsClient.get(request);
 }
 
Parameter
Name Description
request GetRegionBackendBucketRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackendBucket

get(String project, String region, String backendBucket)

public final BackendBucket get(String project, String region, String backendBucket)

Returns the specified regional BackendBucket 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String backendBucket = "backendBucket713751966";
   BackendBucket response = regionBackendBucketsClient.get(project, region, backendBucket);
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request.

backendBucket String

Name of the BackendBucket resource to return.

Returns
Type Description
BackendBucket

getCallable()

public final UnaryCallable<GetRegionBackendBucketRequest,BackendBucket> getCallable()

Returns the specified regional BackendBucket 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   GetRegionBackendBucketRequest request =
       GetRegionBackendBucketRequest.newBuilder()
           .setBackendBucket("backendBucket713751966")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   ApiFuture<BackendBucket> future =
       regionBackendBucketsClient.getCallable().futureCall(request);
   // Do something.
   BackendBucket response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetRegionBackendBucketRequest,BackendBucket>

getIamPolicy(GetIamPolicyRegionBackendBucketRequest request)

public final Policy getIamPolicy(GetIamPolicyRegionBackendBucketRequest request)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   GetIamPolicyRegionBackendBucketRequest request =
       GetIamPolicyRegionBackendBucketRequest.newBuilder()
           .setOptionsRequestedPolicyVersion(-574521795)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .build();
   Policy response = regionBackendBucketsClient.getIamPolicy(request);
 }
 
Parameter
Name Description
request GetIamPolicyRegionBackendBucketRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Policy

getIamPolicy(String project, String region, String resource)

public final Policy getIamPolicy(String project, String region, String resource)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String resource = "resource-341064690";
   Policy response = regionBackendBucketsClient.getIamPolicy(project, region, resource);
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

The name of the region for this request.

resource String

Name or id of the resource for this request.

Returns
Type Description
Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRegionBackendBucketRequest,Policy> getIamPolicyCallable()

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   GetIamPolicyRegionBackendBucketRequest request =
       GetIamPolicyRegionBackendBucketRequest.newBuilder()
           .setOptionsRequestedPolicyVersion(-574521795)
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .build();
   ApiFuture<Policy> future =
       regionBackendBucketsClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetIamPolicyRegionBackendBucketRequest,Policy>

getSettings()

public final @Nullable RegionBackendBucketsSettings getSettings()
Returns
Type Description
@org.jspecify.annotations.Nullable com.google.cloud.compute.v1.RegionBackendBucketsSettings

getStub()

public RegionBackendBucketsStub getStub()
Returns
Type Description
RegionBackendBucketsStub

insertAsync(InsertRegionBackendBucketRequest request)

public final OperationFuture<Operation,Operation> insertAsync(InsertRegionBackendBucketRequest request)

Creates a RegionBackendBucket in the specified project in the given scope using the parameters that are included in the request.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   InsertRegionBackendBucketRequest request =
       InsertRegionBackendBucketRequest.newBuilder()
           .setBackendBucketResource(BackendBucket.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionBackendBucketsClient.insertAsync(request).get();
 }
 
Parameter
Name Description
request InsertRegionBackendBucketRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Operation,Operation>

insertAsync(String project, String region, BackendBucket backendBucketResource)

public final OperationFuture<Operation,Operation> insertAsync(String project, String region, BackendBucket backendBucketResource)

Creates a RegionBackendBucket in the specified project in the given scope using the parameters that are included in the request.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
   Operation response =
       regionBackendBucketsClient.insertAsync(project, region, backendBucketResource).get();
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region of this request.

backendBucketResource BackendBucket

The body resource for this request

Returns
Type Description
OperationFuture<Operation,Operation>

insertCallable()

public final UnaryCallable<InsertRegionBackendBucketRequest,Operation> insertCallable()

Creates a RegionBackendBucket in the specified project in the given scope using the parameters that are included in the request.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   InsertRegionBackendBucketRequest request =
       InsertRegionBackendBucketRequest.newBuilder()
           .setBackendBucketResource(BackendBucket.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = regionBackendBucketsClient.insertCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<InsertRegionBackendBucketRequest,Operation>

insertOperationCallable()

public final OperationCallable<InsertRegionBackendBucketRequest,Operation,Operation> insertOperationCallable()

Creates a RegionBackendBucket in the specified project in the given scope using the parameters that are included in the request.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   InsertRegionBackendBucketRequest request =
       InsertRegionBackendBucketRequest.newBuilder()
           .setBackendBucketResource(BackendBucket.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionBackendBucketsClient.insertOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
OperationCallable<InsertRegionBackendBucketRequest,Operation,Operation>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

list(ListRegionBackendBucketsRequest request)

public final RegionBackendBucketsClient.ListPagedResponse list(ListRegionBackendBucketsRequest request)

Retrieves the list of BackendBucket resources available to the specified project in the given region.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   ListRegionBackendBucketsRequest request =
       ListRegionBackendBucketsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   for (BackendBucket element : regionBackendBucketsClient.list(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListRegionBackendBucketsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RegionBackendBucketsClient.ListPagedResponse

list(String project, String region)

public final RegionBackendBucketsClient.ListPagedResponse list(String project, String region)

Retrieves the list of BackendBucket resources available to the specified project in the given region.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   for (BackendBucket element : regionBackendBucketsClient.list(project, region).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region of this request.

Returns
Type Description
RegionBackendBucketsClient.ListPagedResponse

listCallable()

public final UnaryCallable<ListRegionBackendBucketsRequest,BackendBucketList> listCallable()

Retrieves the list of BackendBucket resources available to the specified project in the given region.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   ListRegionBackendBucketsRequest request =
       ListRegionBackendBucketsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     BackendBucketList response = regionBackendBucketsClient.listCallable().call(request);
     for (BackendBucket element : response.getItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListRegionBackendBucketsRequest,BackendBucketList>

listPagedCallable()

public final UnaryCallable<ListRegionBackendBucketsRequest,RegionBackendBucketsClient.ListPagedResponse> listPagedCallable()

Retrieves the list of BackendBucket resources available to the specified project in the given region.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   ListRegionBackendBucketsRequest request =
       ListRegionBackendBucketsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<BackendBucket> future =
       regionBackendBucketsClient.listPagedCallable().futureCall(request);
   // Do something.
   for (BackendBucket element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListRegionBackendBucketsRequest,ListPagedResponse>

listUsable(ListUsableRegionBackendBucketsRequest request)

public final RegionBackendBucketsClient.ListUsablePagedResponse listUsable(ListUsableRegionBackendBucketsRequest request)

Retrieves a list of all usable backend buckets in the specified project in the given region.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   ListUsableRegionBackendBucketsRequest request =
       ListUsableRegionBackendBucketsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   for (BackendBucket element : regionBackendBucketsClient.listUsable(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListUsableRegionBackendBucketsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RegionBackendBucketsClient.ListUsablePagedResponse

listUsable(String project, String region)

public final RegionBackendBucketsClient.ListUsablePagedResponse listUsable(String project, String region)

Retrieves a list of all usable backend buckets in the specified project in the given region.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   for (BackendBucket element :
       regionBackendBucketsClient.listUsable(project, region).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request. It must be a string that meets the requirements in RFC1035.

Returns
Type Description
RegionBackendBucketsClient.ListUsablePagedResponse

listUsableCallable()

public final UnaryCallable<ListUsableRegionBackendBucketsRequest,BackendBucketListUsable> listUsableCallable()

Retrieves a list of all usable backend buckets in the specified project in the given region.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   ListUsableRegionBackendBucketsRequest request =
       ListUsableRegionBackendBucketsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     BackendBucketListUsable response =
         regionBackendBucketsClient.listUsableCallable().call(request);
     for (BackendBucket element : response.getItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListUsableRegionBackendBucketsRequest,BackendBucketListUsable>

listUsablePagedCallable()

public final UnaryCallable<ListUsableRegionBackendBucketsRequest,RegionBackendBucketsClient.ListUsablePagedResponse> listUsablePagedCallable()

Retrieves a list of all usable backend buckets in the specified project in the given region.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   ListUsableRegionBackendBucketsRequest request =
       ListUsableRegionBackendBucketsRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<BackendBucket> future =
       regionBackendBucketsClient.listUsablePagedCallable().futureCall(request);
   // Do something.
   for (BackendBucket element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListUsableRegionBackendBucketsRequest,ListUsablePagedResponse>

patchAsync(PatchRegionBackendBucketRequest request)

public final OperationFuture<Operation,Operation> patchAsync(PatchRegionBackendBucketRequest request)

Updates the specified BackendBucket resource with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   PatchRegionBackendBucketRequest request =
       PatchRegionBackendBucketRequest.newBuilder()
           .setBackendBucket("backendBucket713751966")
           .setBackendBucketResource(BackendBucket.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionBackendBucketsClient.patchAsync(request).get();
 }
 
Parameter
Name Description
request PatchRegionBackendBucketRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Operation,Operation>

patchAsync(String project, String region, String backendBucket, BackendBucket backendBucketResource)

public final OperationFuture<Operation,Operation> patchAsync(String project, String region, String backendBucket, BackendBucket backendBucketResource)

Updates the specified BackendBucket resource with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String backendBucket = "backendBucket713751966";
   BackendBucket backendBucketResource = BackendBucket.newBuilder().build();
   Operation response =
       regionBackendBucketsClient
           .patchAsync(project, region, backendBucket, backendBucketResource)
           .get();
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request.

backendBucket String

Name of the BackendBucket resource to patch.

backendBucketResource BackendBucket

The body resource for this request

Returns
Type Description
OperationFuture<Operation,Operation>

patchCallable()

public final UnaryCallable<PatchRegionBackendBucketRequest,Operation> patchCallable()

Updates the specified BackendBucket resource with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   PatchRegionBackendBucketRequest request =
       PatchRegionBackendBucketRequest.newBuilder()
           .setBackendBucket("backendBucket713751966")
           .setBackendBucketResource(BackendBucket.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = regionBackendBucketsClient.patchCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<PatchRegionBackendBucketRequest,Operation>

patchOperationCallable()

public final OperationCallable<PatchRegionBackendBucketRequest,Operation,Operation> patchOperationCallable()

Updates the specified BackendBucket resource with the data included in the request. This method supportsPATCH semantics and uses theJSON merge patch format and processing rules.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   PatchRegionBackendBucketRequest request =
       PatchRegionBackendBucketRequest.newBuilder()
           .setBackendBucket("backendBucket713751966")
           .setBackendBucketResource(BackendBucket.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionBackendBucketsClient.patchOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
OperationCallable<PatchRegionBackendBucketRequest,Operation,Operation>

setIamPolicy(SetIamPolicyRegionBackendBucketRequest request)

public final Policy setIamPolicy(SetIamPolicyRegionBackendBucketRequest request)

Sets the access control policy on the specified resource. Replaces any existing policy.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   SetIamPolicyRegionBackendBucketRequest request =
       SetIamPolicyRegionBackendBucketRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
           .setResource("resource-341064690")
           .build();
   Policy response = regionBackendBucketsClient.setIamPolicy(request);
 }
 
Parameter
Name Description
request SetIamPolicyRegionBackendBucketRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Policy

setIamPolicy(String project, String region, String resource, RegionSetPolicyRequest regionSetPolicyRequestResource)

public final Policy setIamPolicy(String project, String region, String resource, RegionSetPolicyRequest regionSetPolicyRequestResource)

Sets the access control policy on the specified resource. Replaces any existing policy.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String resource = "resource-341064690";
   RegionSetPolicyRequest regionSetPolicyRequestResource =
       RegionSetPolicyRequest.newBuilder().build();
   Policy response =
       regionBackendBucketsClient.setIamPolicy(
           project, region, resource, regionSetPolicyRequestResource);
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

The name of the region for this request.

resource String

Name or id of the resource for this request.

regionSetPolicyRequestResource RegionSetPolicyRequest

The body resource for this request

Returns
Type Description
Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRegionBackendBucketRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replaces any existing policy.

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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   SetIamPolicyRegionBackendBucketRequest request =
       SetIamPolicyRegionBackendBucketRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionSetPolicyRequestResource(RegionSetPolicyRequest.newBuilder().build())
           .setResource("resource-341064690")
           .build();
   ApiFuture<Policy> future =
       regionBackendBucketsClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<SetIamPolicyRegionBackendBucketRequest,Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRegionBackendBucketRequest request)

public final TestPermissionsResponse testIamPermissions(TestIamPermissionsRegionBackendBucketRequest request)

Returns permissions that a caller has on the specified 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   TestIamPermissionsRegionBackendBucketRequest request =
       TestIamPermissionsRegionBackendBucketRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
           .build();
   TestPermissionsResponse response = regionBackendBucketsClient.testIamPermissions(request);
 }
 
Parameter
Name Description
request TestIamPermissionsRegionBackendBucketRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
TestPermissionsResponse

testIamPermissions(String project, String region, String resource, TestPermissionsRequest testPermissionsRequestResource)

public final TestPermissionsResponse testIamPermissions(String project, String region, String resource, TestPermissionsRequest testPermissionsRequestResource)

Returns permissions that a caller has on the specified 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String resource = "resource-341064690";
   TestPermissionsRequest testPermissionsRequestResource =
       TestPermissionsRequest.newBuilder().build();
   TestPermissionsResponse response =
       regionBackendBucketsClient.testIamPermissions(
           project, region, resource, testPermissionsRequestResource);
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

The name of the region for this request.

resource String

Name or id of the resource for this request.

testPermissionsRequestResource TestPermissionsRequest

The body resource for this request

Returns
Type Description
TestPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsRegionBackendBucketRequest,TestPermissionsResponse> testIamPermissionsCallable()

Returns permissions that a caller has on the specified 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 (RegionBackendBucketsClient regionBackendBucketsClient =
     RegionBackendBucketsClient.create()) {
   TestIamPermissionsRegionBackendBucketRequest request =
       TestIamPermissionsRegionBackendBucketRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
           .build();
   ApiFuture<TestPermissionsResponse> future =
       regionBackendBucketsClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestPermissionsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<TestIamPermissionsRegionBackendBucketRequest,TestPermissionsResponse>