get method

Returns the specified global ProjectViews resource, with a regional context. This regional API endpoint reads resource metadata from regional read-only replicas. Because changes are copied to these regional replicas asynchronously, for real-time resource reads or any write operations (creating, updating, or deleting resources), use the global projects.get endpoint.

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<ProjectView> get(GetProjectViewRequest request) async {
  final url = _endPoint.replace(
    path:
        '/compute/v1/projects/${request.project}/regions/${request.region}/projectViews',
  );
  final response = await _client.get(url);
  return ProjectView.fromJson(response);
}