1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

doc

Azion CLI edge functions command and its subcommands

See the command and subcommands that enable the management of your edge functions on the Azion Platform using Azion CLI.

Note: to see how to manage your edge functions in details, go to Managing your Edge Functions using Azion CLI.

  1. Listing your edge functions
  2. Creating your edge function
  3. Deleting your edge function
  4. Describing your edge function
  5. Updating your edge function
  6. Related documentation

1. Listing your edge functions

List the edge functions available in your library, including the preconfigured Azion - Hello World function.

Usage

    $ azioncli edge_functions list

Flags

Details

The --details option displays all relevant fields when listing.

Filter

The --filter option filters items by their name.

Help

The --help option displays more information about the list subcommand.

Order by

The --order_by option sorts the output based on the selected field.

Page

The --page option returns a page of the list according to its number (default 1).

Page size

The --page_size option defines how many items should be returned per page (default 10).

Sort

The --sort option defines the order of the items on the list. The options are <asc|desc>.


2. Creating your edge function

Create a new edge function directly from the CLI, without having to resort to Real-Time Manager (RTM). Initially, you’ll need a JavaScript file containing the function’s code.

Usage

    $ azioncli edge_functions create --name my-new-ef --code ./my-func.js --active true

Flags

Name

The --name option informs the name of your edge function.

Active

The --active option informs whether your function is active or not.

Args

The --args option informs the path to the edge function’s arguments JSON file.

Code

The --code option informs the path to the edge function’s source code.

Help

The --help option displays more information about the create subcommand.

In

The --in option informs a given file path to create an edge function. You can use - for reading from stdin.


3. Deleting your edge function

Delete an edge function from the Edge Functions library based on its given ID.

Usage

    $ azioncli edge_functions delete --function-id 1234

Flags

Function ID

The --function-id option specifies which edge function will be deleted.

Help

The --help option displays more information about the delete subcommand.


4. Describing your edge function

Describe an edge function from the Edge Functions library based on its given ID.

Usage

    $ azioncli edge_functions describe --function-id 4312
    $ azioncli edge_functions describe --function-id 1337 --with-code
    $ azioncli edge_functions describe --function-id 1337 --out "./tmp/test.json" --format json
    $ azioncli edge_functions describe --function-id 1337 --format json 

Flags

Function ID

The --function-id option specifies which edge function will be described.

Help

The --help option displays more information about the describe subcommand.

Format

The --format option changes the output format passing the json value to the flag.

Out

The --out option exports the output to the given <file_path/file_name.ext>.

With Code

The --with-code option displays the edge function’s code. It’s disabled by default.


5. Updating your edge function

Update an edge function from the Edge Functions library based on its given ID.

Usage

    $ azioncli edge_functions update --function-id 1234 --name 'Hello'
    $ azioncli edge_functions update -f 4185 --code ./mycode/function.js --args ./mycode/myargs.json
    $ azioncli edge_functions update -f 9123 --active true
    $ azioncli edge_functions update -f 9123 --active false
    $ azioncli edge_functions update --in "update.json"

Flags

Name

The --name option informs the name of your edge function.

Active

The --active option informs whether your function is active or not.

Args

The --args option informs the path to the edge function’s arguments JSON file.

Code

The --code option informs the path to the edge function’s source code.

Help

The --help option displays more information about the create subcommand.

In

The --in option informs a given file path to create an edge function. You can use - for reading from stdin.

Function ID

The --function-id option specifies which edge function will be updated.



Didn’t find what you were looking for? Open a support ticket.