Class RegionCompositeHealthChecksClient (1.101.0)

GitHub RepositoryProduct Reference

Service Description: The RegionCompositeHealthChecks 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String compositeHealthCheck = "compositeHealthCheck-1727645947";
   CompositeHealthCheck response =
       regionCompositeHealthChecksClient.get(project, region, compositeHealthCheck);
 }
 

Note: close() needs to be called on the RegionCompositeHealthChecksClient 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

AggregatedList

Retrieves the list of all CompositeHealthCheck resources (all regional) available to the specified project.

To prevent failure, it is recommended that you set the returnPartialSuccess parameter to true.

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

  • aggregatedList(AggregatedListRegionCompositeHealthChecksRequest request)

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

  • aggregatedList(String project)

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

  • aggregatedListPagedCallable()

  • aggregatedListCallable()

Delete

Deletes the specified CompositeHealthCheck in the given region

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

  • deleteAsync(DeleteRegionCompositeHealthCheckRequest 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 compositeHealthCheck)

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 CompositeHealthCheck resource in the given region.

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

  • get(GetRegionCompositeHealthCheckRequest 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 compositeHealthCheck)

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

  • getCallable()

Insert

Create a CompositeHealthCheck in the specified project in the given region 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(InsertRegionCompositeHealthCheckRequest 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, CompositeHealthCheck compositeHealthCheckResource)

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

Lists the CompositeHealthChecks for a project in the given region.

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

  • list(ListRegionCompositeHealthChecksRequest 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()

Patch

Updates the specified regional CompositeHealthCheck 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(PatchRegionCompositeHealthCheckRequest 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 compositeHealthCheck, CompositeHealthCheck compositeHealthCheckResource)

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()

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(TestIamPermissionsRegionCompositeHealthCheckRequest 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 RegionCompositeHealthChecksSettings 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
 RegionCompositeHealthChecksSettings regionCompositeHealthChecksSettings =
     RegionCompositeHealthChecksSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create(regionCompositeHealthChecksSettings);
 

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
 RegionCompositeHealthChecksSettings regionCompositeHealthChecksSettings =
     RegionCompositeHealthChecksSettings.newBuilder().setEndpoint(myEndpoint).build();
 RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create(regionCompositeHealthChecksSettings);
 

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

Inheritance

java.lang.Object > RegionCompositeHealthChecksClient

Static Methods

create()

public static final RegionCompositeHealthChecksClient create()

Constructs an instance of RegionCompositeHealthChecksClient with default settings.

Returns
Type Description
RegionCompositeHealthChecksClient
Exceptions
Type Description
IOException

create(RegionCompositeHealthChecksSettings settings)

public static final RegionCompositeHealthChecksClient create(RegionCompositeHealthChecksSettings settings)

Constructs an instance of RegionCompositeHealthChecksClient, 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 RegionCompositeHealthChecksSettings
Returns
Type Description
RegionCompositeHealthChecksClient
Exceptions
Type Description
IOException

create(RegionCompositeHealthChecksStub stub)

public static final RegionCompositeHealthChecksClient create(RegionCompositeHealthChecksStub stub)

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

Parameter
Name Description
stub RegionCompositeHealthChecksStub
Returns
Type Description
RegionCompositeHealthChecksClient

Constructors

RegionCompositeHealthChecksClient(RegionCompositeHealthChecksSettings settings)

protected RegionCompositeHealthChecksClient(RegionCompositeHealthChecksSettings settings)

Constructs an instance of RegionCompositeHealthChecksClient, 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 RegionCompositeHealthChecksSettings

RegionCompositeHealthChecksClient(RegionCompositeHealthChecksStub stub)

protected RegionCompositeHealthChecksClient(RegionCompositeHealthChecksStub stub)
Parameter
Name Description
stub RegionCompositeHealthChecksStub

Methods

aggregatedList(AggregatedListRegionCompositeHealthChecksRequest request)

public final RegionCompositeHealthChecksClient.AggregatedListPagedResponse aggregatedList(AggregatedListRegionCompositeHealthChecksRequest request)

Retrieves the list of all CompositeHealthCheck resources (all regional) available to the specified project.

To prevent failure, it is recommended that you set the returnPartialSuccess parameter to true.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   AggregatedListRegionCompositeHealthChecksRequest request =
       AggregatedListRegionCompositeHealthChecksRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setServiceProjectNumber(-1293855239)
           .build();
   for (Map.Entry<String, CompositeHealthChecksScopedList> element :
       regionCompositeHealthChecksClient.aggregatedList(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request AggregatedListRegionCompositeHealthChecksRequest

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

Returns
Type Description
RegionCompositeHealthChecksClient.AggregatedListPagedResponse

aggregatedList(String project)

public final RegionCompositeHealthChecksClient.AggregatedListPagedResponse aggregatedList(String project)

Retrieves the list of all CompositeHealthCheck resources (all regional) available to the specified project.

To prevent failure, it is recommended that you set the returnPartialSuccess parameter to true.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   String project = "project-309310695";
   for (Map.Entry<String, CompositeHealthChecksScopedList> element :
       regionCompositeHealthChecksClient.aggregatedList(project).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
project String

Name of the project scoping this request.

Returns
Type Description
RegionCompositeHealthChecksClient.AggregatedListPagedResponse

aggregatedListCallable()

public final UnaryCallable<AggregatedListRegionCompositeHealthChecksRequest,CompositeHealthCheckAggregatedList> aggregatedListCallable()

Retrieves the list of all CompositeHealthCheck resources (all regional) available to the specified project.

To prevent failure, it is recommended that you set the returnPartialSuccess parameter to true.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   AggregatedListRegionCompositeHealthChecksRequest request =
       AggregatedListRegionCompositeHealthChecksRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setServiceProjectNumber(-1293855239)
           .build();
   while (true) {
     CompositeHealthCheckAggregatedList response =
         regionCompositeHealthChecksClient.aggregatedListCallable().call(request);
     for (Map.Entry<String, CompositeHealthChecksScopedList> 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<AggregatedListRegionCompositeHealthChecksRequest,CompositeHealthCheckAggregatedList>

aggregatedListPagedCallable()

public final UnaryCallable<AggregatedListRegionCompositeHealthChecksRequest,RegionCompositeHealthChecksClient.AggregatedListPagedResponse> aggregatedListPagedCallable()

Retrieves the list of all CompositeHealthCheck resources (all regional) available to the specified project.

To prevent failure, it is recommended that you set the returnPartialSuccess parameter to true.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   AggregatedListRegionCompositeHealthChecksRequest request =
       AggregatedListRegionCompositeHealthChecksRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setIncludeAllScopes(true)
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setReturnPartialSuccess(true)
           .setServiceProjectNumber(-1293855239)
           .build();
   ApiFuture<Map.Entry<String, CompositeHealthChecksScopedList>> future =
       regionCompositeHealthChecksClient.aggregatedListPagedCallable().futureCall(request);
   // Do something.
   for (Map.Entry<String, CompositeHealthChecksScopedList> element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<AggregatedListRegionCompositeHealthChecksRequest,AggregatedListPagedResponse>

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(DeleteRegionCompositeHealthCheckRequest request)

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

Deletes the specified CompositeHealthCheck 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   DeleteRegionCompositeHealthCheckRequest request =
       DeleteRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheck("compositeHealthCheck-1727645947")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionCompositeHealthChecksClient.deleteAsync(request).get();
 }
 
Parameter
Name Description
request DeleteRegionCompositeHealthCheckRequest

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

Returns
Type Description
OperationFuture<Operation,Operation>

deleteAsync(String project, String region, String compositeHealthCheck)

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

Deletes the specified CompositeHealthCheck 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String compositeHealthCheck = "compositeHealthCheck-1727645947";
   Operation response =
       regionCompositeHealthChecksClient
           .deleteAsync(project, region, compositeHealthCheck)
           .get();
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request.

compositeHealthCheck String

Name of the CompositeHealthCheck resource to delete.

Returns
Type Description
OperationFuture<Operation,Operation>

deleteCallable()

public final UnaryCallable<DeleteRegionCompositeHealthCheckRequest,Operation> deleteCallable()

Deletes the specified CompositeHealthCheck 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   DeleteRegionCompositeHealthCheckRequest request =
       DeleteRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheck("compositeHealthCheck-1727645947")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionCompositeHealthChecksClient.deleteCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteRegionCompositeHealthCheckRequest,Operation>

deleteOperationCallable()

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

Deletes the specified CompositeHealthCheck 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   DeleteRegionCompositeHealthCheckRequest request =
       DeleteRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheck("compositeHealthCheck-1727645947")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionCompositeHealthChecksClient.deleteOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteRegionCompositeHealthCheckRequest,Operation,Operation>

get(GetRegionCompositeHealthCheckRequest request)

public final CompositeHealthCheck get(GetRegionCompositeHealthCheckRequest request)

Returns the specified CompositeHealthCheck resource 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   GetRegionCompositeHealthCheckRequest request =
       GetRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheck("compositeHealthCheck-1727645947")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   CompositeHealthCheck response = regionCompositeHealthChecksClient.get(request);
 }
 
Parameter
Name Description
request GetRegionCompositeHealthCheckRequest

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

Returns
Type Description
CompositeHealthCheck

get(String project, String region, String compositeHealthCheck)

public final CompositeHealthCheck get(String project, String region, String compositeHealthCheck)

Returns the specified CompositeHealthCheck resource 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String compositeHealthCheck = "compositeHealthCheck-1727645947";
   CompositeHealthCheck response =
       regionCompositeHealthChecksClient.get(project, region, compositeHealthCheck);
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request.

compositeHealthCheck String

Name of the CompositeHealthCheck resource to return.

Returns
Type Description
CompositeHealthCheck

getCallable()

public final UnaryCallable<GetRegionCompositeHealthCheckRequest,CompositeHealthCheck> getCallable()

Returns the specified CompositeHealthCheck resource 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   GetRegionCompositeHealthCheckRequest request =
       GetRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheck("compositeHealthCheck-1727645947")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   ApiFuture<CompositeHealthCheck> future =
       regionCompositeHealthChecksClient.getCallable().futureCall(request);
   // Do something.
   CompositeHealthCheck response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetRegionCompositeHealthCheckRequest,CompositeHealthCheck>

getSettings()

public final RegionCompositeHealthChecksSettings getSettings()
Returns
Type Description
RegionCompositeHealthChecksSettings

getStub()

public RegionCompositeHealthChecksStub getStub()
Returns
Type Description
RegionCompositeHealthChecksStub

insertAsync(InsertRegionCompositeHealthCheckRequest request)

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

Create a CompositeHealthCheck in the specified project in the given region 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   InsertRegionCompositeHealthCheckRequest request =
       InsertRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheckResource(CompositeHealthCheck.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionCompositeHealthChecksClient.insertAsync(request).get();
 }
 
Parameter
Name Description
request InsertRegionCompositeHealthCheckRequest

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

Returns
Type Description
OperationFuture<Operation,Operation>

insertAsync(String project, String region, CompositeHealthCheck compositeHealthCheckResource)

public final OperationFuture<Operation,Operation> insertAsync(String project, String region, CompositeHealthCheck compositeHealthCheckResource)

Create a CompositeHealthCheck in the specified project in the given region 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   CompositeHealthCheck compositeHealthCheckResource = CompositeHealthCheck.newBuilder().build();
   Operation response =
       regionCompositeHealthChecksClient
           .insertAsync(project, region, compositeHealthCheckResource)
           .get();
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request.

compositeHealthCheckResource CompositeHealthCheck

The body resource for this request

Returns
Type Description
OperationFuture<Operation,Operation>

insertCallable()

public final UnaryCallable<InsertRegionCompositeHealthCheckRequest,Operation> insertCallable()

Create a CompositeHealthCheck in the specified project in the given region 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   InsertRegionCompositeHealthCheckRequest request =
       InsertRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheckResource(CompositeHealthCheck.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionCompositeHealthChecksClient.insertCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<InsertRegionCompositeHealthCheckRequest,Operation>

insertOperationCallable()

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

Create a CompositeHealthCheck in the specified project in the given region 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   InsertRegionCompositeHealthCheckRequest request =
       InsertRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheckResource(CompositeHealthCheck.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionCompositeHealthChecksClient.insertOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
OperationCallable<InsertRegionCompositeHealthCheckRequest,Operation,Operation>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

list(ListRegionCompositeHealthChecksRequest request)

public final RegionCompositeHealthChecksClient.ListPagedResponse list(ListRegionCompositeHealthChecksRequest request)

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

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

Returns
Type Description
RegionCompositeHealthChecksClient.ListPagedResponse

list(String project, String region)

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

Lists the CompositeHealthChecks for a 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   for (CompositeHealthCheck element :
       regionCompositeHealthChecksClient.list(project, region).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request.

Returns
Type Description
RegionCompositeHealthChecksClient.ListPagedResponse

listCallable()

public final UnaryCallable<ListRegionCompositeHealthChecksRequest,CompositeHealthCheckList> listCallable()

Lists the CompositeHealthChecks for a 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   ListRegionCompositeHealthChecksRequest request =
       ListRegionCompositeHealthChecksRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     CompositeHealthCheckList response =
         regionCompositeHealthChecksClient.listCallable().call(request);
     for (CompositeHealthCheck 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<ListRegionCompositeHealthChecksRequest,CompositeHealthCheckList>

listPagedCallable()

public final UnaryCallable<ListRegionCompositeHealthChecksRequest,RegionCompositeHealthChecksClient.ListPagedResponse> listPagedCallable()

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

patchAsync(PatchRegionCompositeHealthCheckRequest request)

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

Updates the specified regional CompositeHealthCheck 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   PatchRegionCompositeHealthCheckRequest request =
       PatchRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheck("compositeHealthCheck-1727645947")
           .setCompositeHealthCheckResource(CompositeHealthCheck.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionCompositeHealthChecksClient.patchAsync(request).get();
 }
 
Parameter
Name Description
request PatchRegionCompositeHealthCheckRequest

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

Returns
Type Description
OperationFuture<Operation,Operation>

patchAsync(String project, String region, String compositeHealthCheck, CompositeHealthCheck compositeHealthCheckResource)

public final OperationFuture<Operation,Operation> patchAsync(String project, String region, String compositeHealthCheck, CompositeHealthCheck compositeHealthCheckResource)

Updates the specified regional CompositeHealthCheck 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String compositeHealthCheck = "compositeHealthCheck-1727645947";
   CompositeHealthCheck compositeHealthCheckResource = CompositeHealthCheck.newBuilder().build();
   Operation response =
       regionCompositeHealthChecksClient
           .patchAsync(project, region, compositeHealthCheck, compositeHealthCheckResource)
           .get();
 }
 
Parameters
Name Description
project String

Project ID for this request.

region String

Name of the region scoping this request.

compositeHealthCheck String

Name of the CompositeHealthCheck to update. The name must be 1-63 characters long, and comply with RFC1035.

compositeHealthCheckResource CompositeHealthCheck

The body resource for this request

Returns
Type Description
OperationFuture<Operation,Operation>

patchCallable()

public final UnaryCallable<PatchRegionCompositeHealthCheckRequest,Operation> patchCallable()

Updates the specified regional CompositeHealthCheck 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   PatchRegionCompositeHealthCheckRequest request =
       PatchRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheck("compositeHealthCheck-1727645947")
           .setCompositeHealthCheckResource(CompositeHealthCheck.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionCompositeHealthChecksClient.patchCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<PatchRegionCompositeHealthCheckRequest,Operation>

patchOperationCallable()

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

Updates the specified regional CompositeHealthCheck 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   PatchRegionCompositeHealthCheckRequest request =
       PatchRegionCompositeHealthCheckRequest.newBuilder()
           .setCompositeHealthCheck("compositeHealthCheck-1727645947")
           .setCompositeHealthCheckResource(CompositeHealthCheck.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionCompositeHealthChecksClient.patchOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
OperationCallable<PatchRegionCompositeHealthCheckRequest,Operation,Operation>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRegionCompositeHealthCheckRequest request)

public final TestPermissionsResponse testIamPermissions(TestIamPermissionsRegionCompositeHealthCheckRequest 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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   TestIamPermissionsRegionCompositeHealthCheckRequest request =
       TestIamPermissionsRegionCompositeHealthCheckRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
           .build();
   TestPermissionsResponse response =
       regionCompositeHealthChecksClient.testIamPermissions(request);
 }
 
Parameter
Name Description
request TestIamPermissionsRegionCompositeHealthCheckRequest

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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String resource = "resource-341064690";
   TestPermissionsRequest testPermissionsRequestResource =
       TestPermissionsRequest.newBuilder().build();
   TestPermissionsResponse response =
       regionCompositeHealthChecksClient.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<TestIamPermissionsRegionCompositeHealthCheckRequest,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 (RegionCompositeHealthChecksClient regionCompositeHealthChecksClient =
     RegionCompositeHealthChecksClient.create()) {
   TestIamPermissionsRegionCompositeHealthCheckRequest request =
       TestIamPermissionsRegionCompositeHealthCheckRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setResource("resource-341064690")
           .setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
           .build();
   ApiFuture<TestPermissionsResponse> future =
       regionCompositeHealthChecksClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestPermissionsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<TestIamPermissionsRegionCompositeHealthCheckRequest,TestPermissionsResponse>