Security Group
Security Groups are groups of firewall rules that regulate network traffic to and from your Compute instances.
create-security-group
Create a Security Group
POST /security-groupRequest body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
name | string | yes | Security Group name |
description | string | no | Security Group description |
Example
{
"description": "string",
"name": "string"
}Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation status Allowed values: failure, pending, success, timeout. |
Example output
{
"id": "string",
"message": "string",
"reason": "incorrect",
"reference": {
"command": "string",
"id": "string",
"link": "string"
},
"state": "failure"
}SDK reference for create-security-group: golang | Python | Java
CLI: exo api create-security-group
get-security-group
Retrieve Security Group details
GET /security-group/{id}Path parameters
| Name | In | Description |
|---|---|---|
id | path |
Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
description | string | Security Group description |
external-sources | array[string] | Security Group external sources |
id | string | Security Group ID |
name | string | Security Group name |
rules | array[object] | Security Group rules schema details |
Example output
{
"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
}
]
}SDK reference for get-security-group: golang | Python | Java
CLI: exo api get-security-group
delete-security-group
Delete a Security Group
DELETE /security-group/{id}Path parameters
| Name | In | Description |
|---|---|---|
id | path |
Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation status Allowed values: failure, pending, success, timeout. |
Example output
{
"id": "string",
"message": "string",
"reason": "incorrect",
"reference": {
"command": "string",
"id": "string",
"link": "string"
},
"state": "failure"
}SDK reference for delete-security-group: golang | Python | Java
CLI: exo api delete-security-group
Other Operations
remove-external-source-from-security-group
Remove an external source from a Security Group
PUT /security-group/{id}:remove-sourcePath parameters
| Name | In | Description |
|---|---|---|
id | path |
Request body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
cidr | string | yes | CIDR-formatted network to remove |
Example
{
"cidr": "string"
}Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation status Allowed values: failure, pending, success, timeout. |
Example output
{
"id": "string",
"message": "string",
"reason": "incorrect",
"reference": {
"command": "string",
"id": "string",
"link": "string"
},
"state": "failure"
}SDK reference for remove-external-source-from-security-group: golang | Python | Java
CLI: exo api remove-external-source-from-security-group
add-external-source-to-security-group
Add an external source as a member of a Security Group
PUT /security-group/{id}:add-sourcePath parameters
| Name | In | Description |
|---|---|---|
id | path |
Request body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
cidr | string | yes | CIDR-formatted network to add |
Example
{
"cidr": "string"
}Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation status Allowed values: failure, pending, success, timeout. |
Example output
{
"id": "string",
"message": "string",
"reason": "incorrect",
"reference": {
"command": "string",
"id": "string",
"link": "string"
},
"state": "failure"
}SDK reference for add-external-source-to-security-group: golang | Python | Java
CLI: exo api add-external-source-to-security-group
detach-instance-from-security-group
Detach a Compute instance from a Security Group
PUT /security-group/{id}:detachPath parameters
| Name | In | Description |
|---|---|---|
id | path |
Request body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
instance | object | yes | Instance schema details |
Example
{
"instance": {
"anti-affinity-groups": [
{
"description": "string",
"id": "string",
"instances": [
{
"anti-affinity-groups": null,
"application-consistent-snapshot-enabled": null,
"created-at": null,
"deploy-target": null,
"disk-size": null,
"elastic-ips": null,
"id": null,
"instance-type": null,
"ipv6-address": null,
"labels": null,
"mac-address": null,
"manager": null,
"name": null,
"private-networks": null,
"public-ip": null,
"public-ip-assignment": null,
"secureboot-enabled": null,
"security-groups": null,
"snapshots": null,
"ssh-key": null,
"ssh-keys": null,
"state": null,
"template": null,
"tpm-enabled": null,
"user-data": null
}
],
"name": "string"
}
],
"application-consistent-snapshot-enabled": true,
"created-at": "2024-01-01T12:00:00Z",
"deploy-target": {
"description": "string",
"id": "string",
"name": "string",
"type": "edge"
},
"disk-size": 0,
"elastic-ips": [
{
"addressfamily": "inet4",
"cidr": "string",
"description": "string",
"healthcheck": {
"interval": 0,
"mode": "tcp",
"port": 0,
"strikes-fail": 0,
"strikes-ok": 0,
"timeout": 0,
"tls-skip-verify": true,
"tls-sni": "string",
"uri": "string"
},
"id": "string",
"ip": "string",
"labels": {}
}
],
"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": [
{
"description": "string",
"external-sources": [
"string"
],
"id": "string",
"name": "string",
"rules": [
{
"description": null,
"end-port": null,
"flow-direction": null,
"icmp": null,
"id": null,
"network": null,
"protocol": null,
"security-group": null,
"start-port": null
}
]
}
],
"snapshots": [
{
"application-consistent": true,
"created-at": "2024-01-01T12:00:00Z",
"export": {
"md5sum": "string",
"presigned-url": "string"
},
"id": "string",
"instance": {
"anti-affinity-groups": [
null
],
"application-consistent-snapshot-enabled": true,
"created-at": "2024-01-01T12:00:00Z",
"deploy-target": {
"description": null,
"id": null,
"name": null,
"type": null
},
"disk-size": 0,
"elastic-ips": [
null
],
"id": "string",
"instance-type": {
"authorized": null,
"cpus": null,
"family": null,
"gpus": null,
"id": null,
"memory": null,
"size": null,
"zones": null
},
"ipv6-address": "string",
"labels": {},
"mac-address": "string",
"manager": {
"id": null,
"type": null
},
"name": "string",
"private-networks": [
null
],
"public-ip": "string",
"public-ip-assignment": "inet4",
"secureboot-enabled": true,
"security-groups": [
null
],
"snapshots": [
null
],
"ssh-key": {
"fingerprint": null,
"name": null
},
"ssh-keys": [
null
],
"state": "expunging",
"template": {
"application-consistent-snapshot-enabled": null,
"boot-mode": null,
"build": null,
"checksum": null,
"created-at": null,
"default-user": null,
"description": null,
"family": null,
"id": null,
"maintainer": null,
"name": null,
"password-enabled": null,
"size": null,
"ssh-key-enabled": null,
"url": null,
"version": null,
"visibility": null,
"zones": null
},
"tpm-enabled": true,
"user-data": "string"
},
"name": "string",
"size": 0,
"state": "snapshotting"
}
],
"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"
}
}Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation status Allowed values: failure, pending, success, timeout. |
Example output
{
"id": "string",
"message": "string",
"reason": "incorrect",
"reference": {
"command": "string",
"id": "string",
"link": "string"
},
"state": "failure"
}SDK reference for detach-instance-from-security-group: golang | Python | Java
CLI: exo api detach-instance-from-security-group
attach-instance-to-security-group
Attach a Compute instance to a Security Group
PUT /security-group/{id}:attachPath parameters
| Name | In | Description |
|---|---|---|
id | path |
Request body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
instance | object | yes | Instance schema details |
Example
{
"instance": {
"anti-affinity-groups": [
{
"description": "string",
"id": "string",
"instances": [
{
"anti-affinity-groups": null,
"application-consistent-snapshot-enabled": null,
"created-at": null,
"deploy-target": null,
"disk-size": null,
"elastic-ips": null,
"id": null,
"instance-type": null,
"ipv6-address": null,
"labels": null,
"mac-address": null,
"manager": null,
"name": null,
"private-networks": null,
"public-ip": null,
"public-ip-assignment": null,
"secureboot-enabled": null,
"security-groups": null,
"snapshots": null,
"ssh-key": null,
"ssh-keys": null,
"state": null,
"template": null,
"tpm-enabled": null,
"user-data": null
}
],
"name": "string"
}
],
"application-consistent-snapshot-enabled": true,
"created-at": "2024-01-01T12:00:00Z",
"deploy-target": {
"description": "string",
"id": "string",
"name": "string",
"type": "edge"
},
"disk-size": 0,
"elastic-ips": [
{
"addressfamily": "inet4",
"cidr": "string",
"description": "string",
"healthcheck": {
"interval": 0,
"mode": "tcp",
"port": 0,
"strikes-fail": 0,
"strikes-ok": 0,
"timeout": 0,
"tls-skip-verify": true,
"tls-sni": "string",
"uri": "string"
},
"id": "string",
"ip": "string",
"labels": {}
}
],
"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": [
{
"description": "string",
"external-sources": [
"string"
],
"id": "string",
"name": "string",
"rules": [
{
"description": null,
"end-port": null,
"flow-direction": null,
"icmp": null,
"id": null,
"network": null,
"protocol": null,
"security-group": null,
"start-port": null
}
]
}
],
"snapshots": [
{
"application-consistent": true,
"created-at": "2024-01-01T12:00:00Z",
"export": {
"md5sum": "string",
"presigned-url": "string"
},
"id": "string",
"instance": {
"anti-affinity-groups": [
null
],
"application-consistent-snapshot-enabled": true,
"created-at": "2024-01-01T12:00:00Z",
"deploy-target": {
"description": null,
"id": null,
"name": null,
"type": null
},
"disk-size": 0,
"elastic-ips": [
null
],
"id": "string",
"instance-type": {
"authorized": null,
"cpus": null,
"family": null,
"gpus": null,
"id": null,
"memory": null,
"size": null,
"zones": null
},
"ipv6-address": "string",
"labels": {},
"mac-address": "string",
"manager": {
"id": null,
"type": null
},
"name": "string",
"private-networks": [
null
],
"public-ip": "string",
"public-ip-assignment": "inet4",
"secureboot-enabled": true,
"security-groups": [
null
],
"snapshots": [
null
],
"ssh-key": {
"fingerprint": null,
"name": null
},
"ssh-keys": [
null
],
"state": "expunging",
"template": {
"application-consistent-snapshot-enabled": null,
"boot-mode": null,
"build": null,
"checksum": null,
"created-at": null,
"default-user": null,
"description": null,
"family": null,
"id": null,
"maintainer": null,
"name": null,
"password-enabled": null,
"size": null,
"ssh-key-enabled": null,
"url": null,
"version": null,
"visibility": null,
"zones": null
},
"tpm-enabled": true,
"user-data": "string"
},
"name": "string",
"size": 0,
"state": "snapshotting"
}
],
"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"
}
}Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation status Allowed values: failure, pending, success, timeout. |
Example output
{
"id": "string",
"message": "string",
"reason": "incorrect",
"reference": {
"command": "string",
"id": "string",
"link": "string"
},
"state": "failure"
}SDK reference for attach-instance-to-security-group: golang | Python | Java
CLI: exo api attach-instance-to-security-group
delete-rule-from-security-group
Delete a Security Group rule
DELETE /security-group/{id}/rules/{rule-id}Path parameters
| Name | In | Description |
|---|---|---|
id | path | |
rule-id | path |
Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation status Allowed values: failure, pending, success, timeout. |
Example output
{
"id": "string",
"message": "string",
"reason": "incorrect",
"reference": {
"command": "string",
"id": "string",
"link": "string"
},
"state": "failure"
}SDK reference for delete-rule-from-security-group: golang | Python | Java
CLI: exo api delete-rule-from-security-group
add-rule-to-security-group
Create a Security Group rule
POST /security-group/{id}/rulesPath parameters
| Name | In | Description |
|---|---|---|
id | path |
Request body
Content-Type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
flow-direction | string | yes | Network flow direction to match Allowed values: ingress, egress. |
protocol | string | yes | Network protocol Allowed values: tcp, esp, icmp, udp, gre, ah, ipip, icmpv6. |
description | string | no | Security Group rule description |
end-port | integer | no | End port of the range |
icmp | object | no | ICMP details (default: -1 (ANY)) schema details |
network | string | no | CIDR-formatted network allowed |
security-group | object | no | Security Group schema details |
start-port | integer | no | Start port of the range |
Example
{
"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
}Responses
Status: 200 - 200
Content-Type: application/json
| Property | Type | Description |
|---|---|---|
id | string | Operation ID |
message | string | Operation message |
reason | string | Operation failure reason Allowed values: incorrect, unknown, unavailable, forbidden, busy, fault, partial, not-found, interrupted, unsupported, conflict. |
reference | object | Related resource reference schema details |
state | string | Operation status Allowed values: failure, pending, success, timeout. |
Example output
{
"id": "string",
"message": "string",
"reason": "incorrect",
"reference": {
"command": "string",
"id": "string",
"link": "string"
},
"state": "failure"
}SDK reference for add-rule-to-security-group: golang | Python | Java
CLI: exo api add-rule-to-security-group
list-security-groups
List Security Groups.
GET /security-groupLists 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[object] | schema details |
Example output
{
"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
}
]
}
]
}SDK reference for list-security-groups: golang | Python | Java
CLI: exo api list-security-groups