Skip to content

Commit 7ce14b2

Browse files
authored
feat(audit-trail): add support for EventSystem (scaleway#2663)
1 parent 8db00ea commit 7ce14b2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

api/audit_trail/v1alpha1/audit_trail_sdk.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,11 @@ type EventPrincipal struct {
238238
ID string `json:"id"`
239239
}
240240

241+
// EventSystem: event system.
242+
type EventSystem struct {
243+
Name string `json:"name"`
244+
}
245+
241246
// Resource: resource.
242247
type Resource struct {
243248
ID string `json:"id"`
@@ -327,7 +332,12 @@ type Event struct {
327332
Locality string `json:"locality"`
328333

329334
// Principal: user or IAM application at the origin of the event.
330-
Principal *EventPrincipal `json:"principal"`
335+
// Precisely one of Principal, System must be set.
336+
Principal *EventPrincipal `json:"principal,omitempty"`
337+
338+
// System: the Scaleway system that performed an action on behalf of the client.
339+
// Precisely one of Principal, System must be set.
340+
System *EventSystem `json:"system,omitempty"`
331341

332342
// OrganizationID: organization ID containing the event.
333343
OrganizationID string `json:"organization_id"`

0 commit comments

Comments
 (0)