Closed hacktobeer closed 4 years ago
I suspect a change in https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list and some new release in https://github.com/googleapis/google-api-python-client
Discovery for this API and method shows it should still be 'resourceNames'... https://www.googleapis.com/discovery/v1/apis/logging/v2/rest?parameters
Right, doesn't make much sense. A quick try changing https://github.com/google/cloud-forensics-utils/blob/2c5b8b50bf19f209fe77309811d466d82302b42c/libcloudforensics/providers/gcp/internal/log.py#L101 to:
body = {
'body': {
'resourceNames': 'projects/' + self.project_id,
'filter': qfilter,
'orderBy': 'timestamp desc'
}
}
Seems to solve the issue. However this breaks the way the pageToken
token is currently appended by ExecuteRequest
(should then be appended to the dict
in 'body'). Doing so might break other API calls that did not change the requests' format. This particular method may need to be handled separately. Will investigate some more!