Working in the code editor
To work with your function code in the code editor:
- Select Cloud Functions in the management console.
- Click in the row of the function you want to edit.
- In the window that opens, go to Editor.
- Under Function code:
- Select the runtime environment.
- Select how you want to edit the function: Code editor.
- In the function edit window, select an existing file in the left navigation panel or create a new file by clicking Create file. In the window that opens, enter the file name with its extension and click Create.
- Specify the entry point: the name of the function to be called as a handler. It is specified in the format
<name of the function file>.<handler name>
, for example,index.myFunction
.
- Under Parameters:
- Specify the timeout.
- Specify the amount of RAM.
- (optional) Select or create a service account. When you add a service account for a function, you can get its IAM token from the function context.
- (optional) Add environment variables.
- In the upper-right corner, click Create version.