Parameter | Description |
|---|---|
Template | This example uses no template. To use a template, see Creating a Function Using a Template. |
*Function Name | Name of the function, which must meet the following requirements:
Enter HelloWorld. |
Function Type |
|
*Region | Select a region where you will deploy your code. |
Agency | An agency is required if FunctionGraph accesses other cloud services. For details on how to create an agency, see Creating an Agency. No agency is required if FunctionGraph does not access any cloud services. For this example, select Use no agency. |
*Enterprise Project | Select a created enterprise project and add the function to it. By default, default is selected. |
Runtime | Select a runtime to compile the function. NOTICE: CloudIDE supports Node.js, Python, and PHP only. |
To ensure optimal performance, select Specify an exclusive agency for function execution and set different agencies for function configuration and execution. You can also use no agency or specify the same agency for both purposes.
Parameter | Description |
|---|---|
*Runtime | Select the runtime of the function. In this example, select Node.js 6.10. |
*Handler | For a Node.js function, the handler must be named in the format of [file name].[function name], which must contain a period (.). Enter index.handler, which indicates that the file name is index.js and the function name is handler. |
*Code Entry Mode | Select Edit code inline, and use the displayed sample code. |
The sample code enables you to obtain test events and print test event information. The code is as follows:
exports.handler = function (event, context, callback) {const error = null;const output = `Hello message: ${JSON.stringify(event)}`;callback(error, output);}
After the function is created, the memory is 128 MB and the execution timeout is 3s.
If initialization is enabled for a function, a specified initializer will be invoked to initialize the function, and then a handler will be invoked to process requests. For details on how to create a function, see Creating a Function.
Figure 1 Setting an initializer

Parameter | Description |
|---|---|
Initialization | Enable initialization if needed. |
Initialization Timeout (s) | Maximum duration the function can be initialized. Set this parameter if you enable function initialization. The value ranges from 1s to 300s. |
Function initializer | You can enable function initialization on the Configuration tab page. The initializer must be named in the same way as the handler. For example, for a Node.js or Python function, set an initializer name in the format of [file name].[initialization function name]. NOTE:
|
For details on how to configure test events and test functions, see Test Management.
For details about how to set an alias, see Version and Alias Management.