Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): Extend SDK client with disable/delete run methods #6754

Merged
28 changes: 28 additions & 0 deletions sdk/python/kfp/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,34 @@ def __repr__(self):
)
return RunPipelineResult(self, run_info)

def delete_job(self, job_id):
"""Delete job.
johnmacnamararseg marked this conversation as resolved.
Show resolved Hide resolved

Args:
job_id: id of the job.

Returns:
Object. If the method is called asynchronously, returns the request thread.

Throws:
johnmacnamararseg marked this conversation as resolved.
Show resolved Hide resolved
Exception if job is not found.
johnmacnamararseg marked this conversation as resolved.
Show resolved Hide resolved
"""
return self._job_api.delete_job(id=job_id)

def disable_job(self, job_id):
"""Disable job.

Args:
job_id: id of the job.

Returns:
Object. If the method is called asynchronously, returns the request thread.

Throws:
Exception if job is not found.
"""
return self._job_api.disable_job(id=job_id)

def list_runs(self,
page_token='',
page_size=10,
Expand Down