patch method

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 thelistManagedInstances method. This method supportsPATCH semantics and uses theJSON 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, seeUpdating instances in a MIG.

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> patch(PatchInstanceGroupManagerRequest request) async {
  final url = _endPoint.replace(
    path:
        '/compute/v1/projects/${request.project}/zones/${request.zone}/instanceGroupManagers/${request.instanceGroupManager}',
    queryParameters: {'requestId': ?request.requestId},
  );
  final response = await _client.patch(
    url,
    body: request.instanceGroupManagerResource,
  );
  return Operation.fromJson(response);
}