setServiceAccount method

  1. @override
Future<Operation> setServiceAccount(
  1. SetServiceAccountInstanceRequest request
)
override

Sets the service account on the instance. For more information, readChanging the service account and access scopes for an instance.

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> setServiceAccount(
  SetServiceAccountInstanceRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_setServiceAccount case final setServiceAccount?) {
    return setServiceAccount(request);
  }
  throw UnsupportedError('setServiceAccount');
}