Updated on 2023-07-06 GMT+08:00

Function Management

Overview

Function is a combination of code, runtime, resources, and settings required to achieve a specific purpose. It is the minimum unit that can run independently. A function can be triggered by triggers and automatically schedule required resources and environments to achieve expected results.

Exporting a Function

You can export the functions that you created.

  1. Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
  2. Click a function name.
  3. On the displayed function details page, choose Operation > Export function in the upper right corner.

    • A user can export only one function at a time.
    • The exported function resource package cannot exceed 50 MB.
    • The name of the exported function resource package is in the format of function name+MD5 value of function code.zip.
    • The exported function resource package does not include alias information.

Disabling a Function

Disabled functions can no longer be executed.

  1. Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
  2. Click the name of the function you want to disable.
  3. On the displayed function details page, click Disable in the upper right corner.
  4. On the displayed page, click Yes. The function is disabled.

    • Only functions of the latest version can be disabled.
    • Versions published based on the disabled latest version of a function are also disabled and can never be enabled.
    • After disabling a function, you can modify its code but cannot execute the function.

Enabling a Function

Disabled functions can be enabled again as required.

  1. Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
  2. Click the name of the function you want to enable.
  3. On the displayed function details page, click Enable in the upper right corner.

Deleting a function

You can delete unused functions to release resources.

  1. Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
  2. Click the name of the function you want to delete.
  3. Select a search criterion (function name, runtime, or app name) in the upper right corner, enter a keyword, and click to search for the function you want to delete.
  4. Click Delete in the same row as the function.
  5. In the Delete Function dialog box, click Yes to confirm the deletion.