- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- BuildConfigOverrides
- ServiceConfigOverrides
- Try it!
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 2nd Gen. 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 |
Required. The name of the function which should have configuration copied for upgrade. It takes the form Authorization requires the following IAM permission on the specified resource
|
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "triggerServiceAccount": string, "buildConfigOverrides": { object ( |
| Fields | |
|---|---|
triggerServiceAccount |
Optional. The trigger's service account. The service account must have permission to invoke Cloud Run services, the permission is |
buildConfigOverrides |
Optional. Specifies overrides for the build process. |
serviceConfigOverrides |
Optional. Specifies overrides for the service configuration. |
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.
BuildConfigOverrides
Contains overrides related to the function's build configuration.
| JSON representation |
|---|
{ "runtime": string } |
| Fields | |
|---|---|
runtime |
Optional. Specifies the desired runtime for the new Cloud Run function. (e.g., Constraints: 1. This field CANNOT be used to change the runtime language (e.g., from If provided and valid, this overrides the runtime of the Gen1 function. |
ServiceConfigOverrides
Contains overrides related to the function's service configuration.
| JSON representation |
|---|
{ "maxInstanceCount": integer } |
| Fields | |
|---|---|
maxInstanceCount |
Optional. Specifies the maximum number of instances for the new Cloud Run function. If provided, this overrides the maxInstanceCount setting of the Gen1 function. |