Update port
Update port security settings, allowed address pairs, and/or security groups.
Supported for:
- Virtual machine instance ports
- Bare metal instance ports with software-defined networking (SmartNIC/DPU)
Not supported for standard bare metal ports.
Documentation Index
Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234$abcdef
Path Parameters
Project ID
1
Region ID
1
Port ID
"1f0ca628-a73b-42c0-bdac-7b10d023e097"
Body
A set of zero or more allowed port address pair and/or subnet masks. Replaces the full set of allowed address pairs. Send [] to clear; omit the field to leave existing pairs unchanged.
10[
{ "ip_address": "192.168.123.20" },
{ "ip_address": "192.168.0.0/17" }
]IP assignments on the port. Replaces the full set; subnets must belong to the port's network and at least one assignment must remain. The IP address is required (server-picked allocation is reserved for port creation).
When true, the network driver enforces port security on this port (anti-spoofing checks and security-group filtering apply). When false, all traffic is allowed and security groups are not applied.
List of security group IDs. Replaces the full set of security groups attached to the port. Send [] to detach all groups; omit the field to leave existing groups unchanged.
10["351b0dd7-ca09-431c-be53-935db3785067"]Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide key-value pairs to add or update tags. Set tag values to null to remove tags. Unspecified tags remain unchanged. Read-only tags are always preserved and cannot be modified.
Examples:
- Add/update tags:
{'tags': {'environment': 'production', 'team': 'backend'}}adds new tags or updates existing ones. - Delete tags:
{'tags': {'old_tag': null}}removes specific tags. - Remove all tags:
{'tags': null}removes all user-managed tags (read-only tags are preserved). - Partial update:
{'tags': {'environment': 'staging'}}only updates specified tags. - Mixed operations:
{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag', preserving other existing tags. - Replace all: first delete existing tags with null values, then add new ones in the same request.
{
"my-tag": "my-tag-value",
"my-tag-to-remove": null
}Response
OK
List of task IDs representing asynchronous operations. Use these IDs to monitor operation progress:
GET /v1/tasks/{task_id}- Check individual task status and details Poll task status until completion (FINISHED/ERROR) before proceeding with dependent operations.
["d478ae29-dedc-4869-82f0-96104425f565"]