# Azion CLI connector

The Azion CLI `connector` commands create, list, describe, update, and delete [connectors](/en/documentation/platform/connectors/), the objects that hold where and how an application reaches an origin, the server that holds your content. A connector is created and changed from a JSON file, never from one flag per setting. The options every command accepts, such as `--format`, `--out`, and `-y`, are on [Global options](/en/documentation/devtools/cli/globals/).

---

## Create

`azion create connector` creates a connector from a JSON file and the type you pass:

```bash
azion create connector [flags]
```

| Flag     | Short | Type   | Default | Description                                                                                                                                                      |
| -------- | ----- | ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--file` | —     | string | —       | **Required**. Path to a JSON file with the attributes of the connector. Use `-` to read the JSON from standard input. Without it, the command asks for the path. |
| `--type` | —     | string | —       | **Required**. Type of the connector: `http`, `storage`, or `live_ingest`. Without it, the command asks for the type, even when the file carries `"type"`.        |

The CLI sends any `--type` value to the API without checking it. A value outside the three, such as `ftp`, fails with a server error that does not name the type:

```text
Error: Failed to create Connector: The server could not process the request because an internal and unexpected problem occurred. Wait a few seconds and try again. For more information run the command again using the '--debug' flag. If the problem persists, contact Azion’s support. Check your settings and try again. If the error persists, contact Azion support
```

This file, `my-connector.json`, describes a connector of type `http` named `my-connector` that sends requests to `httpbin.org`:

```json
{
  "name": "my-connector",
  "active": true,
  "type": "http",
  "attributes": {
    "addresses": [
      {
        "address": "httpbin.org"
      }
    ],
    "connection_options": {
      "dns_resolution": "both",
      "transport_policy": "preserve",
      "host": "${host}"
    }
  }
}
```

This command creates the connector from the file:

```bash
azion create connector --type http --file my-connector.json
```

The command prints the ID of the connector:

```text
Created Connector with ID 123475
```

---

## List

`azion list connector` prints the connectors of your account, 50 on each page by default:

```bash
azion list connector [flags]
```

| Flag          | Short | Type   | Default | Description                                                                                           |
| ------------- | ----- | ------ | ------- | ----------------------------------------------------------------------------------------------------- |
| `--details`   | —     | —      | —       | Adds the `LAST EDITOR` and `LAST MODIFIED` columns to the `ID`, `NAME`, `TYPE`, and `ACTIVE` columns. |
| `--filter`    | —     | string | —       | Name to filter the list by.                                                                           |
| `--order-by`  | —     | string | —       | Field to sort the list by, such as `id` or `name`.                                                    |
| `--page`      | —     | int    | `1`     | Number of the page to return.                                                                         |
| `--page-size` | —     | int    | `50`    | Number of connectors on each page.                                                                    |

This command returns the first page of a list split into pages of two connectors:

```bash
azion list connector --page 1 --page-size 2
```

The command prints one row per connector, with its type:

```text
ID     NAME      TYPE     ACTIVE
12367  my-blog   storage  true
12368  my-store  storage  true
```

---

## Describe

`azion describe connector` prints the settings of one connector:

```bash
azion describe connector [flags]
```

| Flag             | Short | Type | Default | Description                      |
| ---------------- | ----- | ---- | ------- | -------------------------------- |
| `--connector-id` | —     | int  | —       | ID of the connector to describe. |

This command describes the connector with ID `123475`:

```bash
azion describe connector --connector-id 123475
```

The command prints the ID, the name, the last change, the state, and the type of the connector. The `Language` row holds the type:

```text
ID:            123475
Name:          my-connector
Last Editor:   you@example.com
Modified at:   "2026-01-01T12:00:00.847427Z"
Active:        true
Language:      http
```

With `--format json`, the command prints the full object: `active`, `attributes`, `created_at`, `id`, `is_versioned`, `last_editor`, `last_modified`, `name`, `product_version`, `type`, `version`, `version_id`, and `version_state`. On a connector of type `http`, `attributes` holds `addresses`, `connection_options`, and `modules`.

---

## Update

`azion update connector` changes the name, the state, or the settings of a connector. The command has no flag per setting, so the changes come from a JSON file:

```bash
azion update connector [flags]
```

| Flag             | Short | Type   | Default | Description                                                                                                                                               |
| ---------------- | ----- | ------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--connector-id` | —     | int    | —       | ID of the connector to update.                                                                                                                            |
| `--file`         | —     | string | —       | Path to a JSON file with the attributes of the connector. Use `-` to read the JSON from standard input.                                                   |
| `--type`         | —     | string | —       | **Required**. Type of the connector: `http`, `storage`, or `live_ingest`. Without it, the command asks for the type, even when the file carries `"type"`. |

The file carries the whole connector, as on create. A file with only the fields to change, such as `name` and `active`, is refused before any request is sent:

```text
Error: Failed to decode the given 'json' file. Verify if the file format is JSON or fix its content according to the JSON format specification at https://www.json.org/json-en.html
```

This file, `my-connector-update.json`, renames the connector to `my-connector-renamed` and repeats every other attribute it was created with:

```json
{
  "name": "my-connector-renamed",
  "active": true,
  "type": "http",
  "attributes": {
    "addresses": [
      {
        "address": "httpbin.org"
      }
    ],
    "connection_options": {
      "dns_resolution": "both",
      "transport_policy": "preserve",
      "host": "${host}"
    }
  }
}
```

This command applies the file to the connector with ID `123475`:

```bash
azion update connector --connector-id 123475 --type http --file my-connector-update.json
```

The command prints the ID of the updated connector:

```text
Updated Connector with ID 123475
```

---

## Delete

`azion delete connector` deletes a connector:

```bash
azion delete connector [flags]
```

| Flag             | Short | Type | Default | Description                    |
| ---------------- | ----- | ---- | ------- | ------------------------------ |
| `--connector-id` | —     | int  | —       | ID of the connector to delete. |

This command deletes the connector with ID `123475`:

```bash
azion delete connector --connector-id 123475
```

The command confirms the deletion:

```text
Connector 123475 was successfully deleted
```

---

## Use a JSON file

`azion create connector` and `azion update connector` read the connector from a JSON file with `--file`, and both also take `--type` on the command line. The file holds `name`, `active`, `type`, and `attributes`. A connector of type `http` carries `addresses` and `connection_options` in `attributes`; the types `storage` and `live_ingest` carry other attributes.

The API fills every field the file leaves out with its default. A file with one `address` and three connection options produces this connector, as `azion describe connector --connector-id 123475 --format json` prints it:

```json
{
 "active": true,
 "attributes": {
  "addresses": [
   {
    "active": true,
    "address": "httpbin.org",
    "http_port": 80,
    "https_port": 443,
    "modules": null
   }
  ],
  "connection_options": {
   "dns_resolution": "both",
   "following_redirect": false,
   "host": "${host}",
   "http_version_policy": "http1_1",
   "path_prefix": "",
   "real_ip_header": "X-Real-IP",
   "real_port_header": "X-Real-PORT",
   "transport_policy": "preserve"
  },
  "modules": {
   "load_balancer": {
    "config": null,
    "enabled": false
   },
   "origin_shield": {
    "config": null,
    "enabled": false
   }
  }
 },
 "created_at": "2026-01-01T12:00:00.847444Z",
 "id": 123475,
 "is_versioned": false,
 "last_editor": "you@example.com",
 "last_modified": "2026-01-01T12:00:00.847427Z",
 "name": "my-connector",
 "product_version": "1.0",
 "type": "http",
 "version": null,
 "version_id": null,
 "version_state": null
}
```

Each address gets `http_port` `80` and `https_port` `443`, and [Load Balancer](/en/documentation/platform/connectors/settings/#load-balancer) and [Origin Shield](/en/documentation/platform/connectors/settings/#origin-shield) stay off. For every field of each type, with its range and its default, refer to [Connector settings](/en/documentation/platform/connectors/settings/).

---

## Related resources

- [Global options](/en/documentation/devtools/cli/globals.md): The options every command accepts, such as `--format`, `--out`, and `-y`.
- [Connectors](/en/documentation/platform/connectors.md): What a connector holds and how an application sends requests to it.
- [Azion CLI application](/en/documentation/devtools/cli/resources/application.md): The commands that create and manage the applications whose rules use a connector.
- [Azion CLI storage](/en/documentation/devtools/cli/resources/storage.md): The commands that create the bucket a connector of type `storage` reads from.
