Skip to content

Commit fc3f746

Browse files
authored
feat(serverless_jobs): add support for States in ListJobsRunsRequest (scaleway#2566)
1 parent 3f13aad commit fc3f746

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/jobs/v1alpha1/jobs_sdk.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,8 @@ type ListJobRunsRequest struct {
525525

526526
// State: default value: unknown_state
527527
State JobRunState `json:"-"`
528+
529+
States []JobRunState `json:"-"`
528530
}
529531

530532
// ListJobRunsResponse: list job runs response.
@@ -1150,6 +1152,7 @@ func (s *API) ListJobRuns(req *ListJobRunsRequest, opts ...scw.RequestOption) (*
11501152
parameter.AddToQuery(query, "project_id", req.ProjectID)
11511153
parameter.AddToQuery(query, "organization_id", req.OrganizationID)
11521154
parameter.AddToQuery(query, "state", req.State)
1155+
parameter.AddToQuery(query, "states", req.States)
11531156

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

0 commit comments

Comments
 (0)