• Virtual Private Cloud

vpc
  1. Help Center
  2. Virtual Private Cloud
  3. API Reference
  4. OpenStack Neutron APIs
  5. Port
  6. Updating a Port

Updating a Port

Function

This interface is used to update a port.

URI

PUT /v2.0/ports/{port_id}

Request Message

Table 1 Request parameter

Parameter

Type

Mandatory

Description

ports

Dict

Yes

Specifies the port list. For details, see Table 1.

This parameter has no mandatory fields. You must specify at least one attribute when updating the port.

Response Message

Table 2 Response parameter

Parameter

Type

Description

ports

Dict

Specifies the port list. For details, see Table 1.

Example:

Example request

PUT /v2.0/ports/7a9a954a-eb41-4954-a300-11ab17a361a2  
{
    "port": {
           "name": "port-test02"
    }
}

Example response

{
    "port": {
        "id": "a7d98f3c-b42f-460b-96a1-07601e145961",
        "name": "port-test02",
        "status": "DOWN",
        "admin_state_up": true,
        "fixed_ips": [],
        "mac_address": "fa:16:3e:01:f7:90",
        "network_id": "00ae08c5-f727-49ab-ad4b-b069398aa171",
        "tenant_id": "db82c9e1415a464ea68048baa8acc6b8",
        "project_id": "db82c9e1415a464ea68048baa8acc6b8",
        "device_id": "",
        "device_owner": "",
        "security_groups": [
            "d0d58aa9-cda9-414c-9c52-6c3daf8534e6"
        ],
        "extra_dhcp_opts": [],
        "allowed_address_pairs": [],
        "binding:vnic_type": "normal",
        "binding:vif_details": {},
        "binding:profile": {},
        "port_security_enabled": true,
        "created_at": "2018-09-20T01:45:26",
        "updated_at": "2018-09-20T01:48:56"
    }
}

Status Codes

For details, see section Status Codes.