Skip to navigation

Swap the NAT gateway public IP

Replaces the NAT gateway’s public IP with a Reserved IP, keeping the port-forwarding rules, as the portal’s NAT card does. Requires scope: network.write.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
# VPC_ID: VPC ID
# NAT_GATEWAY_ID: NAT gateway ID
curl -X PUT "https://api.ibee.ai/v1/networking/vpcs/$VPC_ID/nat-gateways/$NAT_GATEWAY_ID/public-ip?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"reserved_public_ip_id": "<reserved_public_ip_id>"}'

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Path parameters

vpc_idstringRequired
VPC ID.
nat_gateway_idstringRequired
NAT gateway ID.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Request

This endpoint expects an object.
reserved_public_ip_idstringRequired

Reserved IP to put on the gateway. Port-forwarding rules are preserved.

Response

NAT gateway updated.
nat_gateway_idstring
Unique ID of the gateway.
vpc_idstring
VPC the gateway serves.
site_idstring
Site the gateway lives at.
namestring
Display name of the gateway.
public_ip_idstring
ID of the public IP the gateway uses.
public_ipstring
Public IPv4 address of the gateway.
statusenum

Lifecycle status of a VPC, subnet, NAT gateway or port-forwarding rule.

  • provisioning: being created.
  • available: ready for use.
  • error: the last change failed; see error_message.
  • deleting: being removed.
Allowed values:
subnet_idstring or nullOptional
Subnet the gateway is placed in.
organization_idstringOptional
ID of the owning organization.
workspace_idstringOptional
ID of the owning workspace.
pricingobjectOptional
Price of a NAT gateway as recorded when it was created.
error_messagestring or nullOptional

Error detail when status is error.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
423
Locked Error
503
Service Unavailable Error