setTargetPools method
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 markedDONE 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.
Throws a http.ClientException if there were problems communicating with
the API service. Throws a ServiceException if the API method failed for
any reason.
Implementation
Future<Operation> setTargetPools(
SetTargetPoolsInstanceGroupManagerRequest request,
) async {
final url = _endPoint.replace(
path:
'/compute/v1/projects/${request.project}/zones/${request.zone}/instanceGroupManagers/${request.instanceGroupManager}/setTargetPools',
queryParameters: {'requestId': ?request.requestId},
);
final response = await _client.post(
url,
body: request.instanceGroupManagersSetTargetPoolsRequestResource,
);
return Operation.fromJson(response);
}