code: @BetaApi
    public final Operation setTargetPoolsRegionInstanceGroupManager(
        ProjectRegionInstanceGroupManagerName instanceGroupManager,
        RegionInstanceGroupManagersSetTargetPoolsRequest
            regionInstanceGroupManagersSetTargetPoolsRequestResource) {
  
      SetTargetPoolsRegionInstanceGroupManagerHttpRequest request =
          SetTargetPoolsRegionInstanceGroupManagerHttpRequest.newBuilder()
              .setInstanceGroupManager(
                  instanceGroupManager == null ? null : instanceGroupManager.toString())
              .setRegionInstanceGroupManagersSetTargetPoolsRequestResource(
                  regionInstanceGroupManagersSetTargetPoolsRequestResource)
              .build();
      return setTargetPoolsRegionInstanceGroupManager(request);
    }
docs: Modifies the target pools to which all new instances in this group are assigned. Existing
  instances in the group are not affected.
  
  <p>Sample code:
  
  <pre><code>
  try (RegionInstanceGroupManagerClient regionInstanceGroupManagerClient = RegionInstanceGroupManagerClient.create()) {
  ProjectRegionInstanceGroupManagerName instanceGroupManager = ProjectRegionInstanceGroupManagerName.of("[PROJECT]", "[REGION]", "[INSTANCE_GROUP_MANAGER]");
  RegionInstanceGroupManagersSetTargetPoolsRequest regionInstanceGroupManagersSetTargetPoolsRequestResource = RegionInstanceGroupManagersSetTargetPoolsRequest.newBuilder().build();
  Operation response = regionInstanceGroupManagerClient.setTargetPoolsRegionInstanceGroupManager(instanceGroupManager, regionInstanceGroupManagersSetTargetPoolsRequestResource);
  }
  </code></pre>
  
  @param instanceGroupManager Name of the managed instance group.
  @param regionInstanceGroupManagersSetTargetPoolsRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails