# Azion CLI describe

With the `azion describe [resource]` command you can describe:

- [Applications](#applications).
    - [Functions](#functions).
    - [Rules engine](#rules-engine).
    - [Cache settings](#cache-settings).
    - [Workloads](#workloads).
    - [Connectors](#connectors).
    - [Variables](#variables).
    - [Object Storage object](#edge-storage-object).
    - [WAF](#waf).
    - [WAF exceptions](#waf-exceptions).

:::note 
In case one or more required fields aren't informed through the specific flags, an interactive message prompts and asks for the missing information.
:::

---

## Application

#### Usage

```bash
azion describe edge-application --application-id <application_id> [flags]
```

#### Required flags

##### application-id

The `--application-id` flag specifies the unique identifier of the application to display its attributes in detail.

#### Optional flags

##### format

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

##### help

The `--help` flag displays more information about the describe command.

##### application-id

The `--application-id` flag specifies the unique identifier of the application.

##### out

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

:::note
Replace `<application_id>` in the `--application-id` flag with the actual ID of the application you want to describe.
:::

---

## Functions

#### Usage

```bash
azion describe edge-function --function-id <function_id> 
```

#### Required flags

##### function-id

The `--function-id` flag is the unique identifier of the function.

#### Optional flags

##### format

The `--format` flag changes the output format. Options include `json` and other supported formats.

##### out

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

##### with-code

The `--with-code` flag displays the function's code; disabled by default.

##### help

The `--help` option displays more information about the `azion describe edge-function` command.

---

## Rules engine

#### 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 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.

---

## Cache settings

#### Usage

```bash
azion describe cache-setting --application-id 1673635839 --cache-setting-id 107313
```

#### Required flags

##### application-id

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

##### cache-setting-id

The `--cache-setting-id` flag sets the unique identifier for a Cache Settings configuration.

#### Optional flags

##### format

The `--format` option changes the output format. Pass the value `json` to the flag to get the output in JSON format.

##### help

The `--help` option displays more information about the `azion describe cache-setting` command.

##### out

The `--out` option exports the output to the given file path or file name with an extension. Example: `--out "./tmp/test.json"`.

---

## Workloads

#### Description

Displays information about the domain via a given ID to show the application's attributes in detail.

#### Usage

```bash
azion describe domain --domain-id 4312
```

#### Required flags

##### domain-id

The `--domain-id` flag specifies the unique identifier of the domain you want to retrieve detailed information from.

#### Optional flags

##### format

The `--format` option changes the output format. You can pass the value `json` to the flag to get the output in JSON format.

##### out

The `--out` option exports the output to the given file path and filename with the specified extension.

##### help

The `-h` or `--help` option displays more information about the `azion describe domain` command.

#### Examples

```bash
azion describe domain --domain-id 1337 --out "./tmp/test.json"
azion describe domain --domain-id 1337 --format json
```

---

## Connectors

#### Usage

```bash
azion describe origin --application-id <application-id> --origin-key <origin-key> 
```

#### Required flags

##### application-id

The `--application-id` flag sets the unique identifier for an application. It's a mandatory field.

##### origin-key

The `--origin-key` flag sets the unique identifier for an origin. It's a mandatory field.

#### Optional flags

##### format

The `--format` flag changes the output format. Pass the value `json` to the flag to get the output in JSON format.

##### out

The `--out` flag exports the output to the given file path or filename with extension.

#### help

The `-h` or `--help` option displays more information about the `azion describe origin` action.

---

## Variables

#### Usage

```bash
  azion describe variables --variable-id 1673635839
```

#### Required flags

##### variable-id

The `--variable-id` flag gives the UUID for the variable being described.

#### Optional flags

##### out

The `--out` option exports the output of the `describe` command to a given filepath.

##### format

The `--format` option, followed by the value `json`, changes the output format to JSON.

##### help

The `--help` option displays more information about the `azion describe variables` command.

---

## Object Storage object

#### Usage

```bash
azion describe edge-storage objects --bucket-name 'asdf' --object-key 'test.json'
azion describe edge-storage objects --bucket-name 'asdf' --object-key 'test.json' --format json
azion describe edge-storage objects --bucket-name 'asdf' --object-key 'test.json' --out './tmp/test.json'
```

#### Required flags

##### bucket-name

The `--bucket-name` flag specifies the name of the Object Storage bucket that includes the object you want to describe.

##### object-key

The `--object-key` flag specifies the key (name) of the object in the bucket that you want to describe.

#### Optional flags 

##### help

The `-h` or `--help` option displays more detailed information about the `azion describe edge-storage object` command.  

##### format

The `--format` option allows you to specify the format in which the command output is displayed. For example, 'json'.

##### out

The `--out` option lets you specify a path where the output of the command will be stored. For example, './tmp/test.json'.

---

## WAF

Describes a WAF (Web Application Firewall).

#### Usage

```bash
azion describe waf --waf-id <waf-id> [flags]
```

#### Required flags

##### waf-id

The `--waf-id` flag specifies the unique identifier of the WAF.

#### Optional flags

##### format

The `--format` flag changes the output format. Pass `json` to get JSON output.

##### out

The `--out` flag exports the output to the given file path.

##### help

The `--help` flag displays more information about the `azion describe waf` command.

---

## WAF exceptions

Describes a WAF exception.

#### Usage

```bash
azion describe waf-exceptions --exception-id <exception-id> --waf-id <waf-id> [flags]
```

#### Required flags

##### exception-id

The `--exception-id` flag specifies the unique identifier of the WAF exception.

##### waf-id

The `--waf-id` flag specifies the unique identifier of the WAF.

#### Optional flags

##### format

The `--format` flag changes the output format. Pass `json` to get JSON output.

##### out

The `--out` flag exports the output to the given file path.

##### help

The `--help` flag displays more information about the `azion describe waf-exceptions` command.