class ProjectsRegionsJobs extends Resource (View source)

The "jobs" collection of methods.

Typical usage is:

 $dataprocService = new Google\Service\Dataproc(...);
 $jobs = $dataprocService->projects_regions_jobs;

Methods

Job
cancel(string $projectId, string $region, string $jobId, CancelJobRequest $postBody, array $optParams = [])

Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list (https://cloud.google.com/datap roc/docs/reference/rest/v1/projects.regions.jobs/list) or regions/{region}/jobs.get (https://cloud.google.com/dataproc/docs/reference/r est/v1/projects.regions.jobs/get). (jobs.cancel)

delete(string $projectId, string $region, string $jobId, array $optParams = [])

Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION. (jobs.delete)

Job
get(string $projectId, string $region, string $jobId, array $optParams = [])

Gets the resource representation for a job in a project. (jobs.get)

getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (jobs.getIamPolicy)

listProjectsRegionsJobs(string $projectId, string $region, array $optParams = [])

Lists regions/{region}/jobs in a project. (jobs.listProjectsRegionsJobs)

Job
patch(string $projectId, string $region, string $jobId, Job $postBody, array $optParams = [])

Updates a job in a project. (jobs.patch)

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (jobs.setIamPolicy)

Job
submit(string $projectId, string $region, SubmitJobRequest $postBody, array $optParams = [])

Submits a job to a cluster. (jobs.submit)

submitAsOperation(string $projectId, string $region, SubmitJobRequest $postBody, array $optParams = [])

Submits job to a cluster. (jobs.submitAsOperation)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

Details

Job cancel(string $projectId, string $region, string $jobId, CancelJobRequest $postBody, array $optParams = [])

Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list (https://cloud.google.com/datap roc/docs/reference/rest/v1/projects.regions.jobs/list) or regions/{region}/jobs.get (https://cloud.google.com/dataproc/docs/reference/r est/v1/projects.regions.jobs/get). (jobs.cancel)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the job belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $jobId

Required. The job ID.

CancelJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

DataprocEmpty delete(string $projectId, string $region, string $jobId, array $optParams = [])

Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION. (jobs.delete)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the job belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $jobId

Required. The job ID.

array $optParams

Optional parameters.

Return Value

DataprocEmpty

Exceptions

Exception

Job get(string $projectId, string $region, string $jobId, array $optParams = [])

Gets the resource representation for a job in a project. (jobs.get)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the job belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $jobId

Required. The job ID.

array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

Policy getIamPolicy(string $resource, GetIamPolicyRequest $postBody, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (jobs.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

GetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListJobsResponse listProjectsRegionsJobs(string $projectId, string $region, array $optParams = [])

Lists regions/{region}/jobs in a project. (jobs.listProjectsRegionsJobs)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the job belongs to.

string $region

Required. The Dataproc region in which to handle the request.

array $optParams

Optional parameters.

Return Value

ListJobsResponse

Exceptions

Exception

Job patch(string $projectId, string $region, string $jobId, Job $postBody, array $optParams = [])

Updates a job in a project. (jobs.patch)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the job belongs to.

string $region

Required. The Dataproc region in which to handle the request.

string $jobId

Required. The job ID.

Job $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (jobs.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

Job submit(string $projectId, string $region, SubmitJobRequest $postBody, array $optParams = [])

Submits a job to a cluster. (jobs.submit)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the job belongs to.

string $region

Required. The Dataproc region in which to handle the request.

SubmitJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Job

Exceptions

Exception

Operation submitAsOperation(string $projectId, string $region, SubmitJobRequest $postBody, array $optParams = [])

Submits job to a cluster. (jobs.submitAsOperation)

Parameters

string $projectId

Required. The ID of the Google Cloud Platform project that the job belongs to.

string $region

Required. The Dataproc region in which to handle the request.

SubmitJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

This operation may "fail open" without warning. (jobs.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names (https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception