Cloud Run functions is a serverless execution environment for building and connecting cloud services. With Cloud Run functions, you write single-purpose functions that are attached to events emitted from your cloud infrastructure and services. Your function is triggered when an event being watched is fired. Your code executes in a fully managed environment in Cloud Run. There is no need to provision any infrastructure or worry about managing any servers.
You can write Cloud Run functions using a number of . You can take your function and run it in any standard runtime environment for one of the supported languages, which makes both portability and local testing a breeze. Functions are built into containers and deployed as services on Cloud Run. This gives you complete access and control over the behavior of the function.
Events and triggers
Cloud events are things that happen in your cloud environment. These might be things like changes to data in a database, files added to a storage system, or a new virtual machine instance being created.
Events occur whether or not you choose to respond to them. You create a response to an event with a trigger. A trigger is a declaration that you are interested in a certain event or set of events. Binding a function to a trigger lets you capture and act on events. For more information on creating triggers and associating them with your functions, see .
Versions
There are two versions of Cloud Run functions:
Cloud Run functions, formerly known as Cloud Functions (2nd gen), which deploys your function as services on Cloud Run, allowing you to trigger them using Eventarc and Pub/Sub. Cloud Run functions (1st gen), formerly known as Cloud Functions (1st gen), the original version of functions with limited event triggers and configurability
Cloud Run functions (1st gen)