Skip to main content

audit_event_definitions

Creates, updates, deletes, gets or lists an audit_event_definitions resource.

Overview​

Nameaudit_event_definitions
TypeResource
Idgitlab.audit.audit_event_definitions

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
namestringKey name of the audit event.
descriptionstringDescription of what action the audit event tracks.
feature_categorystringFeature category associated with the event.
introduced_by_issuestringLink to the issue introducing the event. For olderaudit events, it can be a commit URL rather than amerge request URL.
introduced_by_mrstringLink to the merge request introducing the event. Forolder audit events, it can be a commit URL rather thana merge request URL.
milestonestringMilestone the event was introduced in.
saved_to_databasebooleanIndicates if the event is saved to PostgreSQL database.
streamedbooleanIndicates if the event is streamed to an external destination.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselecthostDefinitions for all audit events available on the instance. Generated from the GitLab GraphQL schema field Query.auditEventDefinitions (connection of AuditEventDefinition nodes).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)

SELECT examples​

Definitions for all audit events available on the instance. Generated from the GitLab GraphQL schema field Query.auditEventDefinitions (connection of AuditEventDefinition nodes).

SELECT
name,
description,
feature_category,
introduced_by_issue,
introduced_by_mr,
milestone,
saved_to_database,
streamed
FROM gitlab.audit.audit_event_definitions
WHERE host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
;