Skip to content

Commit 0e28290

Browse files
authored
chore(serverless_jobs): filter job defs and runs by organization_id (#2047)
1 parent 4e97e70 commit 0e28290

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

api/jobs/v1alpha1/jobs_sdk.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ type ListJobDefinitionsRequest struct {
307307
OrderBy ListJobDefinitionsRequestOrderBy `json:"-"`
308308

309309
ProjectID *string `json:"-"`
310+
311+
OrganizationID *string `json:"-"`
310312
}
311313

312314
// ListJobDefinitionsResponse: list job definitions response.
@@ -350,6 +352,8 @@ type ListJobRunsRequest struct {
350352
JobDefinitionID *string `json:"-"`
351353

352354
ProjectID *string `json:"-"`
355+
356+
OrganizationID *string `json:"-"`
353357
}
354358

355359
// ListJobRunsResponse: list job runs response.
@@ -554,6 +558,7 @@ func (s *API) ListJobDefinitions(req *ListJobDefinitionsRequest, opts ...scw.Req
554558
parameter.AddToQuery(query, "page_size", req.PageSize)
555559
parameter.AddToQuery(query, "order_by", req.OrderBy)
556560
parameter.AddToQuery(query, "project_id", req.ProjectID)
561+
parameter.AddToQuery(query, "organization_id", req.OrganizationID)
557562

558563
if fmt.Sprint(req.Region) == "" {
559564
return nil, errors.New("field Region cannot be empty in request")
@@ -762,6 +767,7 @@ func (s *API) ListJobRuns(req *ListJobRunsRequest, opts ...scw.RequestOption) (*
762767
parameter.AddToQuery(query, "order_by", req.OrderBy)
763768
parameter.AddToQuery(query, "job_definition_id", req.JobDefinitionID)
764769
parameter.AddToQuery(query, "project_id", req.ProjectID)
770+
parameter.AddToQuery(query, "organization_id", req.OrganizationID)
765771

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

0 commit comments

Comments
 (0)