This section describes how to quickly create and test a HelloWorld function on the FunctionGraph console.
Parameter |
Description |
Example Value |
|---|---|---|
Function Type |
Select Event Function. An event function is triggered by a specific event, which is usually a request event in JSON format. |
Event Function |
Region |
Select the region where the function is located. Regions are geographic areas isolated from each other. Resources are region-specific and cannot be used across regions through internal network connections. Select a region near you to ensure the lowest latency possible. |
eu-de |
Function Name |
Enter a function name. The naming rules are as follows:
|
HelloWorld |
Enterprise Project |
Select the enterprise project to which the function belongs. Enterprise projects let you manage cloud resources and users by project. The default value is default. You can select the created enterprise project. |
default |
Agency |
Select an agency for the function. An agency is used to authorize FunctionGraph to access other cloud services. If FunctionGraph does not access any cloud service, you do not need to select an agency. By default, Use no agency is used. You can select an existing agency. |
Use no agency |
Permission Policies |
This parameter is displayed only when an agency is selected. For details about how to adjust the permission policies on the IAM console, see section "Configuring Agency Permissions". |
- |
Runtime |
Select a runtime to compile the function.
|
Node.js 16.17 |
Parameter |
Description |
|---|---|
Log Configuration |
You can select Auto or Custom.
|
Log Tag |
You can use these tags to filter function logs in LTS. You can add 10 more tags. Tag key/value: Enter a maximum of 64 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed. |
exports.handler = function (event, context, callback) {
const error = null;
const output = `Hello message: ${JSON.stringify(event)}`;
callback(error, output);
}
{
"hello": "function"
}

Click Test and view the execution result on the right.
