Uploads a source archive to a Google Cloud Storage bucket through Cloud Run. The uploaded source object should be used for Cloud Run resource deployments. User is responsible for managing the lifecycle of the uploaded object. If uploading through the Cloud Run API to Cloud Storage is not desired, you can use the IAM Deny Policy to deny the run.locations.uploadSource permission for all principals.
HTTP request
- Upload URI, for media upload requests:
POST https://run.googleapis.com/upload/v2/{parent}:uploadSource - Metadata URI, for metadata-only requests:
POST https://run.googleapis.com/v2/{parent}:uploadSource
Path parameters
| Parameters | |
|---|---|
parent |
Required. The project and location in which the source archive should be uploaded to, specified in the format Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field target. The Cloud Run resource the upload source archive will be used for. target can be only one of the following: |
|
service |
The name of Cloud Run Service upload source archive will be used for. |
Response body
If successful, the response body contains an instance of UploadSourceResponse.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.