Skip to content

Commit

Permalink
EDU-2644-rules-engine-crud-cli (#405)
Browse files Browse the repository at this point in the history
* trigger

* rules engine crud

* description

* Apply suggestions from code review

Co-authored-by: hannah <[email protected]>
Co-authored-by: Mariana Bellorín Aguilera <[email protected]>

---------

Co-authored-by: hannah <[email protected]>
Co-authored-by: Mariana Bellorín Aguilera <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2023
1 parent 21ff284 commit 4224c36
Showing 1 changed file with 189 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
---
title: Rules engine
description: Create, list, describe, update, and delete your application's Rules Engine's rules through Azion CLI.
meta_tags: cli,edge computing, rules engine, low code
namespace: documentation_cli_rules_engine
menu_namespace: cliMenuAlpha
permalink: /documentation/products/cli/rules-engine-crud/
---

## Create

### Usage

```bash
$ azion create rules-engine --application-id 1679423488 --phase "response" --in `./file.json`
```

### Required flags

#### application-id

The `--application-id` flag sets the unique identifier for an edge application.

#### phase

The `--phase` flag specifies the phase for the rule. It's either `request` or `response`.

### Optional flags

#### in

The `--in` flag specifies the path to a JSON file containing the attributes of the rule that'll be created. You can use `-` to read from stdin.

#### help

The `--help` flag displays more information about the `azion create rules-engine` action.

---

## List

### Usage

```bash
$ azion list rules-engine --application-id <application-id> --phase <phase>
```

### Required flags

#### application-id

The `--application-id` flag specifies the unique identifier for the edge application that implements these rules.

#### phase

The `--phase` flag specifies the Rules Engine phase. It's either `request` or `response`.

### Optional flags

#### details

The `--details` flag displays all relevant fields when listing.

#### filter

The `--filter` flag filters items by their name.

#### order-by

The `--order-by` flag sorts the output based on the selected field.

#### page

The `--page` flag returns a specific page of the list according to its number. By default, it's `1`.

#### page-size

The `--page-size` flag defines how many items should be returned per page. By default, it's `10`.

#### sort

The `--sort` flag defines the order of the items on the list and can be set to either `asc` or `desc`.

#### help

The `-h` or `--help` flag displays more information about the `azion list rules-engine` command.

---

## Describe

### Usage

```bash
$ azion describe rules-engine --application-id <application-id> --rule-id <rule-id> --phase <phase> [--format <format>] [--out <output-file>]
```

### Required flags

#### application-id

The `--application-id` flag specifies your edge application ID.

#### rule-id

The `--rule-id` flag specifies your Rules Engine's rule ID.

#### phase

The `--phase` flag specifies the phase of your Rules Engine's rule. It's either `request` or `response`. The default is `request`.

### Optional flags

#### format

The `--format` flag changes the output format, and you can use `json` as a value to specify JSON format.

#### out

The `--out` flag exports the output of the command to the given file path, including the file name and extension.

#### help

The `-h` or `--help` flag displays more information about the `azion describe rules-engine` command.

---

## Update

### Usage

```bash
$ azion update rules-engine --rule-id <rule-id> --application-id <application-id> --phase <phase> --in <rule-json>
```

### Required flags

#### rule-id

The `--rule-id` flag specifies the unique identifier for the rule in Rules Engine.

#### application-id

The `--application-id` flag specifies the unique identifier for the edge application that implements these rules.

#### phase

The `--phase` flag specifies the Rules Engine Phase. It's either `request` or `response`.

### Optional flags

#### in

The `--in` flag specifies the path to a JSON file containing the attributes of the rule that will be updated. You can use `-` to read from stdin.

#### help

The `-h` or `--help` flag displays more information about the `azion update rules-engine` command.

---

## Delete

### Usage

```bash
$ azion delete rules-engine --rule-id <rule-id> --application-id <application-id> --phase <phase>
```

### Required flags

#### rule-id

The `--rule-id` flag specifies the unique identifier for the rule in Rules Engine.

#### application-id

The `--application-id` flag specifies the unique identifier for your edge application.

#### phase

The `--phase` flag specifies the phase of your Rules Engine's rule. It's either `request` or `response`.

### Optional flags

#### help

The `-h` or `--help` flag displays more information about the `azion delete rules-engine` command.

0 comments on commit 4224c36

Please sign in to comment.