def get_project_ancestry(self, project_id):
"""Get the full folder ancestry for a project.
Args:
project_id (str): Either the project number or the project id.
Returns:
list: The ancesters of the project, in order from direct parent to
root organization id.
"""
try:
results = self.repository.projects.get_ancestry(project_id)
return results.get('ancestor', [])
except (errors.HttpError, HttpLib2Error) as e:
raise api_errors.ApiExecutionError(project_id, e)
cloud_resource_manager.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录