# Azion CLI delete

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

- [Applications](#applications).
    - [Functions](#functions).
    - [Rules engine](#rules-engine).
    - [Cache settings](#cache-settings).
    - [Workloads](#workloads).
    - [Connectors](#Connectors).
    - [Variables](#variables).
    - [Personal tokens](#personal-tokens).
    - [Object Storage bucket](#object-storage-object).
    - [Object Storage object](#object-storage-object).
    - [WAF](#waf).
    - [WAF exceptions](#waf-exceptions).
- [Profile](#profile).

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

---

## Applications

#### Usage

```bash
azion delete edge-application --application-id 1234
```

#### Required flags

##### application-id

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

##### cascade

The `--cascade` deletes all resources created through the 'azion deploy' command (default true).

#### Optional flags

##### help

The `--help` option displays more information about the `azion delete edge-application` command.

---

## Functions

#### Usage

```bash
azion delete edge-function --function-id <function-id>
```

#### Required flags

##### function-id

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

#### Optional flags

##### help

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

---

## Rules engine

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

---

## Cache settings

#### Usage

```bash
azion delete cache-setting --application-id 1673635839 --cache-settings-id 107313
```

#### Required flags

##### application-id

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

##### cache-settings-id

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

#### Optional flags

##### help

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

---

## Workloads

#### Description

Removes a domain from the domains library based on a given ID.

#### Usage

```bash
azion delete domain --domain-id 1234
```

#### Required flags

##### domain-id

The `--domain-id` flag specifies the unique identifier of the domain that you want to delete.

#### Optional flags

##### help

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

#### Example

```bash
azion delete domain --domain-id 1234
```

---

## Connectors

#### Usage

```bash
azion delete 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 required field.

##### origin-key

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

#### Optional flags

#### help

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

---


## Variables

#### Usage

```bash
  azion delete variables --variable-id 7a187044-4a00-4a4a-93ed-d230900423221f3
```

#### Required flags

##### variable-id

The `--variable-id` flag provides the UUID for the environment variable being deleted.

#### Optional flags

##### help

The `--help` option displays more information about the `delete` command.

---

## Personal tokens

#### Usage

```sh
azion delete personal-token --id xxxxxx-xxxxx-xxxx-xxxxx-xxxx
```

#### Required flags 

##### id

The `--id` option informs the unique identifier of the personal token being deleted.

#### Optional flags

##### help

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

---


## Object Storage bucket

#### Usage

```bash
azion delete edge-storage bucket --name 'bucket-name'
azion delete edge-storage bucket --help
```

#### Required flags

##### bucket-name

The `--bucket-name` flag specifies the name of the Object Storage bucket you want to delete.

#### Optional flags 

##### help

The `-h` or `--help` option displays more information about the `azion delete edge-storage bucket` command.

---

## Object Storage object

#### Usage

```bash
azion delete edge-storage object --bucket-name 'bucket-name'
azion delete edge-storage object --help
```

#### Required flags

##### bucket-name

The `--bucket-name` flag specifies the name of the Object Storage bucket where the object you want to delete is stored.

##### object-key

The `--object-key` flag specifies the key of the object in the Object Storage bucket that you want to delete.

#### Optional flags 

##### help

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

---

## WAF

Deletes a WAF (Web Application Firewall).

#### Usage

```bash
azion delete waf --waf-id <waf-id>
```

#### Required flags

##### waf-id

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

#### Optional flags

##### help

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

---

## WAF exceptions

Deletes a WAF exception.

#### Usage

```bash
azion delete waf-exceptions --exception-id <exception-id> --waf-id <waf-id>
```

#### Required flags

##### exception-id

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

##### waf-id

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

#### Optional flags

##### help

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

---

## Profile

Deletes a profile and all its associated data from your local CLI configuration.

#### Usage

```bash
azion delete profile --name "my-profile"
azion delete profile
```

#### Required flags

##### name

The `--name` flag specifies the name of the profile you want to delete. If not provided, an interactive prompt displays all available profiles for you to select from.

:::warning
You can't delete the `default` profile. If you attempt to delete it, the CLI returns an error message.
:::

#### Optional flags

##### help

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