Class RegionInstanceGroupManagersClient (1.33.0)

public class RegionInstanceGroupManagersClient implements BackgroundResource

Service Description: The RegionInstanceGroupManagers 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   InstanceGroupManager response =
       regionInstanceGroupManagersClient.get(project, region, instanceGroupManager);
 }
 

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

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of RegionInstanceGroupManagersSettings 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
 RegionInstanceGroupManagersSettings regionInstanceGroupManagersSettings =
     RegionInstanceGroupManagersSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create(regionInstanceGroupManagersSettings);
 

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
 RegionInstanceGroupManagersSettings regionInstanceGroupManagersSettings =
     RegionInstanceGroupManagersSettings.newBuilder().setEndpoint(myEndpoint).build();
 RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create(regionInstanceGroupManagersSettings);
 

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

Inheritance

java.lang.Object > RegionInstanceGroupManagersClient

Implements

BackgroundResource

Static Methods

create()

public static final RegionInstanceGroupManagersClient create()

Constructs an instance of RegionInstanceGroupManagersClient with default settings.

Returns
TypeDescription
RegionInstanceGroupManagersClient
Exceptions
TypeDescription
IOException

create(RegionInstanceGroupManagersSettings settings)

public static final RegionInstanceGroupManagersClient create(RegionInstanceGroupManagersSettings settings)

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

Parameter
NameDescription
settingsRegionInstanceGroupManagersSettings
Returns
TypeDescription
RegionInstanceGroupManagersClient
Exceptions
TypeDescription
IOException

create(RegionInstanceGroupManagersStub stub)

public static final RegionInstanceGroupManagersClient create(RegionInstanceGroupManagersStub stub)

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

Parameter
NameDescription
stubRegionInstanceGroupManagersStub
Returns
TypeDescription
RegionInstanceGroupManagersClient

Constructors

RegionInstanceGroupManagersClient(RegionInstanceGroupManagersSettings settings)

protected RegionInstanceGroupManagersClient(RegionInstanceGroupManagersSettings settings)

Constructs an instance of RegionInstanceGroupManagersClient, 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
NameDescription
settingsRegionInstanceGroupManagersSettings

RegionInstanceGroupManagersClient(RegionInstanceGroupManagersStub stub)

protected RegionInstanceGroupManagersClient(RegionInstanceGroupManagersStub stub)
Parameter
NameDescription
stubRegionInstanceGroupManagersStub

Methods

abandonInstancesAsync(AbandonInstancesRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> abandonInstancesAsync(AbandonInstancesRegionInstanceGroupManagerRequest request)

Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   AbandonInstancesRegionInstanceGroupManagerRequest request =
       AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersAbandonInstancesRequestResource(
               RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionInstanceGroupManagersClient.abandonInstancesAsync(request).get();
 }
 
Parameter
NameDescription
requestAbandonInstancesRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

abandonInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersAbandonInstancesRequest regionInstanceGroupManagersAbandonInstancesRequestResource)

public final OperationFuture<Operation,Operation> abandonInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersAbandonInstancesRequest regionInstanceGroupManagersAbandonInstancesRequestResource)

Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagersAbandonInstancesRequest
       regionInstanceGroupManagersAbandonInstancesRequestResource =
           RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .abandonInstancesAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagersAbandonInstancesRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

Name of the managed instance group.

regionInstanceGroupManagersAbandonInstancesRequestResourceRegionInstanceGroupManagersAbandonInstancesRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

abandonInstancesCallable()

public final UnaryCallable<AbandonInstancesRegionInstanceGroupManagerRequest,Operation> abandonInstancesCallable()

Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   AbandonInstancesRegionInstanceGroupManagerRequest request =
       AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersAbandonInstancesRequestResource(
               RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.abandonInstancesCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<AbandonInstancesRegionInstanceGroupManagerRequest,Operation>

abandonInstancesOperationCallable()

public final OperationCallable<AbandonInstancesRegionInstanceGroupManagerRequest,Operation,Operation> abandonInstancesOperationCallable()

Flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   AbandonInstancesRegionInstanceGroupManagerRequest request =
       AbandonInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersAbandonInstancesRequestResource(
               RegionInstanceGroupManagersAbandonInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient.abandonInstancesOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<AbandonInstancesRegionInstanceGroupManagerRequest,Operation,Operation>

applyUpdatesToInstancesAsync(ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> applyUpdatesToInstancesAsync(ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request)

Apply updates to selected instances the managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request =
       ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersApplyUpdatesRequestResource(
               RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build())
           .build();
   Operation response =
       regionInstanceGroupManagersClient.applyUpdatesToInstancesAsync(request).get();
 }
 
Parameter
NameDescription
requestApplyUpdatesToInstancesRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

applyUpdatesToInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersApplyUpdatesRequest regionInstanceGroupManagersApplyUpdatesRequestResource)

public final OperationFuture<Operation,Operation> applyUpdatesToInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersApplyUpdatesRequest regionInstanceGroupManagersApplyUpdatesRequestResource)

Apply updates to selected instances the managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagersApplyUpdatesRequest
       regionInstanceGroupManagersApplyUpdatesRequestResource =
           RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .applyUpdatesToInstancesAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagersApplyUpdatesRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request, should conform to RFC1035.

instanceGroupManagerString

The name of the managed instance group, should conform to RFC1035.

regionInstanceGroupManagersApplyUpdatesRequestResourceRegionInstanceGroupManagersApplyUpdatesRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

applyUpdatesToInstancesCallable()

public final UnaryCallable<ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest,Operation> applyUpdatesToInstancesCallable()

Apply updates to selected instances the managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request =
       ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersApplyUpdatesRequestResource(
               RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.applyUpdatesToInstancesCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest,Operation>

applyUpdatesToInstancesOperationCallable()

public final OperationCallable<ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest,Operation,Operation> applyUpdatesToInstancesOperationCallable()

Apply updates to selected instances the managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest request =
       ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersApplyUpdatesRequestResource(
               RegionInstanceGroupManagersApplyUpdatesRequest.newBuilder().build())
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient
           .applyUpdatesToInstancesOperationCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest,Operation,Operation>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

createInstancesAsync(CreateInstancesRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> createInstancesAsync(CreateInstancesRegionInstanceGroupManagerRequest request)

Creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   CreateInstancesRegionInstanceGroupManagerRequest request =
       CreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersCreateInstancesRequestResource(
               RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionInstanceGroupManagersClient.createInstancesAsync(request).get();
 }
 
Parameter
NameDescription
requestCreateInstancesRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

createInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersCreateInstancesRequest regionInstanceGroupManagersCreateInstancesRequestResource)

public final OperationFuture<Operation,Operation> createInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersCreateInstancesRequest regionInstanceGroupManagersCreateInstancesRequestResource)

Creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagersCreateInstancesRequest
       regionInstanceGroupManagersCreateInstancesRequestResource =
           RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .createInstancesAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagersCreateInstancesRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

The name of the region where the managed instance group is located. It should conform to RFC1035.

instanceGroupManagerString

The name of the managed instance group. It should conform to RFC1035.

regionInstanceGroupManagersCreateInstancesRequestResourceRegionInstanceGroupManagersCreateInstancesRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

createInstancesCallable()

public final UnaryCallable<CreateInstancesRegionInstanceGroupManagerRequest,Operation> createInstancesCallable()

Creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   CreateInstancesRegionInstanceGroupManagerRequest request =
       CreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersCreateInstancesRequestResource(
               RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.createInstancesCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateInstancesRegionInstanceGroupManagerRequest,Operation>

createInstancesOperationCallable()

public final OperationCallable<CreateInstancesRegionInstanceGroupManagerRequest,Operation,Operation> createInstancesOperationCallable()

Creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   CreateInstancesRegionInstanceGroupManagerRequest request =
       CreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersCreateInstancesRequestResource(
               RegionInstanceGroupManagersCreateInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient.createInstancesOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<CreateInstancesRegionInstanceGroupManagerRequest,Operation,Operation>

deleteAsync(DeleteRegionInstanceGroupManagerRequest request)

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

Deletes the specified managed instance group and all of the instances in that group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeleteRegionInstanceGroupManagerRequest request =
       DeleteRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionInstanceGroupManagersClient.deleteAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteAsync(String project, String region, String instanceGroupManager)

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

Deletes the specified managed instance group and all of the instances in that group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   Operation response =
       regionInstanceGroupManagersClient
           .deleteAsync(project, region, instanceGroupManager)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

Name of the managed instance group to delete.

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteCallable()

public final UnaryCallable<DeleteRegionInstanceGroupManagerRequest,Operation> deleteCallable()

Deletes the specified managed instance group and all of the instances in that group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeleteRegionInstanceGroupManagerRequest request =
       DeleteRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.deleteCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteRegionInstanceGroupManagerRequest,Operation>

deleteInstancesAsync(DeleteInstancesRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> deleteInstancesAsync(DeleteInstancesRegionInstanceGroupManagerRequest request)

Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeleteInstancesRegionInstanceGroupManagerRequest request =
       DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersDeleteInstancesRequestResource(
               RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionInstanceGroupManagersClient.deleteInstancesAsync(request).get();
 }
 
Parameter
NameDescription
requestDeleteInstancesRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersDeleteInstancesRequest regionInstanceGroupManagersDeleteInstancesRequestResource)

public final OperationFuture<Operation,Operation> deleteInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersDeleteInstancesRequest regionInstanceGroupManagersDeleteInstancesRequestResource)

Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagersDeleteInstancesRequest
       regionInstanceGroupManagersDeleteInstancesRequestResource =
           RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .deleteInstancesAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagersDeleteInstancesRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

Name of the managed instance group.

regionInstanceGroupManagersDeleteInstancesRequestResourceRegionInstanceGroupManagersDeleteInstancesRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteInstancesCallable()

public final UnaryCallable<DeleteInstancesRegionInstanceGroupManagerRequest,Operation> deleteInstancesCallable()

Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeleteInstancesRegionInstanceGroupManagerRequest request =
       DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersDeleteInstancesRequestResource(
               RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.deleteInstancesCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteInstancesRegionInstanceGroupManagerRequest,Operation>

deleteInstancesOperationCallable()

public final OperationCallable<DeleteInstancesRegionInstanceGroupManagerRequest,Operation,Operation> deleteInstancesOperationCallable()

Flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeleteInstancesRegionInstanceGroupManagerRequest request =
       DeleteInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersDeleteInstancesRequestResource(
               RegionInstanceGroupManagersDeleteInstancesRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient.deleteInstancesOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteInstancesRegionInstanceGroupManagerRequest,Operation,Operation>

deleteOperationCallable()

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

Deletes the specified managed instance group and all of the instances in that group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeleteRegionInstanceGroupManagerRequest request =
       DeleteRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient.deleteOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeleteRegionInstanceGroupManagerRequest,Operation,Operation>

deletePerInstanceConfigsAsync(DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> deletePerInstanceConfigsAsync(DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request)

Deletes selected per-instance configurations for the managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request =
       DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerDeleteInstanceConfigReqResource(
               RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build())
           .build();
   Operation response =
       regionInstanceGroupManagersClient.deletePerInstanceConfigsAsync(request).get();
 }
 
Parameter
NameDescription
requestDeletePerInstanceConfigsRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

deletePerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerDeleteInstanceConfigReq regionInstanceGroupManagerDeleteInstanceConfigReqResource)

public final OperationFuture<Operation,Operation> deletePerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerDeleteInstanceConfigReq regionInstanceGroupManagerDeleteInstanceConfigReqResource)

Deletes selected per-instance configurations for the managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagerDeleteInstanceConfigReq
       regionInstanceGroupManagerDeleteInstanceConfigReqResource =
           RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .deletePerInstanceConfigsAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagerDeleteInstanceConfigReqResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request, should conform to RFC1035.

instanceGroupManagerString

The name of the managed instance group. It should conform to RFC1035.

regionInstanceGroupManagerDeleteInstanceConfigReqResourceRegionInstanceGroupManagerDeleteInstanceConfigReq

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

deletePerInstanceConfigsCallable()

public final UnaryCallable<DeletePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> deletePerInstanceConfigsCallable()

Deletes selected per-instance configurations for the managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request =
       DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerDeleteInstanceConfigReqResource(
               RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.deletePerInstanceConfigsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeletePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation>

deletePerInstanceConfigsOperationCallable()

public final OperationCallable<DeletePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> deletePerInstanceConfigsOperationCallable()

Deletes selected per-instance configurations for the managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   DeletePerInstanceConfigsRegionInstanceGroupManagerRequest request =
       DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerDeleteInstanceConfigReqResource(
               RegionInstanceGroupManagerDeleteInstanceConfigReq.newBuilder().build())
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient
           .deletePerInstanceConfigsOperationCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<DeletePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation>

get(GetRegionInstanceGroupManagerRequest request)

public final InstanceGroupManager get(GetRegionInstanceGroupManagerRequest request)

Returns all of the details about the specified managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   GetRegionInstanceGroupManagerRequest request =
       GetRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   InstanceGroupManager response = regionInstanceGroupManagersClient.get(request);
 }
 
Parameter
NameDescription
requestGetRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
InstanceGroupManager

get(String project, String region, String instanceGroupManager)

public final InstanceGroupManager get(String project, String region, String instanceGroupManager)

Returns all of the details about the specified managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   InstanceGroupManager response =
       regionInstanceGroupManagersClient.get(project, region, instanceGroupManager);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

Name of the managed instance group to return.

Returns
TypeDescription
InstanceGroupManager

getCallable()

public final UnaryCallable<GetRegionInstanceGroupManagerRequest,InstanceGroupManager> getCallable()

Returns all of the details about the specified managed instance group.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   GetRegionInstanceGroupManagerRequest request =
       GetRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .build();
   ApiFuture<InstanceGroupManager> future =
       regionInstanceGroupManagersClient.getCallable().futureCall(request);
   // Do something.
   InstanceGroupManager response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetRegionInstanceGroupManagerRequest,InstanceGroupManager>

getSettings()

public final RegionInstanceGroupManagersSettings getSettings()
Returns
TypeDescription
RegionInstanceGroupManagersSettings

getStub()

public RegionInstanceGroupManagersStub getStub()
Returns
TypeDescription
RegionInstanceGroupManagersStub

insertAsync(InsertRegionInstanceGroupManagerRequest request)

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

Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   InsertRegionInstanceGroupManagerRequest request =
       InsertRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionInstanceGroupManagersClient.insertAsync(request).get();
 }
 
Parameter
NameDescription
requestInsertRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertAsync(String project, String region, InstanceGroupManager instanceGroupManagerResource)

public final OperationFuture<Operation,Operation> insertAsync(String project, String region, InstanceGroupManager instanceGroupManagerResource)

Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .insertAsync(project, region, instanceGroupManagerResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerResourceInstanceGroupManager

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertCallable()

public final UnaryCallable<InsertRegionInstanceGroupManagerRequest,Operation> insertCallable()

Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   InsertRegionInstanceGroupManagerRequest request =
       InsertRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.insertCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<InsertRegionInstanceGroupManagerRequest,Operation>

insertOperationCallable()

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

Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   InsertRegionInstanceGroupManagerRequest request =
       InsertRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient.insertOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<InsertRegionInstanceGroupManagerRequest,Operation,Operation>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

list(ListRegionInstanceGroupManagersRequest request)

public final RegionInstanceGroupManagersClient.ListPagedResponse list(ListRegionInstanceGroupManagersRequest request)

Retrieves the list of managed instance groups that are contained within the specified 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListRegionInstanceGroupManagersRequest request =
       ListRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   for (InstanceGroupManager element :
       regionInstanceGroupManagersClient.list(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListRegionInstanceGroupManagersRequest

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

Returns
TypeDescription
RegionInstanceGroupManagersClient.ListPagedResponse

list(String project, String region)

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

Retrieves the list of managed instance groups that are contained within the specified 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   for (InstanceGroupManager element :
       regionInstanceGroupManagersClient.list(project, region).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

Returns
TypeDescription
RegionInstanceGroupManagersClient.ListPagedResponse

listCallable()

public final UnaryCallable<ListRegionInstanceGroupManagersRequest,RegionInstanceGroupManagerList> listCallable()

Retrieves the list of managed instance groups that are contained within the specified 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListRegionInstanceGroupManagersRequest request =
       ListRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     RegionInstanceGroupManagerList response =
         regionInstanceGroupManagersClient.listCallable().call(request);
     for (InstanceGroupManager element : response.getItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRegionInstanceGroupManagersRequest,RegionInstanceGroupManagerList>

listErrors(ListErrorsRegionInstanceGroupManagersRequest request)

public final RegionInstanceGroupManagersClient.ListErrorsPagedResponse listErrors(ListErrorsRegionInstanceGroupManagersRequest request)

Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListErrorsRegionInstanceGroupManagersRequest request =
       ListErrorsRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   for (InstanceManagedByIgmError element :
       regionInstanceGroupManagersClient.listErrors(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListErrorsRegionInstanceGroupManagersRequest

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

Returns
TypeDescription
RegionInstanceGroupManagersClient.ListErrorsPagedResponse

listErrors(String project, String region, String instanceGroupManager)

public final RegionInstanceGroupManagersClient.ListErrorsPagedResponse listErrors(String project, String region, String instanceGroupManager)

Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   for (InstanceManagedByIgmError element :
       regionInstanceGroupManagersClient
           .listErrors(project, region, instanceGroupManager)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request. This should conform to RFC1035.

instanceGroupManagerString

The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:a-z?)|1-9{0,19}.

Returns
TypeDescription
RegionInstanceGroupManagersClient.ListErrorsPagedResponse

listErrorsCallable()

public final UnaryCallable<ListErrorsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListErrorsResponse> listErrorsCallable()

Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListErrorsRegionInstanceGroupManagersRequest request =
       ListErrorsRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     RegionInstanceGroupManagersListErrorsResponse response =
         regionInstanceGroupManagersClient.listErrorsCallable().call(request);
     for (InstanceManagedByIgmError element : response.getItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListErrorsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListErrorsResponse>

listErrorsPagedCallable()

public final UnaryCallable<ListErrorsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersClient.ListErrorsPagedResponse> listErrorsPagedCallable()

Lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListErrorsRegionInstanceGroupManagersRequest request =
       ListErrorsRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<InstanceManagedByIgmError> future =
       regionInstanceGroupManagersClient.listErrorsPagedCallable().futureCall(request);
   // Do something.
   for (InstanceManagedByIgmError element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListErrorsRegionInstanceGroupManagersRequest,ListErrorsPagedResponse>

listManagedInstances(ListManagedInstancesRegionInstanceGroupManagersRequest request)

public final RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse listManagedInstances(ListManagedInstancesRegionInstanceGroupManagersRequest request)

Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The pageToken query parameter is supported only in the alpha and beta API and only if the group's listManagedInstancesResults field is set to PAGINATED.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListManagedInstancesRegionInstanceGroupManagersRequest request =
       ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   for (ManagedInstance element :
       regionInstanceGroupManagersClient.listManagedInstances(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListManagedInstancesRegionInstanceGroupManagersRequest

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

Returns
TypeDescription
RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse

listManagedInstances(String project, String region, String instanceGroupManager)

public final RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse listManagedInstances(String project, String region, String instanceGroupManager)

Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The pageToken query parameter is supported only in the alpha and beta API and only if the group's listManagedInstancesResults field is set to PAGINATED.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   for (ManagedInstance element :
       regionInstanceGroupManagersClient
           .listManagedInstances(project, region, instanceGroupManager)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

The name of the managed instance group.

Returns
TypeDescription
RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse

listManagedInstancesCallable()

public final UnaryCallable<ListManagedInstancesRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListInstancesResponse> listManagedInstancesCallable()

Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The pageToken query parameter is supported only in the alpha and beta API and only if the group's listManagedInstancesResults field is set to PAGINATED.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListManagedInstancesRegionInstanceGroupManagersRequest request =
       ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     RegionInstanceGroupManagersListInstancesResponse response =
         regionInstanceGroupManagersClient.listManagedInstancesCallable().call(request);
     for (ManagedInstance element : response.getManagedInstancesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListManagedInstancesRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListInstancesResponse>

listManagedInstancesPagedCallable()

public final UnaryCallable<ListManagedInstancesRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersClient.ListManagedInstancesPagedResponse> listManagedInstancesPagedCallable()

Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported. The pageToken query parameter is supported only in the alpha and beta API and only if the group's listManagedInstancesResults field is set to PAGINATED.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListManagedInstancesRegionInstanceGroupManagersRequest request =
       ListManagedInstancesRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<ManagedInstance> future =
       regionInstanceGroupManagersClient.listManagedInstancesPagedCallable().futureCall(request);
   // Do something.
   for (ManagedInstance element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListManagedInstancesRegionInstanceGroupManagersRequest,ListManagedInstancesPagedResponse>

listPagedCallable()

public final UnaryCallable<ListRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersClient.ListPagedResponse> listPagedCallable()

Retrieves the list of managed instance groups that are contained within the specified 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListRegionInstanceGroupManagersRequest request =
       ListRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<InstanceGroupManager> future =
       regionInstanceGroupManagersClient.listPagedCallable().futureCall(request);
   // Do something.
   for (InstanceGroupManager element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRegionInstanceGroupManagersRequest,ListPagedResponse>

listPerInstanceConfigs(ListPerInstanceConfigsRegionInstanceGroupManagersRequest request)

public final RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse listPerInstanceConfigs(ListPerInstanceConfigsRegionInstanceGroupManagersRequest request)

Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListPerInstanceConfigsRegionInstanceGroupManagersRequest request =
       ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   for (PerInstanceConfig element :
       regionInstanceGroupManagersClient.listPerInstanceConfigs(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListPerInstanceConfigsRegionInstanceGroupManagersRequest

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

Returns
TypeDescription
RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse

listPerInstanceConfigs(String project, String region, String instanceGroupManager)

public final RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse listPerInstanceConfigs(String project, String region, String instanceGroupManager)

Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   for (PerInstanceConfig element :
       regionInstanceGroupManagersClient
           .listPerInstanceConfigs(project, region, instanceGroupManager)
           .iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request, should conform to RFC1035.

instanceGroupManagerString

The name of the managed instance group. It should conform to RFC1035.

Returns
TypeDescription
RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse

listPerInstanceConfigsCallable()

public final UnaryCallable<ListPerInstanceConfigsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListInstanceConfigsResp> listPerInstanceConfigsCallable()

Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListPerInstanceConfigsRegionInstanceGroupManagersRequest request =
       ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     RegionInstanceGroupManagersListInstanceConfigsResp response =
         regionInstanceGroupManagersClient.listPerInstanceConfigsCallable().call(request);
     for (PerInstanceConfig element : response.getItemsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListPerInstanceConfigsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersListInstanceConfigsResp>

listPerInstanceConfigsPagedCallable()

public final UnaryCallable<ListPerInstanceConfigsRegionInstanceGroupManagersRequest,RegionInstanceGroupManagersClient.ListPerInstanceConfigsPagedResponse> listPerInstanceConfigsPagedCallable()

Lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ListPerInstanceConfigsRegionInstanceGroupManagersRequest request =
       ListPerInstanceConfigsRegionInstanceGroupManagersRequest.newBuilder()
           .setFilter("filter-1274492040")
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setMaxResults(1128457243)
           .setOrderBy("orderBy-1207110587")
           .setPageToken("pageToken873572522")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<PerInstanceConfig> future =
       regionInstanceGroupManagersClient
           .listPerInstanceConfigsPagedCallable()
           .futureCall(request);
   // Do something.
   for (PerInstanceConfig element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListPerInstanceConfigsRegionInstanceGroupManagersRequest,ListPerInstanceConfigsPagedResponse>

patchAsync(PatchRegionInstanceGroupManagerRequest request)

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

Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   PatchRegionInstanceGroupManagerRequest request =
       PatchRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionInstanceGroupManagersClient.patchAsync(request).get();
 }
 
Parameter
NameDescription
requestPatchRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchAsync(String project, String region, String instanceGroupManager, InstanceGroupManager instanceGroupManagerResource)

public final OperationFuture<Operation,Operation> patchAsync(String project, String region, String instanceGroupManager, InstanceGroupManager instanceGroupManagerResource)

Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   InstanceGroupManager instanceGroupManagerResource = InstanceGroupManager.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .patchAsync(project, region, instanceGroupManager, instanceGroupManagerResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

The name of the instance group manager.

instanceGroupManagerResourceInstanceGroupManager

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchCallable()

public final UnaryCallable<PatchRegionInstanceGroupManagerRequest,Operation> patchCallable()

Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   PatchRegionInstanceGroupManagerRequest request =
       PatchRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.patchCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<PatchRegionInstanceGroupManagerRequest,Operation>

patchOperationCallable()

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

Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it's possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   PatchRegionInstanceGroupManagerRequest request =
       PatchRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setInstanceGroupManagerResource(InstanceGroupManager.newBuilder().build())
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient.patchOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<PatchRegionInstanceGroupManagerRequest,Operation,Operation>

patchPerInstanceConfigsAsync(PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> patchPerInstanceConfigsAsync(PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request)

Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request =
       PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerPatchInstanceConfigReqResource(
               RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Operation response =
       regionInstanceGroupManagersClient.patchPerInstanceConfigsAsync(request).get();
 }
 
Parameter
NameDescription
requestPatchPerInstanceConfigsRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchPerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerPatchInstanceConfigReq regionInstanceGroupManagerPatchInstanceConfigReqResource)

public final OperationFuture<Operation,Operation> patchPerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerPatchInstanceConfigReq regionInstanceGroupManagerPatchInstanceConfigReqResource)

Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagerPatchInstanceConfigReq
       regionInstanceGroupManagerPatchInstanceConfigReqResource =
           RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .patchPerInstanceConfigsAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagerPatchInstanceConfigReqResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request, should conform to RFC1035.

instanceGroupManagerString

The name of the managed instance group. It should conform to RFC1035.

regionInstanceGroupManagerPatchInstanceConfigReqResourceRegionInstanceGroupManagerPatchInstanceConfigReq

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchPerInstanceConfigsCallable()

public final UnaryCallable<PatchPerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> patchPerInstanceConfigsCallable()

Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request =
       PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerPatchInstanceConfigReqResource(
               RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.patchPerInstanceConfigsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<PatchPerInstanceConfigsRegionInstanceGroupManagerRequest,Operation>

patchPerInstanceConfigsOperationCallable()

public final OperationCallable<PatchPerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> patchPerInstanceConfigsOperationCallable()

Inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   PatchPerInstanceConfigsRegionInstanceGroupManagerRequest request =
       PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerPatchInstanceConfigReqResource(
               RegionInstanceGroupManagerPatchInstanceConfigReq.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient
           .patchPerInstanceConfigsOperationCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<PatchPerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation>

recreateInstancesAsync(RecreateInstancesRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> recreateInstancesAsync(RecreateInstancesRegionInstanceGroupManagerRequest request)

Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   RecreateInstancesRegionInstanceGroupManagerRequest request =
       RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersRecreateRequestResource(
               RegionInstanceGroupManagersRecreateRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionInstanceGroupManagersClient.recreateInstancesAsync(request).get();
 }
 
Parameter
NameDescription
requestRecreateInstancesRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

recreateInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersRecreateRequest regionInstanceGroupManagersRecreateRequestResource)

public final OperationFuture<Operation,Operation> recreateInstancesAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersRecreateRequest regionInstanceGroupManagersRecreateRequestResource)

Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagersRecreateRequest
       regionInstanceGroupManagersRecreateRequestResource =
           RegionInstanceGroupManagersRecreateRequest.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .recreateInstancesAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagersRecreateRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

Name of the managed instance group.

regionInstanceGroupManagersRecreateRequestResourceRegionInstanceGroupManagersRecreateRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

recreateInstancesCallable()

public final UnaryCallable<RecreateInstancesRegionInstanceGroupManagerRequest,Operation> recreateInstancesCallable()

Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   RecreateInstancesRegionInstanceGroupManagerRequest request =
       RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersRecreateRequestResource(
               RegionInstanceGroupManagersRecreateRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.recreateInstancesCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<RecreateInstancesRegionInstanceGroupManagerRequest,Operation>

recreateInstancesOperationCallable()

public final OperationCallable<RecreateInstancesRegionInstanceGroupManagerRequest,Operation,Operation> recreateInstancesOperationCallable()

Flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group's current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per 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 (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   RecreateInstancesRegionInstanceGroupManagerRequest request =
       RecreateInstancesRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersRecreateRequestResource(
               RegionInstanceGroupManagersRecreateRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient
           .recreateInstancesOperationCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<RecreateInstancesRegionInstanceGroupManagerRequest,Operation,Operation>

resizeAsync(ResizeRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> resizeAsync(ResizeRegionInstanceGroupManagerRequest request)

Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ResizeRegionInstanceGroupManagerRequest request =
       ResizeRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .setSize(3530753)
           .build();
   Operation response = regionInstanceGroupManagersClient.resizeAsync(request).get();
 }
 
Parameter
NameDescription
requestResizeRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

resizeAsync(String project, String region, String instanceGroupManager, int size)

public final OperationFuture<Operation,Operation> resizeAsync(String project, String region, String instanceGroupManager, int size)

Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   int size = 3530753;
   Operation response =
       regionInstanceGroupManagersClient
           .resizeAsync(project, region, instanceGroupManager, size)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

Name of the managed instance group.

sizeint

Number of instances that should exist in this instance group manager.

Returns
TypeDescription
OperationFuture<Operation,Operation>

resizeCallable()

public final UnaryCallable<ResizeRegionInstanceGroupManagerRequest,Operation> resizeCallable()

Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ResizeRegionInstanceGroupManagerRequest request =
       ResizeRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .setSize(3530753)
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.resizeCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<ResizeRegionInstanceGroupManagerRequest,Operation>

resizeOperationCallable()

public final OperationCallable<ResizeRegionInstanceGroupManagerRequest,Operation,Operation> resizeOperationCallable()

Changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   ResizeRegionInstanceGroupManagerRequest request =
       ResizeRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRequestId("requestId693933066")
           .setSize(3530753)
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient.resizeOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<ResizeRegionInstanceGroupManagerRequest,Operation,Operation>

setInstanceTemplateAsync(SetInstanceTemplateRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> setInstanceTemplateAsync(SetInstanceTemplateRegionInstanceGroupManagerRequest request)

Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   SetInstanceTemplateRegionInstanceGroupManagerRequest request =
       SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersSetTemplateRequestResource(
               RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Operation response =
       regionInstanceGroupManagersClient.setInstanceTemplateAsync(request).get();
 }
 
Parameter
NameDescription
requestSetInstanceTemplateRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

setInstanceTemplateAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersSetTemplateRequest regionInstanceGroupManagersSetTemplateRequestResource)

public final OperationFuture<Operation,Operation> setInstanceTemplateAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersSetTemplateRequest regionInstanceGroupManagersSetTemplateRequestResource)

Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagersSetTemplateRequest
       regionInstanceGroupManagersSetTemplateRequestResource =
           RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .setInstanceTemplateAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagersSetTemplateRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

The name of the managed instance group.

regionInstanceGroupManagersSetTemplateRequestResourceRegionInstanceGroupManagersSetTemplateRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

setInstanceTemplateCallable()

public final UnaryCallable<SetInstanceTemplateRegionInstanceGroupManagerRequest,Operation> setInstanceTemplateCallable()

Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   SetInstanceTemplateRegionInstanceGroupManagerRequest request =
       SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersSetTemplateRequestResource(
               RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.setInstanceTemplateCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SetInstanceTemplateRegionInstanceGroupManagerRequest,Operation>

setInstanceTemplateOperationCallable()

public final OperationCallable<SetInstanceTemplateRegionInstanceGroupManagerRequest,Operation,Operation> setInstanceTemplateOperationCallable()

Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   SetInstanceTemplateRegionInstanceGroupManagerRequest request =
       SetInstanceTemplateRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersSetTemplateRequestResource(
               RegionInstanceGroupManagersSetTemplateRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient
           .setInstanceTemplateOperationCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<SetInstanceTemplateRegionInstanceGroupManagerRequest,Operation,Operation>

setTargetPoolsAsync(SetTargetPoolsRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> setTargetPoolsAsync(SetTargetPoolsRegionInstanceGroupManagerRequest request)

Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   SetTargetPoolsRegionInstanceGroupManagerRequest request =
       SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersSetTargetPoolsRequestResource(
               RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Operation response = regionInstanceGroupManagersClient.setTargetPoolsAsync(request).get();
 }
 
Parameter
NameDescription
requestSetTargetPoolsRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

setTargetPoolsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersSetTargetPoolsRequest regionInstanceGroupManagersSetTargetPoolsRequestResource)

public final OperationFuture<Operation,Operation> setTargetPoolsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagersSetTargetPoolsRequest regionInstanceGroupManagersSetTargetPoolsRequestResource)

Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagersSetTargetPoolsRequest
       regionInstanceGroupManagersSetTargetPoolsRequestResource =
           RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .setTargetPoolsAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagersSetTargetPoolsRequestResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

instanceGroupManagerString

Name of the managed instance group.

regionInstanceGroupManagersSetTargetPoolsRequestResourceRegionInstanceGroupManagersSetTargetPoolsRequest

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

setTargetPoolsCallable()

public final UnaryCallable<SetTargetPoolsRegionInstanceGroupManagerRequest,Operation> setTargetPoolsCallable()

Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   SetTargetPoolsRegionInstanceGroupManagerRequest request =
       SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersSetTargetPoolsRequestResource(
               RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.setTargetPoolsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<SetTargetPoolsRegionInstanceGroupManagerRequest,Operation>

setTargetPoolsOperationCallable()

public final OperationCallable<SetTargetPoolsRegionInstanceGroupManagerRequest,Operation,Operation> setTargetPoolsOperationCallable()

Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   SetTargetPoolsRegionInstanceGroupManagerRequest request =
       SetTargetPoolsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagersSetTargetPoolsRequestResource(
               RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient.setTargetPoolsOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<SetTargetPoolsRegionInstanceGroupManagerRequest,Operation,Operation>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updatePerInstanceConfigsAsync(UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request)

public final OperationFuture<Operation,Operation> updatePerInstanceConfigsAsync(UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request)

Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request =
       UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerUpdateInstanceConfigReqResource(
               RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Operation response =
       regionInstanceGroupManagersClient.updatePerInstanceConfigsAsync(request).get();
 }
 
Parameter
NameDescription
requestUpdatePerInstanceConfigsRegionInstanceGroupManagerRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

updatePerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerUpdateInstanceConfigReq regionInstanceGroupManagerUpdateInstanceConfigReqResource)

public final OperationFuture<Operation,Operation> updatePerInstanceConfigsAsync(String project, String region, String instanceGroupManager, RegionInstanceGroupManagerUpdateInstanceConfigReq regionInstanceGroupManagerUpdateInstanceConfigReqResource)

Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String instanceGroupManager = "instanceGroupManager-388242077";
   RegionInstanceGroupManagerUpdateInstanceConfigReq
       regionInstanceGroupManagerUpdateInstanceConfigReqResource =
           RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build();
   Operation response =
       regionInstanceGroupManagersClient
           .updatePerInstanceConfigsAsync(
               project,
               region,
               instanceGroupManager,
               regionInstanceGroupManagerUpdateInstanceConfigReqResource)
           .get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request, should conform to RFC1035.

instanceGroupManagerString

The name of the managed instance group. It should conform to RFC1035.

regionInstanceGroupManagerUpdateInstanceConfigReqResourceRegionInstanceGroupManagerUpdateInstanceConfigReq

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

updatePerInstanceConfigsCallable()

public final UnaryCallable<UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation> updatePerInstanceConfigsCallable()

Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request =
       UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerUpdateInstanceConfigReqResource(
               RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       regionInstanceGroupManagersClient.updatePerInstanceConfigsCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation>

updatePerInstanceConfigsOperationCallable()

public final OperationCallable<UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation> updatePerInstanceConfigsOperationCallable()

Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionInstanceGroupManagersClient regionInstanceGroupManagersClient =
     RegionInstanceGroupManagersClient.create()) {
   UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest request =
       UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.newBuilder()
           .setInstanceGroupManager("instanceGroupManager-388242077")
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setRegionInstanceGroupManagerUpdateInstanceConfigReqResource(
               RegionInstanceGroupManagerUpdateInstanceConfigReq.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Operation, Operation> future =
       regionInstanceGroupManagersClient
           .updatePerInstanceConfigsOperationCallable()
           .futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest,Operation,Operation>