Method: projects.locations.functions.redirectFunctionUpgradeTraffic

Changes the traffic target of a function from the original 1st gen function to the 2nd gen copy. This is the second step of the multi-step process to upgrade 1st gen functions to Cloud Run functions. After this operation, all new traffic will be served by the 2nd gen function copy.

HTTP request

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

Path parameters

Parameters
name

string

Required. The name of the function for which traffic target should be changed to 2nd gen from 1st gen. 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 must be empty.

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.