GET /v2/iam/access_logs.
An Entry
GET /v2/iam/access_logs?filter[decision]=deny
- Every request of a service account, or of a user other than the owner, once the organization has enabled IAM.
- The requests of a user other than the owner for the actions every signed-in user holds, sent with a session or an OAuth token, whether or not the organization has enabled IAM.
- A request of the owner that IAM refused, such as one the scope of the owner’s API key does not allow. The owner holds no roles, so the owner’s other requests are not listed.
X-Managed-Account-Id is decided for its sender, so the rules above apply to the sender and the sender’s organization, but the entry goes to the managed organization’s access logs. For such a request, the sender’s own organization lists only a refused managed_account.impersonate.
Preview An entry names the delegation a request came through, when a manager worked in a managed organization, and a managed organization’s log names the manager org user who acted in it.
Filters
metadata.cursors.after is null on the last page. A range longer than 14 days, a start_time after end_time, or an invalid filter value or cursor answers 422. When the logs cannot be read, the request answers 503.
Credential Inventory
GET /v2/iam/api_keys lists every API key of the organization with its id, its user, its status, and when it was last used. Once IAM is enabled, GET /v2/iam/access_logs?filter[cred_id]={id} lists the requests that key sent and the action each needed. The owner’s keys appear only in the requests IAM refused.
Preview Every credential shows from where it was last used and the actions it sent in the last thirty days in one place, so a key that is really one server reading invoices can be moved to a service account with exactly that role.