setInstanceTemplate method

  1. @override
Future<Operation> setInstanceTemplate(
  1. SetInstanceTemplateInstanceGroupManagerRequest request
)
override

Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, runapplyUpdatesToInstances, or set the group'supdatePolicy.type to PROACTIVE.

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

@override
Future<Operation> setInstanceTemplate(
  SetInstanceTemplateInstanceGroupManagerRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_setInstanceTemplate case final setInstanceTemplate?) {
    return setInstanceTemplate(request);
  }
  throw UnsupportedError('setInstanceTemplate');
}