Network Security Group

Create Network Security Group

Changed on

Create a Network Security Group for Tenant.

Org must have a Tenant entity. User must have authorization role with TENANT_ADMIN suffix.

post/v2/org/{org}/nico/network-security-group

Request

  • Base URL
    https://nico-rest-api.nico.svc.cluster.local
  • URL
    https://nico-rest-api.nico.svc.cluster.local/v2/org/{org}/nico/network-security-group
  • Auth
    HTTP bearer

Request body

idstring uuid

Optional user-specified UUID for the Network Security Group

namestring required

Name of the Network Security Group

descriptionstring nullable

Description of the Network Security Group

siteIdstring uuid required

ID of the Site

statefulEgressboolean

Egress rules with protocol and destination ports defined but without source ports defined should automatically be made stateful.

labelsLabels

Label keys must not be empty or whitespace-only. Keys and values may contain at most 255 characters and must not contain the Unicode NUL character (U+0000). Empty values are allowed.

Example request

{
  "id": "2a21cf79-ea5e-4d28-b585-2e78948fcefb",
  "name": "Spark VPC Firewall",
  "description": "Security policies for machines in Spark VPC",
  "siteId": "188a8f32-0001-45cf-b243-f62720a22cc4",
  "rules": [
    {
      "name": "allow-http-from-public",
      "direction": "INGRESS",
      "sourcePortRange": "80-81",
      "destinationPortRange": "180-181",
      "protocol": "TCP",
      "action": "PERMIT",
      "priority": 55,
      "sourcePrefix": "0.0.0.0/0",
      "destinationPrefix": "1.1.1.1/0"
    }
  ],
  "labels": {
    "flavor": "coconut"
  }
}

Response

Created

idstring

Unique UUID v4 identifier for the Network Security Group

namestring

Name of the Network Security Group

descriptionstring nullable

Description of the Network Security Group

siteIdstring uuid

ID of the Site

tenantIdstring uuid

ID of the Tenant

status'Pending' | 'Provisioning' | 'Ready' | 'Deleting' | 'Error'

Status values for Network Security Group objects

statefulEgressboolean

StatefulEgress defines whether a Network Security Group's egress rules will be automatically stateful

ruleCountinteger

Number of rules in the Network Security Group

labelsLabels

Label keys must not be empty or whitespace-only. Keys and values may contain at most 255 characters and must not contain the Unicode NUL character (U+0000). Empty values are allowed.

createdstring date-time

Date/time when the Network Security Group was created

updatedstring date-time

Date/time when the Network Security Group was last updated

Example response

{
  "id": "2a21cf79-ea5e-4d28-b585-2e78948fcefb",
  "name": "Spark VPC Firewall",
  "description": "Security policies for machines in Spark VPC",
  "siteId": "56f1a3ed-3653-454f-b861-9136207be660",
  "tenantId": "79595ebe-934f-4f19-bc74-c16aefd0c57a",
  "status": "Pending",
  "statusHistory": [
    {
      "status": "Ready",
      "message": "processed network security group creation request",
      "created": "2025-02-26T18:17:44.862879-05:00",
      "updated": "2025-02-26T18:17:44.862879-05:00"
    }
  ],
  "rules": [
    {
      "name": "allow-http-from-public",
      "direction": "INGRESS",
      "sourcePortRange": "80-81",
      "destinationPortRange": "180-181",
      "protocol": "TCP",
      "action": "PERMIT",
      "priority": 55,
      "sourcePrefix": "0.0.0.0/0",
      "destinationPrefix": "1.1.1.1/0"
    }
  ],
  "labels": {
    "flavor": "coconut"
  },
  "created": "2025-02-26T18:17:44.861317-05:00",
  "updated": "2025-02-26T18:17:44.861317-05:00"
}

Changes

    • info

      removed the nico enum value from the response property for the response status

    • info

      removed the nico enum value from the response property for the response status

    • info

      removed the nico enum value from the response property for the response status

    • info

      removed the nico enum value from the response property for the response status

    • info

      removed the nico enum value from the response property for the response status

    • info

      removed the nico enum value from the response property for the response status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status