Subnetworks
Create subnetwork
This method creates a subnetwork. To create a subnetwork, consider the following parameters:
- Select a data center using the /v1/data-centers endpoint. The data center determines the provider and location of the subnetwork.
- 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.
- 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 URLhttps://api.emma.ms/external
- AuthHTTP bearer
Request body
Example request
{
"name": "subnetwork-name",
"dataCenterId": "gcore-frankfurt",
"subnetworkPrefix": "192.168.0.0",
"subnetworkSize": 24
}Response
Successful operation
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.