Oracle Cloud Infrastructure Documentation

Deleting Applications and Functions

You can delete applications and functions in Oracle Functions that you or other functions developers have created, provided you have been granted the necessary permission (FN_APP_DELETE or FN_FUNCTION_DELETE as appropriate).

Note the following:

  • Deleting a function does not delete the Docker image on which the function is based. To delete the image, you have to delete it explicitly (see Deleting an Image).
  • Deleting applications and functions is permanent. You cannot undelete an application or function that you've deleted.
  • Deleting a function does not necessarily enable you to immediately delete the subnet and VCN in which the function runs. Expect to wait up to 30 minutes after the function was last invoked before you can delete the associated network resources.

You can delete applications and functions using the Console, the Fn Project CLI, and the API.

Using the Console

When using the Console to delete applications and functions, note that:

  • when you delete an application, all of its functions are also deleted
  • you're always prompted to confirm deletion because you cannot undelete an application or function later

To delete applications and functions in Oracle Functions using the Console:

  1. Log in to the Console as a functions developer.
  2. In the Console, open the navigation menu. Under Solutions and Platform, go to Developer Services and click Functions.
  3. Select the region you are using with Oracle Functions. Oracle recommends that you use the same region as the Docker registry that's specified in the Fn Project CLI context (see 6. Create an Fn Project CLI Context to Connect to Oracle Cloud Infrastructure).
  4. Select the compartment specified in the Fn Project CLI context (see 6. Create an Fn Project CLI Context to Connect to Oracle Cloud Infrastructure).

    The Applications page shows the applications defined in the compartment.

  5. To delete an application, and all of its functions:

    1. Click the name of the application you want to delete.
    2. On the Application Detail page, click Delete and confirm you want to delete the application as follows:

      • If the application does not have functions within it, click Delete to confirm that you want to delete the application.
      • If the application does have functions within it, you are shown a list of the functions in the application. To delete the application, enter DELETE <APPLICATION-NAME> in the text box, and click Delete.

    Note that deleting an application and all of its functions does not delete the Docker images on which the functions are based. To delete the images, you have to delete them explicitly (see Deleting an Image).

  6. To delete a function:

    1. Click the name of the application containing the function you want to delete.
    2. On the Application Detail page, click the name of the function you want to delete.
    3. On the Function Detail page, click Delete and confirm you want to delete the function.

    Note that deleting a function does not delete the Docker image on which the function is based. To delete the image, you have to delete it explicitly (see Deleting an Image).

Using Fn Project CLI Commands

When using the Fn Project CLI to delete applications and functions, note that you cannot delete an application if it contains functions (you must delete the functions first).

To delete applications and functions in Oracle Functions using the Fn Project CLI:

  1. Log in to your development environment as a functions developer.

  2. To delete an application:

    1. In a terminal window, enter:

      $ fn delete app <app-name>

      where <app-name> is the name of the application to delete.

      For example:

      $ fn delete app acmeapp
    2. Verify that the application has been deleted by entering:

      $ fn list apps
  3. To delete a function:

    1. In a terminal window, enter:

      $ fn delete function <app-name> <function-name>

      where:

      • <app-name> is the name of the application containing the function you want to delete.
      • <function-name> is the name of the function you want to delete.

      For example:

      $ fn delete function acmeapp acme-func
    2. Verify that the function has been deleted by entering:

      $ fn list functions <app-name>

      For example:

      $ fn list functions acmeapp			
      

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use these API operations to delete applications and functions: