Output only. State Messages for this Cloud Function.
↳ environment
int
Describe whether the function is 1st Gen or 2nd Gen.
↳ url
string
Output only. The deployed url for the function.
↳ kms_key_name
string
Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. It must match the patternprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Functions V2 Client - Class PBFunction (2.0.6)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.6 (latest)](/php/docs/reference/cloud-functions/latest/V2.PBFunction)\n- [2.0.5](/php/docs/reference/cloud-functions/2.0.5/V2.PBFunction)\n- [1.7.0](/php/docs/reference/cloud-functions/1.7.0/V2.PBFunction)\n- [1.6.5](/php/docs/reference/cloud-functions/1.6.5/V2.PBFunction)\n- [1.5.0](/php/docs/reference/cloud-functions/1.5.0/V2.PBFunction)\n- [1.4.2](/php/docs/reference/cloud-functions/1.4.2/V2.PBFunction)\n- [1.3.1](/php/docs/reference/cloud-functions/1.3.1/V2.PBFunction)\n- [1.2.0](/php/docs/reference/cloud-functions/1.2.0/V2.PBFunction)\n- [1.1.2](/php/docs/reference/cloud-functions/1.1.2/V2.PBFunction)\n- [1.0.3](/php/docs/reference/cloud-functions/1.0.3/V2.PBFunction) \nReference documentation and code samples for the Google Cloud Functions V2 Client class PBFunction.\n\nDescribes a Cloud Function that contains user computation executed in\nresponse to an event. It encapsulates function and trigger configurations.\n\nGenerated from protobuf message `google.cloud.functions.v2.Function`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Functions \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nA user-defined name of the function. Function names must be unique\nglobally and match pattern `projects/*/locations/*/functions/*`\n\n### setName\n\nA user-defined name of the function. Function names must be unique\nglobally and match pattern `projects/*/locations/*/functions/*`\n\n### getDescription\n\nUser-provided description of a function.\n\n### setDescription\n\nUser-provided description of a function.\n\n### getBuildConfig\n\nDescribes the Build step of the function that builds a container from the\ngiven source.\n\n### hasBuildConfig\n\n### clearBuildConfig\n\n### setBuildConfig\n\nDescribes the Build step of the function that builds a container from the\ngiven source.\n\n### getServiceConfig\n\nDescribes the Service being deployed. Currently deploys services to Cloud\nRun (fully managed).\n\n### hasServiceConfig\n\n### clearServiceConfig\n\n### setServiceConfig\n\nDescribes the Service being deployed. Currently deploys services to Cloud\nRun (fully managed).\n\n### getEventTrigger\n\nAn Eventarc trigger managed by Google Cloud Functions that fires events in\nresponse to a condition in another service.\n\n### hasEventTrigger\n\n### clearEventTrigger\n\n### setEventTrigger\n\nAn Eventarc trigger managed by Google Cloud Functions that fires events in\nresponse to a condition in another service.\n\n### getState\n\nOutput only. State of the function.\n\n### setState\n\nOutput only. State of the function.\n\n### getUpdateTime\n\nOutput only. The last update timestamp of a Cloud Function.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The last update timestamp of a Cloud Function.\n\n### getLabels\n\nLabels associated with this Cloud Function.\n\n### setLabels\n\nLabels associated with this Cloud Function.\n\n### getStateMessages\n\nOutput only. State Messages for this Cloud Function.\n\n### setStateMessages\n\nOutput only. State Messages for this Cloud Function.\n\n### getEnvironment\n\nDescribe whether the function is 1st Gen or 2nd Gen.\n\n### setEnvironment\n\nDescribe whether the function is 1st Gen or 2nd Gen.\n\n### getUrl\n\nOutput only. The deployed url for the function.\n\n### setUrl\n\nOutput only. The deployed url for the function.\n\n### getKmsKeyName\n\nResource name of a KMS crypto key (managed by the user) used to\nencrypt/decrypt function resources.\n\nIt must match the pattern\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\n### setKmsKeyName\n\nResource name of a KMS crypto key (managed by the user) used to\nencrypt/decrypt function resources.\n\nIt must match the pattern\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\n### getSatisfiesPzs\n\nOutput only. Reserved for future use.\n\n### setSatisfiesPzs\n\nOutput only. Reserved for future use.\n\n### getCreateTime\n\nOutput only. The create timestamp of a Cloud Function. This is only\napplicable to 2nd Gen functions.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. The create timestamp of a Cloud Function. This is only\napplicable to 2nd Gen functions."]]