class TransferJobs extends Resource (View source)

The "transferJobs" collection of methods.

Typical usage is:

 $storagetransferService = new Google\Service\Storagetransfer(...);
 $transferJobs = $storagetransferService->transferJobs;

Methods

create(TransferJob $postBody, array $optParams = [])

Creates a transfer job that runs periodically. (transferJobs.create)

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

Deletes a transfer job. Deleting a transfer job sets its status to DELETED.

get(string $jobName, string $projectId, array $optParams = [])

Gets a transfer job. (transferJobs.get)

listTransferJobs(string $filter, array $optParams = [])

Lists transfer jobs. (transferJobs.listTransferJobs)

patch(string $jobName, UpdateTransferJobRequest $postBody, array $optParams = [])

Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. Note: The job's status field can be modified using this RPC (for example, to set a job's status to DELETED, DISABLED, or ENABLED). (transferJobs.patch)

run(string $jobName, RunTransferJobRequest $postBody, array $optParams = [])

Starts a new operation for the specified transfer job. A TransferJob has a maximum of one active TransferOperation. If this method is called while a TransferOperation is active, an error is returned. (transferJobs.run)

Details

TransferJob create(TransferJob $postBody, array $optParams = [])

Creates a transfer job that runs periodically. (transferJobs.create)

Parameters

TransferJob $postBody
array $optParams

Optional parameters.

Return Value

TransferJob

Exceptions

Exception

StoragetransferEmpty delete(string $jobName, string $projectId, array $optParams = [])

Deletes a transfer job. Deleting a transfer job sets its status to DELETED.

(transferJobs.delete)

Parameters

string $jobName

Required. The job to delete.

string $projectId

Required. The ID of the Google Cloud project that owns the job.

array $optParams

Optional parameters.

Return Value

StoragetransferEmpty

Exceptions

Exception

TransferJob get(string $jobName, string $projectId, array $optParams = [])

Gets a transfer job. (transferJobs.get)

Parameters

string $jobName

Required. The job to get.

string $projectId

Required. The ID of the Google Cloud project that owns the job.

array $optParams

Optional parameters.

Return Value

TransferJob

Exceptions

Exception

ListTransferJobsResponse listTransferJobs(string $filter, array $optParams = [])

Lists transfer jobs. (transferJobs.listTransferJobs)

Parameters

string $filter

Required. A list of query parameters specified as JSON text in the form of: {"projectId":"my_project_id", "jobNames":["jobid1","jobid2",...], "jobStatuses":["status1","status2",...]} Since jobNames and jobStatuses support multiple values, their values must be specified with array notation. projectId is required. jobNames and jobStatuses are optional. The valid values for jobStatuses are case- insensitive: ENABLED, DISABLED, and DELETED.

array $optParams

Optional parameters.

Return Value

ListTransferJobsResponse

Exceptions

Exception

TransferJob patch(string $jobName, UpdateTransferJobRequest $postBody, array $optParams = [])

Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. Note: The job's status field can be modified using this RPC (for example, to set a job's status to DELETED, DISABLED, or ENABLED). (transferJobs.patch)

Parameters

string $jobName

Required. The name of job to update.

UpdateTransferJobRequest $postBody
array $optParams

Optional parameters.

Return Value

TransferJob

Exceptions

Exception

Operation run(string $jobName, RunTransferJobRequest $postBody, array $optParams = [])

Starts a new operation for the specified transfer job. A TransferJob has a maximum of one active TransferOperation. If this method is called while a TransferOperation is active, an error is returned. (transferJobs.run)

Parameters

string $jobName

Required. The name of the transfer job.

RunTransferJobRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception