It doesn't appear possible to list organization or folder audit log entries. I am hoping to use this SDK to poll all audit logs
for all orgs, folders, and projects, then push them to a stream for consumption by our log aggregation system.
{
"errorMessage": "path \"folders/xxxx/logs/cloudaudit.googleapis.com%2Fdata_access\" did not match expected pattern \"\n projects/ # static prefix\n (?P<project>[^/]+) # initial letter, wordchars + hyphen\n /logs/ # static midfix\n (?P<name>[^/]+) # initial letter, wordchars + allowed punc\n\"",
"errorType": "ValueError",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 32, in lambda_handler\n run(resource_id)\n",
" File \"/var/task/timeout_decorator/timeout_decorator.py\", line 82, in new_function\n return function(*args, **kwargs)\n",
" File \"/var/task/lambda_function.py\", line 49, in run\n flush_logs(resource_id, bookmarks)\n",
" File \"/var/task/lambda_function.py\", line 80, in flush_logs\n for entry in list(page):\n",
" File \"/var/task/google/api_core/page_iterator.py\", line 131, in __next__\n result = self._item_to_value(self._parent, item)\n",
" File \"/var/task/google/cloud/logging_v2/_http.py\", line 496, in _item_to_entry\n return entry_from_resource(resource, iterator.client, loggers)\n",
" File \"/var/task/google/cloud/logging_v2/_helpers.py\", line 87, in entry_from_resource\n return ProtobufEntry.from_api_repr(resource, client, loggers=loggers)\n",
" File \"/var/task/google/cloud/logging_v2/entries.py\", line 167, in from_api_repr\n logger_name = logger_name_from_path(logger_fullname)\n",
" File \"/var/task/google/cloud/logging_v2/entries.py\", line 61, in logger_name_from_path\n return _name_from_project_path(path, None, _LOGGER_TEMPLATE)\n",
" File \"/var/task/google/cloud/_helpers.py\", line 488, in _name_from_project_path\n raise ValueError(\n"
]
}
It doesn't appear possible to list organization or folder audit log entries. I am hoping to use this SDK to poll all audit logs
for all orgs, folders, and projects, then push them to a stream for consumption by our log aggregation system.
Environment details
google-cloud-loggingversion: 2.6.0Steps to reproduce
Code example
Stack trace