Aller au contenu
NimbusNexus

Ports réseau

Un port réseau est le point de connexion entre un réseau et ce qui l’utilise — une VM, un load balancer, un routeur. La plupart des utilisateurs ne gèrent pas les ports directement : ils créent une VM avec un rattachement réseau, et le port est créé en coulisses. Les endpoints de cette page servent aux cas où vous avez réellement besoin d’un contrôle direct : pré-allouer un port + une IP avant de lancer une VM, attacher un load balancer à une IP connue précise, ou migrer l’IP d’un service d’un hôte à un autre.

Les ports portent une adresse MAC, une ou plusieurs adresses IP sur le sous-réseau parent et, en option, des groupes de sécurité qui filtrent le trafic entrant et sortant. Ils ont un état propre — un port subsiste si vous supprimez la VM à laquelle il était attaché, prêt à être rattaché à une VM de remplacement.

Étapes suivantes

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 →