v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-13205188.5 KB
projects

Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return ALREADY_EXISTS error.

post/v2/{+parent}/functions

Path parameters

parentstring required

Required. The project and location in which the function should be created, specified in the format projects/*/locations/*

Query parameters

functionIdstring

The ID to use for the function, which will become the final component of the function's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.

Request body

kmsKeyNamestring

Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

environment'ENVIRONMENT_UNSPECIFIED' | 'GEN_1' | 'GEN_2'

Describe whether the function is 1st Gen or 2nd Gen.

urlstring

Output only. The deployed url for the function.

satisfiesPzsboolean

Output only. Reserved for future use.

descriptionstring

User-provided description of a function.

labelsobject

Labels associated with this Cloud Function.

state'STATE_UNSPECIFIED' | 'ACTIVE' | 'FAILED' | 'DEPLOYING' | 'DELETING' | 'UNKNOWN' | 'DETACHING' | 'DETACH_FAILED'

Output only. State of the function.

namestring

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

satisfiesPziboolean

Output only. Reserved for future use.

updateTimestring google-datetime

Output only. The last update timestamp of a Cloud Function.

createTimestring google-datetime

Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions.

Response

Successful response