diff --git a/.changelog/23377.txt b/.changelog/23377.txt new file mode 100644 index 000000000..54dd5baf6 --- /dev/null +++ b/.changelog/23377.txt @@ -0,0 +1,3 @@ +```release-note:bug +api: (Enterprise) fixed Allocations.GetPauseState method discarding the task argument +``` diff --git a/api/allocations.go b/api/allocations.go index 4c52eb074..d4b91ccc6 100644 --- a/api/allocations.go +++ b/api/allocations.go @@ -251,7 +251,7 @@ func (a *Allocations) SetPauseState(alloc *Allocation, q *QueryOptions, task, st // The ?task= query parameter must be set. func (a *Allocations) GetPauseState(alloc *Allocation, q *QueryOptions, task string) (string, *QueryMeta, error) { var resp AllocGetPauseResponse - qm, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/pause", &resp, q) + qm, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/pause?task="+task, &resp, q) state := resp.ScheduleState return state, qm, err }