Verb | URI | Description |
PUT | /networks/network-id |
Updates a specified network. |
Normal Response Code: 200
Error Response Codes: Bad Request (400) Unauthorized (401), Forbidden (403) Not Found (404)
This operation requires a request body. You can set the following attributes in the request body:
Attribute | Description |
---|---|
name | The name for the network. |
admin_state_up | Specifies whether the admin state
is up or down. Set to
true for up and
false for down.
If down, the network does not
forward packets. |
You cannot update the status
,
tenant_id
, or
id
attributes. If you try
to update these attributes, a
400
Bad Request error is
returned.
This operation returns a response body.
![]() | Note |
---|---|
Update operations in OpenStack Networking adopt patch semantics. This implies that the Networking API v2.0 does not require the user to send the whole resource to be updated, but just the attributes that the user wishes to update, as shown in the following example. |
Example 4.11. Update Network: JSON Request
PUT /v2.0/networks/fc68ea2c-b60b-4b4f-bd82-94ec81110766.json Content-Type: application/json Accept: application/json
{ "network": { "name": "updated_name" } }
Example 4.12. Update Network: JSON Response
status: 200 content-length: 192 content-type: application/json { "network": { "status": "ACTIVE", "subnets": [], "name": "updated_name", "admin_state_up": false, "shared": false, "tenant_id": "c1210485b2424d48804aad5d39c61b8f", "id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766" } }