# network-api ## Pages - [EZGH Network API](https://docs.ezghcloud.com/network-api/index.md) — Network interfaces (each with its own routed public IPv6 /64), public IPv4 addresses, and VPCs with their subnets. Every path is under an organization; lists are paged with limit, cursor and nextCursor. - [Allocate a public IPv4 address](https://docs.ezghcloud.com/network-api/AllocateIpv4Address/index.md) — Metered while allocated, associated or not. - [Assign a secondary private address to a network interface](https://docs.ezghcloud.com/network-api/AssignPrivateAddress/index.md) — From the interface's own subnet: the address given, or the next eligible one. Requires an Idempotency-Key (1–200 characters); a retry with it answers the same operation as it is now. Refused with 409 public_interface, interface_not_available, migration_in_progress and private_address_limit_exceeded (at most 2 secondary addresses per interface, 4,000 addresses per VPC, and 5,000 addresses, delegated prefixes and interfaces together); 409 address_in_use for an address owned, reserved, inside a delegated prefix or still being withdrawn, and 409 subnet_full when none is free. - [Assign a delegated prefix to a network interface](https://docs.ezghcloud.com/network-api/AssignPrivatePrefix/index.md) — An IPv4 /28 or IPv6 /80 from the interface's own subnet, for addresses the instance routes itself: the prefix given, or a free aligned one. The operation's address holds the prefix in CIDR form, and it succeeds once the interface's host is programmed. Requires an Idempotency-Key (1–200 characters); a retry with it answers the same operation as it is now. 400 invalid_request for a wrong length, a prefix not aligned or outside the subnet, or one overlapping a subnet's reserved addresses. Refused with 409 public_interface, interface_not_available, migration_in_progress, host_unsupported and private_address_limit_exceeded (at most 16 IPv4 and 2 IPv6 prefixes per interface; a VPC's addresses, prefixes and interfaces total at most 5,000); 409 address_in_use for a prefix overlapping any address, prefix or VIP, and 409 prefix_unavailable when no aligned block is free. - [Associate an IPv4 address with a network interface](https://docs.ezghcloud.com/network-api/AssociateIpv4Address/index.md) — On an interface not running on a host the association completes at once; otherwise association.state is associating until the host confirms. Refused with 409 interface_deleting while the address's current network interface is being deleted, and 409 association_in_progress while its association is still changing. On a private network interface the address is mapped 1:1 onto its primary private IPv4 (the guest sees only the private address); its VPC needs an attached network gateway (409 vpc_has_no_gateway), and a host it's bound on must support the gateway (409 host_unsupported) and have a prefix for it (409 host_prefix_limit). - [Attach a network gateway to a VPC](https://docs.ezghcloud.com/network-api/AttachNetworkGateway/index.md) — Needs network.vpcs.update on the VPC too. A VPC has at most one gateway (409 vpc_has_gateway); the gateway and the VPC must be in one project (400 invalid_request). - [Create a NAT gateway](https://docs.ezghcloud.com/network-api/CreateNatGateway/index.md) — Creates a NAT gateway in a subnet of a VPC and allocates its public IPv4 address, which is in the answer at once. The gateway is provisioning until it can carry traffic, then active; poll it at Location. Nothing is routed to it until a route table names it as a natGateway target. Refused with 409 network_gateway_required when the VPC has no attached network gateway, 409 subnet_not_public when the subnet's route table has no 0.0.0.0/0 route to that network gateway, 409 host_unsupported where NAT gateways aren't available, and 409 quota_exceeded at network.natGatewaysPerProject. The address doesn't count against network.ipv4AddressesPerOrganization. - [Create a network gateway](https://docs.ezghcloud.com/network-api/CreateNetworkGateway/index.md) — Creates a detached gateway. Attach it to a VPC to give that VPC's interfaces their internet path: mapped public IPv4 addresses and public IPv6 /64s. Refused with 409 quota_exceeded at network.networkGatewaysPerProject. - [Create a network interface](https://docs.ezghcloud.com/network-api/CreateNetworkInterface/index.md) — Allocates its routed IPv6 /64 (and, with ipv4, a public IPv4 address) and attaches its initial firewalls: the project's default firewall when firewalls is omitted, none for []. - [Create a route table](https://docs.ezghcloud.com/network-api/CreateRouteTable/index.md) — Creates a custom table in a VPC, optionally with routes. Refused with 409 quota_exceeded at network.routeTablesPerVpc (the main table counts) or network.routes.perRouteTable. - [Create a subnet in a VPC](https://docs.ezghcloud.com/network-api/CreateSubnet/index.md) — Its IPv6 /64 is the VPC's next free one. Refused with 409 subnet_cidr_overlap, 409 vpc_ipv6_exhausted (256 subnets), 409 subnet_addresses_withdrawing (an address the new subnet reserves is still being withdrawn), 409 vpc_deleting, and 409 quota_exceeded at network.subnetsPerProject. - [Create a VPC](https://docs.ezghcloud.com/network-api/CreateVpc/index.md) — Creates the VPC with its generated IPv6 /56 and its default firewall. The MTU is 8900 and not settable. Refused with 409 quota_exceeded at network.vpcsPerProject. - [Delete a NAT gateway](https://docs.ezghcloud.com/network-api/DeleteNatGateway/index.md) — The gateway is deleting until it is gone, then 404; its public IPv4 address is released with it. Routes that name it stay and read blackhole. - [Delete a network gateway](https://docs.ezghcloud.com/network-api/DeleteNetworkGateway/index.md) — Refused with 409 gateway_attached while it is attached to a VPC: detach it first. - [Delete a network interface](https://docs.ezghcloud.com/network-api/DeleteNetworkInterface/index.md) — Refused with 409 interface_in_use while it's attached. Its /64 goes back to the pool, and its IPv4 address is released if autoRelease, else disassociated. - [Delete a route table](https://docs.ezghcloud.com/network-api/DeleteRouteTable/index.md) — Refused with 409 route_table_is_main for a VPC's main table (deleted with the VPC), and 409 route_table_in_use while a subnet is associated with it. - [Delete a subnet](https://docs.ezghcloud.com/network-api/DeleteSubnet/index.md) — Refused with 409 subnet_in_use while network interfaces are in it. Refused with 409 subnet_routed while a route table of the VPC routes the subnet's CIDR. - [Delete a VPC and its default firewall](https://docs.ezghcloud.com/network-api/DeleteVpc/index.md) — Refused with 409 vpc_in_use while it has subnets, and with 409 vpc_default_firewall_referenced while its default firewall is attached or another firewall's rule names it (the VPC stays available). A 503 leaves it deleting; repeat the request, or the service finishes it. A 204 can leave it deleting (failureReason addresses_withdrawing) while addresses of its deleted network interfaces are withdrawn from hosts; it's then removed without another request. - [Detach a network gateway from its VPC](https://docs.ezghcloud.com/network-api/DetachNetworkGateway/index.md) — Needs network.vpcs.update on the VPC too. Refused with 409 gateway_in_use while a public IPv4 address is mapped onto one of the VPC's interfaces or one of them holds a public IPv6 /64; the error's mappings and ipv6Prefixes count each kind. A /64 lives as long as its interface: delete those interfaces first. - [Disassociate an IPv4 address](https://docs.ezghcloud.com/network-api/DisassociateIpv4Address/index.md) — On an interface not running on a host it completes at once; otherwise association.state is disassociating until the host confirms. Refused with 409 interface_deleting while the network interface is being deleted. - [Get an IPv4 address](https://docs.ezghcloud.com/network-api/GetIpv4Address/index.md) - [Get a NAT gateway](https://docs.ezghcloud.com/network-api/GetNatGateway/index.md) - [Get a network gateway](https://docs.ezghcloud.com/network-api/GetNetworkGateway/index.md) - [Get a network interface](https://docs.ezghcloud.com/network-api/GetNetworkInterface/index.md) - [Get a private address operation](https://docs.ezghcloud.com/network-api/GetPrivateAddressOperation/index.md) — Retry-After is set while it's queued or running. Readable after its network interfaces are deleted. - [Get a route table](https://docs.ezghcloud.com/network-api/GetRouteTable/index.md) — Its ETag is the routes' revision: it changes on every route write and on nothing else. - [Get a subnet](https://docs.ezghcloud.com/network-api/GetSubnet/index.md) - [Get a VPC](https://docs.ezghcloud.com/network-api/GetVpc/index.md) - [List a project's IPv4 addresses, newest first](https://docs.ezghcloud.com/network-api/ListIpv4Addresses/index.md) - [List a project's NAT gateways, newest first](https://docs.ezghcloud.com/network-api/ListNatGateways/index.md) - [List a project's network gateways, newest first](https://docs.ezghcloud.com/network-api/ListNetworkGateways/index.md) - [List a project's network interfaces, newest first](https://docs.ezghcloud.com/network-api/ListNetworkInterfaces/index.md) - [List a project's private address operations, newest first](https://docs.ezghcloud.com/network-api/ListPrivateAddressOperations/index.md) — Only operations whose every network interface the caller may get. - [List a project's route tables, newest first](https://docs.ezghcloud.com/network-api/ListRouteTables/index.md) - [List a project's subnets, newest first](https://docs.ezghcloud.com/network-api/ListSubnets/index.md) - [List a project's VPCs, newest first](https://docs.ezghcloud.com/network-api/ListVpcs/index.md) - [Move a secondary private address to another network interface](https://docs.ezghcloud.com/network-api/ReassignPrivateAddress/index.md) — The destination is another private interface in the same subnet; the caller needs the action on both. The old owner's permission is withdrawn everywhere before the destination is given the address. Requires an Idempotency-Key (1–200 characters); a retry with it answers the same operation as it is now. Refused with 409 public_interface, interface_not_available, migration_in_progress and private_address_limit_exceeded (at most 2 secondary addresses per interface, 4,000 addresses per VPC); 409 subnet_mismatch, primary_address_immutable, address_not_assigned, address_generation_conflict and address_operation_in_progress. - [Release an IPv4 address](https://docs.ezghcloud.com/network-api/ReleaseIpv4Address/index.md) — Refused with 409 address_associated until it's disassociated. - [Remove routes](https://docs.ezghcloud.com/network-api/RemoveRoutes/index.md) — Removes the given destinations, atomically; an absent one is ignored, so a retry is safe. If-Match is optional (a stale one is 412). Naming a local route is 400. - [Replace a route table's routes](https://docs.ezghcloud.com/network-api/ReplaceRoutes/index.md) — Replaces the whole customer route set. If-Match is optional; a stale one is 412 precondition_failed. The local routes may be included exactly as GET shows them (they are ignored); a changed one is 400. Only added or changed routes are validated. - [Create or replace routes](https://docs.ezghcloud.com/network-api/SetRoutes/index.md) — Creates or replaces the route of each given destination, atomically. If-Match is optional (a stale one is 412 precondition_failed); without one, concurrent writers never conflict. Naming a local route is 400. - [Unassign a secondary private address from a network interface](https://docs.ezghcloud.com/network-api/UnassignPrivateAddress/index.md) — expectedGeneration is the address's generation from privateAddressAssignments; the operation advances it. Requires an Idempotency-Key (1–200 characters); a retry with it answers the same operation as it is now. Refused with 409 public_interface, interface_not_available, migration_in_progress and private_address_limit_exceeded (at most 2 secondary addresses per interface, 4,000 addresses per VPC); 409 primary_address_immutable, address_not_assigned, address_generation_conflict and address_operation_in_progress. - [Unassign a delegated prefix from a network interface](https://docs.ezghcloud.com/network-api/UnassignPrivatePrefix/index.md) — expectedGeneration is the prefix's generation from privatePrefixAssignments; the operation advances it. Traffic of the prefix's addresses stops across the VPC before it can be assigned again. Requires an Idempotency-Key (1–200 characters); a retry with it answers the same operation as it is now. Refused with 409 public_interface, interface_not_available, migration_in_progress, address_not_assigned, address_generation_conflict and address_operation_in_progress. - [Rename or tag an IPv4 address, or set autoRelease](https://docs.ezghcloud.com/network-api/UpdateIpv4Address/index.md) — Refused with 409 interface_deleting when autoRelease changes while the address's network interface is being deleted. - [Rename a NAT gateway](https://docs.ezghcloud.com/network-api/UpdateNatGateway/index.md) - [Rename, describe or tag a network gateway](https://docs.ezghcloud.com/network-api/UpdateNetworkGateway/index.md) - [Rename, describe or tag a network interface](https://docs.ezghcloud.com/network-api/UpdateNetworkInterface/index.md) - [Rename, describe or tag a route table](https://docs.ezghcloud.com/network-api/UpdateRouteTable/index.md) - [Rename, describe, tag or set the launch defaults of a subnet](https://docs.ezghcloud.com/network-api/UpdateSubnet/index.md) - [Rename, describe or tag a VPC](https://docs.ezghcloud.com/network-api/UpdateVpc/index.md) - [Error](https://docs.ezghcloud.com/network-api/schemas/Error/index.md) — Every non-2xx answer. Clients branch on code, never on message. - [Ipv4Address](https://docs.ezghcloud.com/network-api/schemas/Ipv4Address/index.md) — A public IPv4 address. - [Ipv4AddressAssociate](https://docs.ezghcloud.com/network-api/schemas/Ipv4AddressAssociate/index.md) - [Ipv4AddressCreate](https://docs.ezghcloud.com/network-api/schemas/Ipv4AddressCreate/index.md) - [Ipv4AddressList](https://docs.ezghcloud.com/network-api/schemas/Ipv4AddressList/index.md) - [Ipv4AddressUpdate](https://docs.ezghcloud.com/network-api/schemas/Ipv4AddressUpdate/index.md) - [NatGateway](https://docs.ezghcloud.com/network-api/schemas/NatGateway/index.md) — A NAT Gateway: outbound IPv4 internet access for a VPC's private subnets behind one public IPv4 address. - [NatGatewayCreate](https://docs.ezghcloud.com/network-api/schemas/NatGatewayCreate/index.md) - [NatGatewayList](https://docs.ezghcloud.com/network-api/schemas/NatGatewayList/index.md) - [NatGatewayUpdate](https://docs.ezghcloud.com/network-api/schemas/NatGatewayUpdate/index.md) - [NetworkGateway](https://docs.ezghcloud.com/network-api/schemas/NetworkGateway/index.md) — A Network Gateway: the internet path of the VPC it is attached to. - [NetworkGatewayAttach](https://docs.ezghcloud.com/network-api/schemas/NetworkGatewayAttach/index.md) - [NetworkGatewayCreate](https://docs.ezghcloud.com/network-api/schemas/NetworkGatewayCreate/index.md) - [NetworkGatewayList](https://docs.ezghcloud.com/network-api/schemas/NetworkGatewayList/index.md) - [NetworkGatewayUpdate](https://docs.ezghcloud.com/network-api/schemas/NetworkGatewayUpdate/index.md) - [NetworkInterface](https://docs.ezghcloud.com/network-api/schemas/NetworkInterface/index.md) — A network interface: public, with its own routed IPv6 /64, or private, in a VPC's subnet (subnet set). - [NetworkInterfaceCreate](https://docs.ezghcloud.com/network-api/schemas/NetworkInterfaceCreate/index.md) - [NetworkInterfaceList](https://docs.ezghcloud.com/network-api/schemas/NetworkInterfaceList/index.md) - [NetworkInterfaceUpdate](https://docs.ezghcloud.com/network-api/schemas/NetworkInterfaceUpdate/index.md) - [PrivateAddressAssign](https://docs.ezghcloud.com/network-api/schemas/PrivateAddressAssign/index.md) - [PrivateAddressOperation](https://docs.ezghcloud.com/network-api/schemas/PrivateAddressOperation/index.md) - [PrivateAddressOperationList](https://docs.ezghcloud.com/network-api/schemas/PrivateAddressOperationList/index.md) - [PrivateAddressReassign](https://docs.ezghcloud.com/network-api/schemas/PrivateAddressReassign/index.md) - [PrivateAddressUnassign](https://docs.ezghcloud.com/network-api/schemas/PrivateAddressUnassign/index.md) - [PrivatePrefixAssign](https://docs.ezghcloud.com/network-api/schemas/PrivatePrefixAssign/index.md) - [PrivatePrefixUnassign](https://docs.ezghcloud.com/network-api/schemas/PrivatePrefixUnassign/index.md) - [QuotaExceeded](https://docs.ezghcloud.com/network-api/schemas/QuotaExceeded/index.md) — quota_exceeded: the quota that refused the request. Never with Retry-After. - [Route](https://docs.ezghcloud.com/network-api/schemas/Route/index.md) - [RouteInput](https://docs.ezghcloud.com/network-api/schemas/RouteInput/index.md) - [RouteTable](https://docs.ezghcloud.com/network-api/schemas/RouteTable/index.md) — A VPC route table: the routes a subnet's traffic takes. - [RouteTableCreate](https://docs.ezghcloud.com/network-api/schemas/RouteTableCreate/index.md) - [RouteTableList](https://docs.ezghcloud.com/network-api/schemas/RouteTableList/index.md) - [RouteTableUpdate](https://docs.ezghcloud.com/network-api/schemas/RouteTableUpdate/index.md) - [RouteTarget](https://docs.ezghcloud.com/network-api/schemas/RouteTarget/index.md) - [RoutesRemove](https://docs.ezghcloud.com/network-api/schemas/RoutesRemove/index.md) - [RoutesReplace](https://docs.ezghcloud.com/network-api/schemas/RoutesReplace/index.md) - [RoutesSet](https://docs.ezghcloud.com/network-api/schemas/RoutesSet/index.md) - [Subnet](https://docs.ezghcloud.com/network-api/schemas/Subnet/index.md) — A range of a VPC. - [SubnetCreate](https://docs.ezghcloud.com/network-api/schemas/SubnetCreate/index.md) - [SubnetList](https://docs.ezghcloud.com/network-api/schemas/SubnetList/index.md) - [SubnetUpdate](https://docs.ezghcloud.com/network-api/schemas/SubnetUpdate/index.md) - [Tags](https://docs.ezghcloud.com/network-api/schemas/Tags/index.md) — At most 50; keys 1-128 characters, values at most 256, keys starting with ezgh: are reserved. - [Vpc](https://docs.ezghcloud.com/network-api/schemas/Vpc/index.md) — A private regional network. - [VpcCreate](https://docs.ezghcloud.com/network-api/schemas/VpcCreate/index.md) - [VpcList](https://docs.ezghcloud.com/network-api/schemas/VpcList/index.md) - [VpcUpdate](https://docs.ezghcloud.com/network-api/schemas/VpcUpdate/index.md)