def get_project(self, project_id):
"""Returns the specified Project resource.
Args:
project_id (str): The project id.
Returns:
dict: A Compute Project resource dict.
https://cloud.google.com/compute/docs/reference/latest/projects/get
"""
try:
return self.repository.projects.get(project_id)
except (errors.HttpError, HttpLib2Error) as e:
api_not_enabled, details = _api_not_enabled(e)
if api_not_enabled:
raise api_errors.ApiNotEnabledError(details, e)
raise api_errors.ApiExecutionError(project_id, e)
评论列表
文章目录