Saltar al contenido
NimbusNexus

Puertos de red

Un puerto de red es el punto de conexión entre una red y algo que la usa — una VM, un balanceador de carga, un router. La mayoría de los usuarios no gestionan los puertos directamente; crean una VM conectada a una red y el puerto se crea por detrás. Esta parte de la API es para los casos en los que sí necesitas control directo: crear un puerto con una IP conocida y conectarlo a una VM en ejecución, asociar un balanceador de carga a una IP concreta ya conocida o migrar la IP de un servicio entre hosts.

Los puertos llevan una dirección MAC, una o más direcciones IP de la subred a la que pertenecen y, opcionalmente, grupos de seguridad aplicados para filtrar el tráfico entrante y saliente. Un puerto que creas tú mismo sobrevive a la VM a la que está conectado, listo para una VM de reemplazo; los puertos que recibe una VM al crearse en una red se borran con ella. Un puerto en la red externa se factura hasta que lo borras (consulta Datos de precios).

Al crear una VM solo se indican redes (network), así que un puerto que hayas creado se une a una VM después del lanzamiento: POST /api/v1/instance/{server_id}/interfaces/ con su port_id.

Próximos pasos

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 →