compute.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:forseti-security 作者: GoogleCloudPlatform 项目源码 文件源码
def get_global_operation(self, project_id, operation_id):
        """Get the Operations Status
        Args:
            project_id (str): The project id.
            operation_id (str): The operation id.

        Returns:
            dict: Global Operation status and info.
            https://cloud.google.com/compute/docs/reference/latest/globalOperations/get

        Raises:
            ApiNotEnabledError: Returns if the api is not enabled.
            ApiExecutionError: Returns if the api is not executable.

        """
        try:
            return self.repository.global_operations.get(
                project_id, operation_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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号