Class RegionInstanceGroupManagersClient

  • All Implemented Interfaces:
    com.google.api.gax.core.BackgroundResource, AutoCloseable

    @Generated("by gapic-generator-java")
    public class RegionInstanceGroupManagersClient
    extends Object
    implements com.google.api.gax.core.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.

    • Constructor Detail

      • RegionInstanceGroupManagersClient

        protected RegionInstanceGroupManagersClient​(RegionInstanceGroupManagersSettings settings)
                                             throws IOException
        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.
        Throws:
        IOException
    • Method Detail

      • abandonInstancesAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - Name of the managed instance group.
        regionInstanceGroupManagersAbandonInstancesRequestResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • abandonInstancesAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • abandonInstancesOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • abandonInstancesCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • applyUpdatesToInstancesAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request, should conform to RFC1035.
        instanceGroupManager - The name of the managed instance group, should conform to RFC1035.
        regionInstanceGroupManagersApplyUpdatesRequestResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • applyUpdatesToInstancesAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • applyUpdatesToInstancesOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • applyUpdatesToInstancesCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • createInstancesAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - The name of the region where the managed instance group is located. It should conform to RFC1035.
        instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
        regionInstanceGroupManagersCreateInstancesRequestResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createInstancesAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • createInstancesOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • createInstancesCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • deleteAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - Name of the managed instance group to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • deleteCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • deleteInstancesAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - Name of the managed instance group.
        regionInstanceGroupManagersDeleteInstancesRequestResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteInstancesAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteInstancesOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • deleteInstancesCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • deletePerInstanceConfigsAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request, should conform to RFC1035.
        instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
        regionInstanceGroupManagerDeleteInstanceConfigReqResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deletePerInstanceConfigsAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deletePerInstanceConfigsOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • deletePerInstanceConfigsCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • get

        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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - Name of the managed instance group to return.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • get

        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);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • insertAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManagerResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • insertAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • insertOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • insertCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • list

        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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • list

        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);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listPagedCallable

        public final com.google.api.gax.rpc.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);
           }
         }
         
      • listCallable

        public final com.google.api.gax.rpc.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;
             }
           }
         }
         
      • listErrors

        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:
        project - Project ID for this request.
        region - Name of the region scoping this request. This should conform to RFC1035.
        instanceGroupManager - 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](?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listErrors

        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);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listErrorsPagedCallable

        public final com.google.api.gax.rpc.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);
           }
         }
         
      • listErrorsCallable

        public final com.google.api.gax.rpc.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;
             }
           }
         }
         
      • listManagedInstances

        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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - The name of the managed instance group.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listManagedInstances

        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);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listManagedInstancesPagedCallable

        public final com.google.api.gax.rpc.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);
           }
         }
         
      • listManagedInstancesCallable

        public final com.google.api.gax.rpc.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;
             }
           }
         }
         
      • listPerInstanceConfigs

        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:
        project - Project ID for this request.
        region - Name of the region scoping this request, should conform to RFC1035.
        instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listPerInstanceConfigs

        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);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listPerInstanceConfigsPagedCallable

        public final com.google.api.gax.rpc.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);
           }
         }
         
      • listPerInstanceConfigsCallable

        public final com.google.api.gax.rpc.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;
             }
           }
         }
         
      • patchAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - The name of the instance group manager.
        instanceGroupManagerResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • patchAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • patchOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • patchCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • patchPerInstanceConfigsAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request, should conform to RFC1035.
        instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
        regionInstanceGroupManagerPatchInstanceConfigReqResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • patchPerInstanceConfigsAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • patchPerInstanceConfigsOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • patchPerInstanceConfigsCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • recreateInstancesAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - Name of the managed instance group.
        regionInstanceGroupManagersRecreateRequestResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • recreateInstancesAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • recreateInstancesOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • recreateInstancesCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • resizeAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - Name of the managed instance group.
        size - Number of instances that should exist in this instance group manager.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • resizeAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • resizeOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • resizeCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • setInstanceTemplateAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - The name of the managed instance group.
        regionInstanceGroupManagersSetTemplateRequestResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • setInstanceTemplateAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • setInstanceTemplateOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • setInstanceTemplateCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • setTargetPoolsAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        instanceGroupManager - Name of the managed instance group.
        regionInstanceGroupManagersSetTargetPoolsRequestResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • setTargetPoolsAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • setTargetPoolsOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • setTargetPoolsCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • updatePerInstanceConfigsAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request, should conform to RFC1035.
        instanceGroupManager - The name of the managed instance group. It should conform to RFC1035.
        regionInstanceGroupManagerUpdateInstanceConfigReqResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updatePerInstanceConfigsAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updatePerInstanceConfigsOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • updatePerInstanceConfigsCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface com.google.api.gax.core.BackgroundResource
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in interface com.google.api.gax.core.BackgroundResource
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface com.google.api.gax.core.BackgroundResource
      • shutdownNow

        public void shutdownNow()
        Specified by:
        shutdownNow in interface com.google.api.gax.core.BackgroundResource