Skip to content

Commit 338b2b8

Browse files
authored
feat(audit_trail): add ResourceType filter (scaleway#2696)
1 parent 6e08e6e commit 338b2b8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

api/audit_trail/v1alpha1/audit_trail_sdk.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ type ListEventsRequest struct {
421421
// OrganizationID: ID of the Organization containing the Audit Trail events.
422422
OrganizationID string `json:"-"`
423423

424-
// ResourceType: (Optional) Returns a paginated list of Scaleway resources' features.
424+
// ResourceType: (Optional) Type of the Scaleway resource.
425425
// Default value: unknown_type
426426
ResourceType ResourceType `json:"-"`
427427

@@ -444,11 +444,14 @@ type ListEventsRequest struct {
444444

445445
PageToken *string `json:"-"`
446446

447-
// ProductName: (Optional) Name of the Scaleway resource in a hyphenated format.
447+
// ProductName: (Optional) Name of the Scaleway product in a hyphenated format.
448448
ProductName *string `json:"-"`
449449

450450
// ServiceName: (Optional) Name of the service of the API call performed.
451451
ServiceName *string `json:"-"`
452+
453+
// ResourceID: (Optional) ID of the Scaleway resource.
454+
ResourceID *string `json:"-"`
452455
}
453456

454457
// ListEventsResponse: list events response.
@@ -545,6 +548,7 @@ func (s *API) ListEvents(req *ListEventsRequest, opts ...scw.RequestOption) (*Li
545548
parameter.AddToQuery(query, "page_token", req.PageToken)
546549
parameter.AddToQuery(query, "product_name", req.ProductName)
547550
parameter.AddToQuery(query, "service_name", req.ServiceName)
551+
parameter.AddToQuery(query, "resource_id", req.ResourceID)
548552

549553
if fmt.Sprint(req.Region) == "" {
550554
return nil, errors.New("field Region cannot be empty in request")

0 commit comments

Comments
 (0)