Updated on 2025-08-19 GMT+08:00

Basic Settings

The basic settings of a function, such as the handler, execution timeout, and memory, are set by default based on the runtime selected during function creation. You can modify the settings as required.

Configuring Basic Settings

  1. Log in to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. Click the name of a function.
  3. Choose Configuration > Basic Settings.
  4. On the displayed page, modify the basic settings by referring to Table 1.
    Table 1 Basic settings

    Parameter

    Description

    Function Name

    Function name configured during function creation.

    It is set when a function is created and cannot be modified.

    Function Version

    Function version.

    The version of the newly created function is v2, which cannot be changed.

    Application

    An application acts like a folder. In the future, functions will be managed by tags for better experience.

    The application of the newly created function is default, which cannot be changed.

    Runtime

    Runtime language of the function.

    It is set when a function is created and cannot be modified.

    Handler

    Function handler is the entry point specified in the function code for executing logic. Generally, it is a specific function or method. When a function is triggered, the code is executed from the handler.

    The handler format varies depending on the runtime and cannot exceed 128 characters.

    • For a Node.js, Python, or PHP function, the handler must be named in the format of [file name].[function name], which must contain a period (.).

      Default: index.handler

    • For a Java function, the handler must be named in the format of [package name].[class name].[execution function name].

      Default: com.huawei.demo.TriggerTests.apigTest

    • For a Go function, the handler name must be the same as the executable file name in the code file.

      Default: If the executable file is handler, set this parameter to handler.

    • For a C# function, the handler must be named in the format of [assembly]::[namespace].[class name]::[execution function name].

      Default: CsharpDemo::CsharpDemo.Program::MyFunc

    Enterprise Project

    Enterprise project to which this function belongs. You can use different enterprise projects to manage functions. Select a created enterprise project and add the function to it. By default, default is selected.

    This parameter is available only after the enterprise project feature is enabled. For details, see Enabling the Enterprise Project Function

    Execution Timeout (s)

    Timeout interval for executing the function. If the execution times out, the function will be forcibly stopped. If the execution takes longer than 900s, use asynchronous invocation.

    NOTE:

    FunctionGraph has three restrictions on the function execution duration:

    • Maximum execution duration of a function: The built-in execution duration of a function is limited to prevent the function from executing for a long time. In synchronous invocation scenarios, the maximum function execution duration is 15 minutes. In asynchronous invocation scenarios, the maximum function execution duration is 259,200 seconds (3 days). For details, see Invoking the Function.
    • Execution timeout (s): You can configure the function execution timeout based on service requirements. The timeout must be less than the maximum function execution duration.
    • Frontend timeout: This refers to the built-in timeout reminder on frontend pages. The frontend page waits for a backend response for a maximum of 90 seconds. If the configured timeout exceeds 90 seconds and the actual function execution exceeds 90 seconds, a timeout message is displayed on the frontend page, but the backend is still running properly. After the execution is complete, you can still view the result in the log.

    The execution timeout ranges from 3 to 259,200 seconds. The default value is 3.

    Memory (MB)

    Memory size that can be used for function execution. The default value is 128.

    The value can be 128, 256, 512, 768, 1,024, 1,280, 1,536, 1,792, 2,048, 2,560, 3,072, 3,584, 4,096, 8,192, or 10,240.

    Description

    Function description. You can customize the description of the function service.

    Enter a maximum of 512 characters.

  5. Click Save to save the configuration.

Helpful Links

Manage the function lifecycle using APIs. For details, see Function Lifecycle Management APIs.