Method: projects.locations.functions.setupFunctionUpgradeConfig

Creates a 2nd gen copy of the function configuration based on the 1st gen function with the given name. This is the first step of the multi-step process to upgrade 1st gen functions to Cloud Run functions. Only 2nd gen configuration is setup as part of this request and traffic continues to be served by 1st gen.

HTTP request

POST https://cloudfunctions.googleapis.com/v2alpha/{name}:setupFunctionUpgradeConfig

Path parameters

Parameters
name

string

Required. The name of the function which should have configuration copied for upgrade. It takes the form projects/{project}/locations/{location}/functions/{function}.

Authorization requires the following IAM permission on the specified resource name:

  • cloudfunctions.functions.generationUpgrade

Request body

The request body contains data with the following structure:

JSON representation
{
  "triggerServiceAccount": string
}
Fields
triggerServiceAccount

string

Optional. The trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is run.routes.invoke. If empty, defaults to the Compute Engine default service account: {project_number}-compute@developer.gserviceaccount.com.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.