Subnetworks

Create subnetwork

This method creates a subnetwork. To create a subnetwork, consider the following parameters:

  1. Select a data center using the /v1/data-centers endpoint. The data center determines the provider and location of the subnetwork.
  2. Specify the IP address range (optional). Subnetwork prefix values can have exceptions depending on that provider and must be in ranges: 10.0.0.0 - 10.255.255.255, 172.16.0.0 - 172.31.255.255, 192.168.0.0 - 192.168.255.255.

Specific conditions are depending on the provider:

  • GCP: 2 first and 2 last addresses are reserved by the provider. Notice that VMs in different GCP subnetworks can be connected to each other.
  • Azure: 4 first and the last ones are reserved by the provider.
  • AWS: 3 first and the last one are reserved by the provider.
  1. Specify the network size (required). Network size must be: for DigitalOcean /28-/16, for Gcore /24-/16, for Azure /29 - /2, for AWS /28 - /16
post/v1/subnetworks

Request

  • Base URL
    https://api.emma.ms/external
  • Auth
    HTTP bearer

Request body

namestring

Subnetwork name

dataCenterIdstring required

ID of the cloud provider's data center

subnetworkPrefixstring

The prefix for the subnetwork IP address range

subnetworkSizeinteger required

The net mask size for the subnetwork

Example request

{
  "name": "subnetwork-name",
  "dataCenterId": "gcore-frankfurt",
  "subnetworkPrefix": "192.168.0.0",
  "subnetworkSize": 24
}

Response

Successful operation

idstring

Subnetwork id

namestring

Subnetwork name

dataCenterIdstring

ID of the cloud provider's data center

subnetworkPrefixstring

The prefix for the subnetwork IP address range

subnetworkSizeinteger

The net mask size for the subnetwork

statusstring

Subnetwork status

Example response

{
  "id": "d6ffb3db-4940-4979-94f3-68b11a018d98",
  "name": "default",
  "dataCenterId": "gcore-frankfurt",
  "subnetworkPrefix": "192.168.0.0",
  "subnetworkSize": 24,
  "resources": [
    {
      "id": 22,
      "resourceType": "vm"
    }
  ],
  "status": "active"
}

Changes

No recorded changes to this operation across all 1 revision of this API.