Zum Inhalt springen
NimbusNexus

Netzwerkports

Ein Netzwerkport ist der Verbindungspunkt zwischen einem Netzwerk und etwas, das es nutzt — einer VM, einem Load Balancer, einem Router. Die meisten Nutzer verwalten Ports nicht direkt; sie erstellen eine VM mit Netzwerkanbindung, und der Port wird im Hintergrund erstellt. Diese API ist für die Fälle gedacht, in denen Sie direkte Kontrolle brauchen: einen Port mit bekannter IP erstellen und an eine laufende VM anhängen, einen Load Balancer an eine bestimmte, bekannte IP anbinden oder eine Service-IP zwischen Hosts migrieren.

Ports haben eine MAC-Adresse, eine oder mehrere IP-Adressen im übergeordneten Subnetz und optional Sicherheitsgruppen, die eingehenden und ausgehenden Traffic filtern. Ein Port, den Sie selbst erstellen, überdauert die VM, an die er angehängt ist, und steht für eine Ersatz-VM bereit; die Ports, die eine VM beim Erstellen in einem Netzwerk erhält, werden mit ihr gelöscht. Ein Port im externen Netzwerk wird abgerechnet, bis Sie ihn löschen (siehe Preisdaten).

Beim Erstellen einer VM geben Sie nur Netzwerke an (network); ein Port, den Sie erstellt haben, kommt deshalb erst nach dem Start zu einer VM: mit POST /api/v1/instance/{server_id}/interfaces/ und seiner port_id.

Nächste Schritte

Reference

GET/api/v1/portal/port/

List Ports

Lists network ports owned by the project.

Parameters

NameInTypeDescription
admin_domainquerystring | null—
admin_projectquerystring | null—
namequerystring | nullPort name
network_idquerystring | nullNetwork ID filter
admin_state_upqueryboolean | nullAdministrative state of the port
device_idquerystring | nullDevice ID (server UUID) attached to the port
device_ownerquerystring | nullDevice owner of the port
qos_policy_idquerystring | nullQoS policy ID
project_idquerystring | nullProject ID
mac_addressquerystring | nullMAC address
port_security_enabledqueryboolean | nullPort security enabled
security_groupsqueryarray of string | nullSecurity group IDs
binding_vnic_typequerystring | nullVNIC type binding
descriptionquerystring | nullPort description
statusquerystring | nullPort status filter

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/portal/port/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/portal/port/

Create Port

Creates a network port, optionally attached to a server, and embeds billing metadata in its description.

Request body

FieldTypeDescription
admin_domainstring | null—
admin_projectstring | null—
namestring | nullPort name
network_id*stringNetwork ID to attach the port
admin_state_upboolean | nullAdministrative state of the port
device_idstring | nullDevice ID (server UUID) attached to the port
device_ownerstring | nullDevice owner of the port
qos_policy_idstring | nullQoS policy ID
project_idstring | nullProject ID
mac_addressstring | nullMAC address
port_security_enabledboolean | nullPort security enabled
security_groupsarray of string | nullSecurity group IDs
binding_vnic_typestring | nullVNIC type binding
descriptionstring | null—
fixed_ipsarray of FixedIps | nullList of fixed IPs to assign to the port
hintsobject | nullAdditional hints for Admin Only
extra_dhcp_optsarray of object | null—
allowed_address_pairsarray of object | null—
product_categorystringProduct category for billing
subscriptionobjectSubscription plan type

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/portal/port/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "network_id": "<network_id>"
  }'
GET/api/v1/portal/port/artifacts

Port Artifacts

Returns subnets and QoS policies usable when creating a port.

Parameters

NameInTypeDescription
product_type_namequerystring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/portal/port/artifacts" \
  -H "Authorization: Bearer $NIMBUS_KEY"
GET/api/v1/portal/port/{port_id}

Get Port

Returns the details of a single network port by ID.

Parameters

NameInTypeDescription
port_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/portal/port/<port_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PUT/api/v1/portal/port/{port_id}

Update Port

Updates the mutable attributes of an existing network port.

Parameters

NameInTypeDescription
port_id*pathstring—

Request body

FieldTypeDescription
namestring | nullPort name
admin_state_upboolean | nullAdministrative state of the port
device_idstring | nullDevice ID (server UUID) attached to the port
device_ownerstring | nullDevice owner of the port
qos_policy_idstring | nullQoS policy ID
mac_addressstring | nullMAC address
port_security_enabledboolean | nullPort security enabled
security_groupsarray of string | nullSecurity group IDs
binding_vnic_typestring | nullVNIC type binding
descriptionstring | nullPort description
fixed_ipsarray of FixedIps | nullList of fixed IPs to update
hintsobject | nullAdditional hints for Admin Only

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PUT "https://api.nimbusnexus.net/api/v1/portal/port/<port_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/portal/port/{port_id}

Delete Port

Deletes a network port by ID, rejecting the request if the port is still in use.

Parameters

NameInTypeDescription
port_id*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/portal/port/<port_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →