Create network
Creates a network.
URI
/v2.0/networks
HTTP method
POST
Request parameter
Key | Description | Type | Required/optional |
---|---|---|---|
admin_state_up | The administrative state of the network, which is up (true) or down (false). | xsd:bool | Optional |
name | The network name. A request body is optional: If you include it, it can specify this optional attribute. | xsd:string | Optional |
availability_zone | The Availability Zone name. If you do not specify this, the resource will be created in the default Availability Zone. |
xsd:string | Optional |
Example request
{
"network": {
"name": "sample_network",
"admin_state_up": true,
"availability_zone": "AZ1"
}
}
Response status
Status code | Description |
---|---|
201 | Normal response codes |
badRequest (400) | Error response codes |
unauthorized (401) | Error response codes |
Response body (normal status)
{
"network": {
"status": "ACTIVE",
"subnets": [],
"name": "net1",
"admin_state_up": true,
"tenant_id": "9bacb3c5d39d41a79512987f338cf177",
"mtu":0,
"shared": false,
"id": "4e8e5957-649f-477b-9e5b-f1f75b21c03c",
"availability_zone": "AZ1"
}
}
Description of response body (normal status)
Item | Description |
---|---|
admin_state_up | The administrative state of the network, which is up (true) or down (false). |
id | The network ID. |
name | The network name. |
shared | Indicates whether this network is shared across all projects. |
status | The network status. |
subnets | The associated subnets. |
tenant_id | The project ID. |
availability_zone | The Availability Zone name |