Method: googleapis.cloudfunctions.v1.projects.locations.functions.generateUploadUrl

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.

Response

If successful, the response contains an instance of GenerateUploadUrlResponse.

Subworkflow snippet

Some fields might be optional or required. To identify required fields, refer to the API documentation.

YAML

- generateUploadUrl:
    call: googleapis.cloudfunctions.v1.projects.locations.functions.generateUploadUrl
    args:
        parent: ...
    result: generateUploadUrlResult

JSON

[
  {
    "generateUploadUrl": {
      "call": "googleapis.cloudfunctions.v1.projects.locations.functions.generateUploadUrl",
      "args": {
        "parent": "..."
      },
      "result": "generateUploadUrlResult"
    }
  }
]