code: @BetaApi
    public final Operation setTargetPoolsInstanceGroupManager(
        ProjectZoneInstanceGroupManagerName instanceGroupManager,
        InstanceGroupManagersSetTargetPoolsRequest
            instanceGroupManagersSetTargetPoolsRequestResource) {
  
      SetTargetPoolsInstanceGroupManagerHttpRequest request =
          SetTargetPoolsInstanceGroupManagerHttpRequest.newBuilder()
              .setInstanceGroupManager(
                  instanceGroupManager == null ? null : instanceGroupManager.toString())
              .setInstanceGroupManagersSetTargetPoolsRequestResource(
                  instanceGroupManagersSetTargetPoolsRequestResource)
              .build();
      return setTargetPoolsInstanceGroupManager(request);
    }
docs: Modifies the target pools to which all instances in this managed instance group are assigned.
  The target pools automatically apply to all of the instances in the managed instance group.
  This operation is marked DONE when you make the request even if the instances have not yet been
  added to their target pools. The change might take some time to apply to all of the instances
  in the group depending on the size of the group.
  
  <p>Sample code:
  
  <pre><code>
  try (InstanceGroupManagerClient instanceGroupManagerClient = InstanceGroupManagerClient.create()) {
  ProjectZoneInstanceGroupManagerName instanceGroupManager = ProjectZoneInstanceGroupManagerName.of("[PROJECT]", "[ZONE]", "[INSTANCE_GROUP_MANAGER]");
  InstanceGroupManagersSetTargetPoolsRequest instanceGroupManagersSetTargetPoolsRequestResource = InstanceGroupManagersSetTargetPoolsRequest.newBuilder().build();
  Operation response = instanceGroupManagerClient.setTargetPoolsInstanceGroupManager(instanceGroupManager, instanceGroupManagersSetTargetPoolsRequestResource);
  }
  </code></pre>
  
  @param instanceGroupManager The name of the managed instance group.
  @param instanceGroupManagersSetTargetPoolsRequestResource
  @throws com.google.api.gax.rpc.ApiException if the remote call fails