Skip to content

Commit

Permalink
feat(audit_trail): add support for ServiceName (scaleway#2453)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Mar 6, 2025
1 parent f3e5567 commit f667e6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/audit_trail/v1alpha1/audit_trail_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ type ListEventsRequest struct {
// Default value: unknown_type
ResourceType ResourceType `json:"-"`

// MethodName: (Optional) Name of the method or the API call performed.
// MethodName: (Optional) Name of the method of the API call performed.
MethodName *string `json:"-"`

// Status: (Optional) HTTP status code of the request. Returns either `200` if the request was successful or `403` if the permission was denied.
Expand All @@ -339,6 +339,9 @@ type ListEventsRequest struct {

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

// ServiceName: (Optional) Name of the service of the API call performed.
ServiceName *string `json:"-"`
}

// ListEventsResponse: list events response.
Expand Down Expand Up @@ -433,6 +436,7 @@ func (s *API) ListEvents(req *ListEventsRequest, opts ...scw.RequestOption) (*Li
parameter.AddToQuery(query, "page_size", req.PageSize)
parameter.AddToQuery(query, "page_token", req.PageToken)
parameter.AddToQuery(query, "product_name", req.ProductName)
parameter.AddToQuery(query, "service_name", req.ServiceName)

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

0 comments on commit f667e6a

Please sign in to comment.