import { BaseJob, BaseRun, CancelAllRunsRequest, CancelAllRunsResponse, CancelRunRequest, CreateJobRequest, CreateJobResponse, DeleteJobRequest, DeleteJobResponse, DeleteRunRequest, DeleteRunResponse, EnforcePolicyComplianceForJob, EnforcePolicyComplianceResponse, ExportRunRequest, ExportRunResponse, GetJobRequest, GetJobResponse, GetPolicyComplianceForJobRequest, GetPolicyComplianceForJobResponse, GetRunOutputRequest, GetRunOutputResponse, GetRunRequest, GetRunResponse, ListJobComplianceForPolicy, ListJobComplianceForPolicy_JobCompliance, ListJobComplianceResponse, ListJobsRequest, ListJobsResponse, ListRunsRequest, ListRunsResponse, RepairRunRequest, ResetJobRequest, ResetJobResponse, RunNowRequest, SubmitRunRequest, UpdateJobRequest, UpdateJobResponse } from "./model.js"; import { CallOptions } from "@databricks/sdk-options/call"; import { ClientOptions } from "@databricks/sdk-options/client"; import { LroOptions } from "@databricks/sdk-options/lro"; //#region src/v2/client.d.ts declare class JobsClient { private readonly options; private readonly logger; private readonly userAgent; private config; constructor(options: ClientOptions); private resolveConfig; /** * Updates a job so the job clusters that are created when running * the job (specified in `new_cluster`) are compliant with the * current versions of their respective cluster policies. * All-purpose clusters used in the job will not be updated. */ enforcePolicyComplianceForJob(req: EnforcePolicyComplianceForJob, options?: CallOptions): Promise; /** * Returns the policy compliance status of a job. Jobs could be out of * compliance if a cluster policy they use was updated after the job was * last edited and some of its job clusters no longer comply with * their updated policies. */ getPolicyComplianceForJob(req: GetPolicyComplianceForJobRequest, options?: CallOptions): Promise; /** * Returns the policy compliance status of all jobs that use a * given policy. Jobs could be out of compliance if a cluster policy they * use was updated after the job was last edited and its job * clusters no longer comply with the updated policy. */ listJobComplianceForPolicy(req: ListJobComplianceForPolicy, options?: CallOptions): Promise; listJobComplianceForPolicyIter(req: ListJobComplianceForPolicy, options?: CallOptions): AsyncGenerator; /** * Cancels all active runs of a job. The runs are canceled asynchronously, so it doesn't * prevent new runs from being started. */ cancelAllRuns(req: CancelAllRunsRequest, options?: CallOptions): Promise; /** * Cancels a job run or a task run. The run is canceled asynchronously, so it may still be running when * this request completes. */ private cancelRunBase; /** * Cancels a job run or a task run. The run is canceled asynchronously, so it may still be running when * this request completes. */ cancelRun(req: CancelRunRequest, options?: CallOptions): Promise; /** Create a new job. */ createJob(req: CreateJobRequest, options?: CallOptions): Promise; /** Deletes a job. */ deleteJob(req: DeleteJobRequest, options?: CallOptions): Promise; /** Deletes a non-active run. Returns an error if the run is active. */ deleteRun(req: DeleteRunRequest, options?: CallOptions): Promise; /** Export and retrieve the job run task. */ exportRun(req: ExportRunRequest, options?: CallOptions): Promise; /** * Retrieves the details for a single job. * * Large arrays in the results will be paginated when they exceed 100 elements. * A request for a single job will return all properties for that job, and the first 100 elements of array properties (`tasks`, `job_clusters`, `environments` and `parameters`). * Use the `next_page_token` field to check for more results and pass its value as the `page_token` in subsequent requests. * If any array properties have more than 100 elements, additional results will be returned on subsequent requests. Arrays without additional results will be empty on later pages. */ getJob(req: GetJobRequest, options?: CallOptions): Promise; /** * Retrieves the metadata of a run. * * Large arrays in the results will be paginated when they exceed 100 elements. * A request for a single run will return all properties for that run, and the first 100 elements of array properties (`tasks`, `job_clusters`, `job_parameters` and `repair_history`). * Use the next_page_token field to check for more results and pass its value as the page_token in subsequent requests. * If any array properties have more than 100 elements, additional results will be returned on subsequent requests. Arrays without additional results will be empty on later pages. */ getRun(req: GetRunRequest, options?: CallOptions): Promise; /** * Retrieve the output and metadata of a single task run. When a notebook task returns * a value through the `dbutils.notebook.exit()` call, you can use this endpoint to retrieve * that value. restricts this API to returning the first 5 MB of the output. * To return a larger result, you can store job results in a cloud storage service. * * This endpoint validates that the __run_id__ parameter is valid and returns an HTTP status * code 400 if the __run_id__ parameter is invalid. Runs are automatically removed after * 60 days. If you to want to reference them beyond 60 days, you must save old run results * before they expire. */ getRunOutput(req: GetRunOutputRequest, options?: CallOptions): Promise; /** Retrieves a list of jobs. */ listJobs(req: ListJobsRequest, options?: CallOptions): Promise; listJobsIter(req: ListJobsRequest, options?: CallOptions): AsyncGenerator; /** List runs in descending order by end time. If a run has not finished, it falls back to start time. */ listRuns(req: ListRunsRequest, options?: CallOptions): Promise; listRunsIter(req: ListRunsRequest, options?: CallOptions): AsyncGenerator; /** * Re-run one or more tasks. Tasks are re-run as part of the original job run. * They use the current job and task settings, and can be viewed in the history for the * original job run. */ private repairBase; /** * Re-run one or more tasks. Tasks are re-run as part of the original job run. * They use the current job and task settings, and can be viewed in the history for the * original job run. */ repair(req: RepairRunRequest, options?: CallOptions): Promise; /** Overwrite all settings for the given job. Use the [_Update_ endpoint](:method:jobs/update) to update job settings partially. */ resetJob(req: ResetJobRequest, options?: CallOptions): Promise; /** Run a job and return the `run_id` of the triggered run. */ private runNowBase; /** Run a job and return the `run_id` of the triggered run. */ runNow(req: RunNowRequest, options?: CallOptions): Promise; /** * Submit a one-time run. This endpoint allows you to submit a workload directly * without creating a job. Runs submitted using this endpoint don’t display in * the UI. Use the `jobs/runs/get` API to check the run state after the job is * submitted. * * **Important:** Jobs submitted using this endpoint are not saved as a job. * They do not show up in the Jobs UI, and do not retry when they fail. Because * they are not saved, cannot auto-optimize serverless compute in case * of failure. If your job fails, you may want to use classic compute to specify * the compute needs for the job. Alternatively, use the `POST /jobs/create` and * `POST /jobs/run-now` endpoints to create and run a saved job. */ private submitRunBase; /** * Submit a one-time run. This endpoint allows you to submit a workload directly * without creating a job. Runs submitted using this endpoint don’t display in * the UI. Use the `jobs/runs/get` API to check the run state after the job is * submitted. * * **Important:** Jobs submitted using this endpoint are not saved as a job. * They do not show up in the Jobs UI, and do not retry when they fail. Because * they are not saved, cannot auto-optimize serverless compute in case * of failure. If your job fails, you may want to use classic compute to specify * the compute needs for the job. Alternatively, use the `POST /jobs/create` and * `POST /jobs/run-now` endpoints to create and run a saved job. */ submitRun(req: SubmitRunRequest, options?: CallOptions): Promise; /** Add, update, or remove specific settings of an existing job. Use the [_Reset_ endpoint](:method:jobs/reset) to overwrite all job settings. */ updateJob(req: UpdateJobRequest, options?: CallOptions): Promise; } declare class CancelRunWaiter { private readonly client; readonly runId: bigint; constructor(client: JobsClient, runId: bigint); /** * Polls until the operation reaches a terminal state. * * Throws if a failure state is reached. */ wait(options?: LroOptions): Promise; /** Checks whether the operation has reached a terminal state. */ done(options?: CallOptions): Promise; } declare class RepairWaiter { private readonly client; readonly runId: bigint; constructor(client: JobsClient, runId: bigint); /** * Polls until the operation reaches a terminal state. * * Throws if a failure state is reached. */ wait(options?: LroOptions): Promise; /** Checks whether the operation has reached a terminal state. */ done(options?: CallOptions): Promise; } declare class RunNowWaiter { private readonly client; readonly runId: bigint; constructor(client: JobsClient, runId: bigint); /** * Polls until the operation reaches a terminal state. * * Throws if a failure state is reached. */ wait(options?: LroOptions): Promise; /** Checks whether the operation has reached a terminal state. */ done(options?: CallOptions): Promise; } declare class SubmitRunWaiter { private readonly client; readonly runId: bigint; constructor(client: JobsClient, runId: bigint); /** * Polls until the operation reaches a terminal state. * * Throws if a failure state is reached. */ wait(options?: LroOptions): Promise; /** Checks whether the operation has reached a terminal state. */ done(options?: CallOptions): Promise; } //#endregion export { CancelRunWaiter, JobsClient, RepairWaiter, RunNowWaiter, SubmitRunWaiter }; //# sourceMappingURL=client.d.ts.map