# Security Group


<style>
  span[class^="pill-"] {
    color: white;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.6em;
    vertical-align: middle;
    margin-right: 12px;
    font-family: sans-serif;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
  }
  span.pill-GET { background-color: #61affe; }
  span.pill-POST { background-color: #49cc90; }
  span.pill-PUT { background-color: #fca130; }
  span.pill-DELETE { background-color: #f93e3e; }
  span.pill-PATCH { background-color: #50e3c2; }
  span[class^="pill-"]:after {
    content: attr(data-label);
    font-size: 0.9rem;
  }
</style>

Security Groups are groups of firewall rules that regulate network traffic to and from your Compute instances.

[Read more](https://community.exoscale.com/documentation/compute/security-groups/)

## <span data-label="POST" class="pill-POST"></span>create-security-group

Create a Security Group

```
POST /security-group
```

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | **yes** | Security Group name<br/><br/>Min length: `1`. Max length: `255`. |
| `description` | string | no | Security Group description<br/><br/>Max length: `255`. |

<details>
<summary>Example</summary>

```json
{
  "description": "string",
  "name": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `create-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.CreateSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.create_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#createSecurityGroup(com.exoscale.sdk.model.CreateSecurityGroupRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api create-security-group`

## <span data-label="GET" class="pill-GET"></span>get-security-group

Retrieve Security Group details

```
GET /security-group/{id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `description` | string | Security Group description<br/><br/>Max length: `255`. |
| `external-sources` | array[string] | Security Group external sources |
| `id` | string | Security Group ID<br/><br/>Must be a valid UUID. |
| `name` | string | Security Group name<br/><br/>Min length: `1`. Max length: `255`. |
| `rules` | array of [Security Group rule](/reference/api/_schemas/security-group-rule/) | Security Group rules |

<details>
<summary>Example output</summary>

```json
{
  "description": "string",
  "external-sources": [
    "string"
  ],
  "id": "string",
  "name": "string",
  "rules": [
    {
      "description": "string",
      "end-port": 0,
      "flow-direction": "ingress",
      "icmp": {
        "code": 0,
        "type": 0
      },
      "id": "string",
      "network": "string",
      "protocol": "tcp",
      "security-group": {
        "id": "string",
        "name": "string",
        "visibility": "private"
      },
      "start-port": 0
    }
  ]
}
```
</details>


SDK reference for `get-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.GetSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.get_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#getSecurityGroup(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api get-security-group`

## <span data-label="DELETE" class="pill-DELETE"></span>delete-security-group

Delete a Security Group

```
DELETE /security-group/{id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `delete-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DeleteSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.delete_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#deleteSecurityGroup(java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api delete-security-group`


---

## Other Operations

## <span data-label="PUT" class="pill-PUT"></span>remove-external-source-from-security-group

Remove an external source from a Security Group

```
PUT /security-group/{id}:remove-source
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `cidr` | string | **yes** | CIDR-formatted network to remove |

<details>
<summary>Example</summary>

```json
{
  "cidr": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `remove-external-source-from-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.RemoveExternalSourceFromSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.remove_external_source_from_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#removeExternalSourceFromSecurityGroup(java.util.UUID,com.exoscale.sdk.model.RemoveExternalSourceFromSecurityGroupRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api remove-external-source-from-security-group`

## <span data-label="PUT" class="pill-PUT"></span>add-external-source-to-security-group

Add an external source as a member of a Security Group

```
PUT /security-group/{id}:add-source
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `cidr` | string | **yes** | CIDR-formatted network to add |

<details>
<summary>Example</summary>

```json
{
  "cidr": "string"
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `add-external-source-to-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.AddExternalSourceToSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.add_external_source_to_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#addExternalSourceToSecurityGroup(java.util.UUID,com.exoscale.sdk.model.AddExternalSourceToSecurityGroupRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api add-external-source-to-security-group`

## <span data-label="PUT" class="pill-PUT"></span>detach-instance-from-security-group

Detach a Compute instance from a Security Group

```
PUT /security-group/{id}:detach
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `instance` | [Instance](/reference/api/_schemas/instance/) | **yes** | Compute instance |

<details>
<summary>Example</summary>

```json
{
  "instance": {
    "anti-affinity-groups": [
      {
        "id": "string"
      }
    ],
    "application-consistent-snapshot-enabled": true,
    "created-at": "2024-01-01T12:00:00Z",
    "deploy-target": {
      "id": "string"
    },
    "disk-encrypted": true,
    "disk-size": 0,
    "elastic-ips": [
      {
        "id": "string"
      }
    ],
    "id": "string",
    "instance-type": {
      "authorized": true,
      "cpus": 0,
      "family": "gpu3",
      "gpus": 0,
      "id": "string",
      "memory": 0,
      "size": "large",
      "zones": [
        "ch-dk-2"
      ]
    },
    "ipv6-address": "string",
    "labels": {},
    "mac-address": "string",
    "manager": {
      "id": "string",
      "type": "sks-nodepool"
    },
    "name": "string",
    "private-networks": [
      {
        "id": "string",
        "mac-address": "string"
      }
    ],
    "public-ip": "string",
    "public-ip-assignment": "inet4",
    "secureboot-enabled": true,
    "security-groups": [
      {
        "id": "string"
      }
    ],
    "snapshots": [
      {
        "id": "string"
      }
    ],
    "ssh-key": {
      "fingerprint": "string",
      "name": "string"
    },
    "ssh-keys": [
      {
        "fingerprint": "string",
        "name": "string"
      }
    ],
    "state": "expunging",
    "template": {
      "application-consistent-snapshot-enabled": true,
      "boot-mode": "legacy",
      "build": "string",
      "checksum": "string",
      "created-at": "2024-01-01T12:00:00Z",
      "default-user": "string",
      "description": "string",
      "family": "string",
      "id": "string",
      "maintainer": "string",
      "name": "string",
      "password-enabled": true,
      "size": 0,
      "ssh-key-enabled": true,
      "url": "string",
      "version": "string",
      "visibility": "private",
      "zones": [
        "ch-dk-2"
      ]
    },
    "tpm-enabled": true,
    "user-data": "string"
  }
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `detach-instance-from-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DetachInstanceFromSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.detach_instance_from_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#detachInstanceFromSecurityGroup(java.util.UUID,com.exoscale.sdk.model.DetachInstanceFromSecurityGroupRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api detach-instance-from-security-group`

## <span data-label="PUT" class="pill-PUT"></span>attach-instance-to-security-group

Attach a Compute instance to a Security Group

```
PUT /security-group/{id}:attach
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `instance` | [Instance](/reference/api/_schemas/instance/) | **yes** | Compute instance |

<details>
<summary>Example</summary>

```json
{
  "instance": {
    "anti-affinity-groups": [
      {
        "id": "string"
      }
    ],
    "application-consistent-snapshot-enabled": true,
    "created-at": "2024-01-01T12:00:00Z",
    "deploy-target": {
      "id": "string"
    },
    "disk-encrypted": true,
    "disk-size": 0,
    "elastic-ips": [
      {
        "id": "string"
      }
    ],
    "id": "string",
    "instance-type": {
      "authorized": true,
      "cpus": 0,
      "family": "gpu3",
      "gpus": 0,
      "id": "string",
      "memory": 0,
      "size": "large",
      "zones": [
        "ch-dk-2"
      ]
    },
    "ipv6-address": "string",
    "labels": {},
    "mac-address": "string",
    "manager": {
      "id": "string",
      "type": "sks-nodepool"
    },
    "name": "string",
    "private-networks": [
      {
        "id": "string",
        "mac-address": "string"
      }
    ],
    "public-ip": "string",
    "public-ip-assignment": "inet4",
    "secureboot-enabled": true,
    "security-groups": [
      {
        "id": "string"
      }
    ],
    "snapshots": [
      {
        "id": "string"
      }
    ],
    "ssh-key": {
      "fingerprint": "string",
      "name": "string"
    },
    "ssh-keys": [
      {
        "fingerprint": "string",
        "name": "string"
      }
    ],
    "state": "expunging",
    "template": {
      "application-consistent-snapshot-enabled": true,
      "boot-mode": "legacy",
      "build": "string",
      "checksum": "string",
      "created-at": "2024-01-01T12:00:00Z",
      "default-user": "string",
      "description": "string",
      "family": "string",
      "id": "string",
      "maintainer": "string",
      "name": "string",
      "password-enabled": true,
      "size": 0,
      "ssh-key-enabled": true,
      "url": "string",
      "version": "string",
      "visibility": "private",
      "zones": [
        "ch-dk-2"
      ]
    },
    "tpm-enabled": true,
    "user-data": "string"
  }
}
```
</details>


### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `attach-instance-to-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.AttachInstanceToSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.attach_instance_to_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#attachInstanceToSecurityGroup(java.util.UUID,com.exoscale.sdk.model.AttachInstanceToSecurityGroupRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api attach-instance-to-security-group`

## <span data-label="DELETE" class="pill-DELETE"></span>delete-rule-from-security-group

Delete a Security Group rule

```
DELETE /security-group/{id}/rules/{rule-id}
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |
| `rule-id` | `path` | Must be a valid UUID. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `delete-rule-from-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.DeleteRuleFromSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.delete_rule_from_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#deleteRuleFromSecurityGroup(java.util.UUID,java.util.UUID))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api delete-rule-from-security-group`

## <span data-label="POST" class="pill-POST"></span>add-rule-to-security-group

Create a Security Group rule

```
POST /security-group/{id}/rules
```

### Path parameters

| Name | In | Description |
| --- | --- | --- |
| `id` | `path` | Must be a valid UUID. |

### Request body

Content-Type: `application/json`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `flow-direction` | string | **yes** | Network flow direction to match<br/><br/>Allowed values: `ingress`, `egress`. |
| `protocol` | string | **yes** | Network protocol<br/><br/>Allowed values: `tcp`, `esp`, `icmp`, `udp`, `gre`, `ah`, `ipip`, `icmpv6`. |
| `description` | string | no | Security Group rule description<br/><br/>Max length: `255`. |
| `end-port` | integer | no | End port of the range<br/><br/>Min: `1`. Max: `65535`. |
| `icmp` | [ICMP](#icmp) | no | ICMP details (default: -1 (ANY)) |
| `network` | string | no | CIDR-formatted network allowed |
| `security-group` | [Security Group](/reference/api/_schemas/security-group-resource/) | no | Security Group allowed |
| `start-port` | integer | no | Start port of the range<br/><br/>Min: `1`. Max: `65535`. |

<details>
<summary>Example</summary>

```json
{
  "description": "string",
  "end-port": 0,
  "flow-direction": "ingress",
  "icmp": {
    "code": 0,
    "type": 0
  },
  "network": "string",
  "protocol": "tcp",
  "security-group": {
    "id": "string",
    "name": "string",
    "visibility": "private"
  },
  "start-port": 0
}
```
</details>


### ICMP {#icmp}

ICMP details (default: -1 (ANY))

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | integer | no | Min: `-1`. Max: `254`. |
| `type` | integer | no | Min: `-1`. Max: `254`. |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `id` | string | Operation ID<br/><br/>Must be a valid UUID. |
| `message` | string | Operation message |
| `reason` | string | Operation failure reason<br/><br/>Allowed values: `incorrect`, `unknown`, `unavailable`, `forbidden`, `busy`, `fault`, `partial`, `not-found`, `interrupted`, `unsupported`, `conflict`. |
| `reference` | [Reference](/reference/api/_schemas/operation/#reference) | Related resource reference |
| `state` | string | Operation status<br/><br/>Allowed values: `failure`, `pending`, `success`, `timeout`. |

<details>
<summary>Example output</summary>

```json
{
  "id": "string",
  "message": "string",
  "reason": "incorrect",
  "reference": {
    "command": "string",
    "id": "string",
    "link": "string"
  },
  "state": "failure"
}
```
</details>


SDK reference for `add-rule-to-security-group`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.AddRuleToSecurityGroup) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.add_rule_to_security_group) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#addRuleToSecurityGroup(java.util.UUID,com.exoscale.sdk.model.AddRuleToSecurityGroupRequest))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api add-rule-to-security-group`

## <span data-label="GET" class="pill-GET"></span>list-security-groups

List Security Groups.

```
GET /security-group
```

Lists security groups. When visibility is set to public, lists public security groups.
Public security groups are objects maintained by Exoscale which contain source addresses for
relevant services hosted by Exoscale. They can be used a source in ingress rules and as a destination
in egress rules.

### Query parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `visibility` | `query` | no |  |

### Responses

Status: `200` - 200

Content-Type: `application/json`

| Property | Type | Description |
| --- | --- | --- |
| `security-groups` | array of [Security Group](/reference/api/_schemas/security-group/) |  |

<details>
<summary>Example output</summary>

```json
{
  "security-groups": [
    {
      "description": "string",
      "external-sources": [
        "string"
      ],
      "id": "string",
      "name": "string",
      "rules": [
        {
          "description": "string",
          "end-port": 0,
          "flow-direction": "ingress",
          "icmp": {
            "code": null,
            "type": null
          },
          "id": "string",
          "network": "string",
          "protocol": "tcp",
          "security-group": {
            "id": null,
            "name": null,
            "visibility": null
          },
          "start-port": 0
        }
      ]
    }
  ]
}
```
</details>


SDK reference for `list-security-groups`: [golang](https://pkg.go.dev/github.com/exoscale/egoscale/v3#Client.ListSecurityGroups) | [Python](https://exoscale.github.io/python-exoscale/v2.html#exoscale.api.v2.Client.list_security_groups) | [Java](https://exoscale.github.io/exoscale-sdk-java/com/exoscale/sdk/api/ExoscaleApi.html#listSecurityGroups(java.lang.String))

[CLI](https://community.exoscale.com/tools/command-line-interface/): `exo api list-security-groups`


