Security Group

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

Read more

create-security-group

Create a Security Group

POST /security-group

Request body

  • application/json
    • name (required) (string): Security Group name
    • description (string): Security Group description

Responses

  • 200: 200
    • application/json
      • id (string): Operation ID
      • reason (string): Operation failure reason
      • reference (object): Related resource reference - schema details
      • message (string): Operation message
      • state (string): Operation status

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

  • id in path (required)

Responses

  • 200: 200
    • application/json
      • id (string): Security Group ID
      • name (string): Security Group name
      • description (string): Security Group description
      • external-sources (array[string]): Security Group external sources
      • rules (array[object]): Security Group rules - schema details

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

  • id in path (required)

Responses

  • 200: 200
    • application/json
      • id (string): Operation ID
      • reason (string): Operation failure reason
      • reference (object): Related resource reference - schema details
      • message (string): Operation message
      • state (string): Operation status

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-source

Path parameters

  • id in path (required)

Request body

  • application/json
    • cidr (required) (string): CIDR-formatted network to remove

Responses

  • 200: 200
    • application/json
      • id (string): Operation ID
      • reason (string): Operation failure reason
      • reference (object): Related resource reference - schema details
      • message (string): Operation message
      • state (string): Operation status

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-source

Path parameters

  • id in path (required)

Request body

  • application/json
    • cidr (required) (string): CIDR-formatted network to add

Responses

  • 200: 200
    • application/json
      • id (string): Operation ID
      • reason (string): Operation failure reason
      • reference (object): Related resource reference - schema details
      • message (string): Operation message
      • state (string): Operation status

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}:detach

Path parameters

  • id in path (required)

Request body

  • application/json

Responses

  • 200: 200
    • application/json
      • id (string): Operation ID
      • reason (string): Operation failure reason
      • reference (object): Related resource reference - schema details
      • message (string): Operation message
      • state (string): Operation status

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}:attach

Path parameters

  • id in path (required)

Request body

  • application/json

Responses

  • 200: 200
    • application/json
      • id (string): Operation ID
      • reason (string): Operation failure reason
      • reference (object): Related resource reference - schema details
      • message (string): Operation message
      • state (string): Operation status

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

  • id in path (required)
  • rule-id in path (required)

Responses

  • 200: 200
    • application/json
      • id (string): Operation ID
      • reason (string): Operation failure reason
      • reference (object): Related resource reference - schema details
      • message (string): Operation message
      • state (string): Operation status

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}/rules

Path parameters

  • id in path (required)

Request body

  • application/json
    • flow-direction (required) (string): Network flow direction to match
    • description (string): Security Group rule description
    • network (string): CIDR-formatted network allowed
    • security-group (object): Security Group - schema details
    • protocol (required) (string): Network protocol
    • icmp (object): ICMP details (default: -1 (ANY)) - schema details
    • start-port (integer): Start port of the range
    • end-port (integer): End port of the range

Responses

  • 200: 200
    • application/json
      • id (string): Operation ID
      • reason (string): Operation failure reason
      • reference (object): Related resource reference - schema details
      • message (string): Operation message
      • state (string): Operation status

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

  • visibility in query (optional)

Responses

  • 200: 200

SDK reference for list-security-groups: golang | Python | Java

CLI: exo api list-security-groups

Last updated on