Stay organized with collections
Save and categorize content based on your preferences.
Returns a signed URL for uploading a function source code. For more
information about the signed URL usage see:
https://cloud.google.com/storage/docs/access-control/signed-urls. Once
the function source code upload is complete, the used signed URL should
be provided in CreateFunction or UpdateFunction request as a reference
to the function source code. When uploading source code to the generated
signed URL, please follow these restrictions: * Source file type should
be a zip file. * Source file size should not exceed 100MB limit. * No
credentials should be attached - the signed URLs provide access to the
target bucket using internal service identity; if credentials were
attached, the identity from the credentials would be used, but that
identity does not have permissions to upload files to the URL. When
making a HTTP PUT request, these two headers need to be specified: *
content-type: application/zip * x-goog-content-length-range:
0,104857600 And this header SHOULD NOT be specified: * Authorization:
Bearer YOUR_TOKEN
Arguments
Parameters
parent
string
Required. The project and location in which the Google Cloud Storage signed URL should be generated, specified in the format projects/*/locations/*.
Raised exceptions
Exceptions
ConnectionError
In case of a network problem (such as DNS failure or refused connection).
HttpError
If the response status is >= 400 (excluding 429 and 503).
TimeoutError
If a long-running operation takes longer to finish than the specified timeout limit.
TypeError
If an operation or function receives an argument of the wrong type.
ValueError
If an operation or function receives an argument of the right type but an inappropriate value. For example, a negative timeout.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Method: googleapis.cloudfunctions.v1.projects.locations.functions.generateUploadUrl\n\nReturns a signed URL for uploading a function source code. For more\ninformation about the signed URL usage see:\nhttps://cloud.google.com/storage/docs/access-control/signed-urls. Once\nthe function source code upload is complete, the used signed URL should\nbe provided in CreateFunction or UpdateFunction request as a reference\nto the function source code. When uploading source code to the generated\nsigned URL, please follow these restrictions: \\* Source file type should\nbe a zip file. \\* Source file size should not exceed 100MB limit. \\* No\ncredentials should be attached - the signed URLs provide access to the\ntarget bucket using internal service identity; if credentials were\nattached, the identity from the credentials would be used, but that\nidentity does not have permissions to upload files to the URL. When\nmaking a HTTP PUT request, these two headers need to be specified: \\*\n`content-type: application/zip` \\* `x-goog-content-length-range:\n0,104857600` And this header SHOULD NOT be specified: \\* `Authorization:\nBearer YOUR_TOKEN`\n\nArguments\n---------\n\nRaised exceptions\n-----------------\n\nResponse\n--------\n\nIf successful, the response contains an instance of [`GenerateUploadUrlResponse`](/workflows/docs/reference/googleapis/cloudfunctions/v1/Overview#GenerateUploadUrlResponse).\n\nSubworkflow snippet\n-------------------\n\nSome fields might be optional or required.\nTo identify required fields, refer to the [API documentation](https://cloud.google.com/functions/docs/reference/rest/v1/projects.locations.functions/generateUploadUrl). \n\n### YAML\n\n```yaml\n- generateUploadUrl:\n call: googleapis.cloudfunctions.v1.projects.locations.functions.generateUploadUrl\n args:\n parent: ...\n result: generateUploadUrlResult\n```\n\n### JSON\n\n```json\n[\n {\n \"generateUploadUrl\": {\n \"call\": \"googleapis.cloudfunctions.v1.projects.locations.functions.generateUploadUrl\",\n \"args\": {\n \"parent\": \"...\"\n },\n \"result\": \"generateUploadUrlResult\"\n }\n }\n]\n```"]]