# Method: transferJobs.patch

Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already.

**Note:** The job's `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.status` field can be modified using this RPC (for example, to set a job's status to `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#Status.ENUM_VALUES.DELETED`, `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#Status.ENUM_VALUES.DISABLED`, or `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#Status.ENUM_VALUES.ENABLED`).

### HTTP request

`PATCH https://storagetransfer.googleapis.com/v1/{jobName=transferJobs/**}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `jobName` | `string` Required. The name of job to update. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `jobName`: - `storagetransfer.jobs.update` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "projectId": string, "transferJob": { object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob`) }, "updateTransferJobFieldMask": string } ``` |

| Fields ||
|---|---|
| `projectId` | `string` Required. The ID of the Google Cloud project that owns the job. |
| `transferJob` | ``object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob`)`` Required. The job to update. `transferJob` is expected to specify one or more of five fields: `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.description`, `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.transfer_spec`, `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.notification_config`, `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.logging_config`, and `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.status`. An `UpdateTransferJobRequest` that specifies other fields are rejected with the error `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#Code.ENUM_VALUES.INVALID_ARGUMENT`. Updating a job status to `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#Status.ENUM_VALUES.DELETED` requires `storagetransfer.jobs.delete` permission. |
| `updateTransferJobFieldMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` The field mask of the fields in `transferJob` that are to be updated in this request. Fields in `transferJob` that can be updated are: `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.description`, `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.transfer_spec`, `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.notification_config`, `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.logging_config`, and `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob.FIELDS.status`. To update the `transferSpec` of the job, a complete transfer specification must be provided. An incomplete specification missing any required fields is rejected with the error `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#Code.ENUM_VALUES.INVALID_ARGUMENT`. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferJobs#TransferJob`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).