Reference For: developers

API: ip-pools

Operations of the ip-pools tag of the native REST API.

Public IP pools on host-bridge networks, address allocation bound to VM NICs, reverse DNS (L-127)

GET /v1/ip-pools

Lists IP pools (those whose network the caller may configure).

CLI
kyvernon ip-pools list

Responses

StatusDescriptionSchema
200OKarray of IpPoolView

POST /v1/ip-pools

Creates an IP pool on a host-bridge network.

CLI
kyvernon ip-pools create --name <name> --network <network> --prefix-len <n> --range <range>

Request body

application/json: IpPoolRequest

NameTypeRequiredDescription
addressesarray of stringSingle IPv4 addresses (a provider's on-link addresses), besides or instead of ranges.
dnsServersarray of stringDNS servers; empty: the network's.
expectedVersioninteger (int64) or nullRequired on update: the version read.
gatewaystring or nullGateway.
ipv6PoolIpv6View or null
namestringyesName, unique.
networkstringyesThe host-bridge network id (network-N).
prefixLeninteger (int32)yesPrefix length of the IPv4 subnet.
quarantineSinteger (int64) or nullQuarantine of released addresses in seconds (default 14 days).
rangesarray of RangeViewIPv4 ranges.
rdnsRdnsMode or null
reservedarray of stringAddresses never handed out.
smtpIpv4SmtpPolicy or null
smtpIpv6SmtpPolicy or null

Responses

StatusDescriptionSchema
201CreatedIpPoolView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

GET /v1/ip-pools/{id}

Reads an IP pool.

CLI
kyvernon ip-pools get <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)

Responses

StatusDescriptionSchema
200OKIpPoolView
404Not found (or not visible to the caller)ErrorBody

PUT /v1/ip-pools/{id}

Changes an IP pool (compare-and-set on expectedVersion); allocations are kept.

CLI
kyvernon ip-pools update <id> --version <version> --name <name> --network <network> --prefix-len <n> --range <range>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)

Request body

application/json: IpPoolRequest

NameTypeRequiredDescription
addressesarray of stringSingle IPv4 addresses (a provider's on-link addresses), besides or instead of ranges.
dnsServersarray of stringDNS servers; empty: the network's.
expectedVersioninteger (int64) or nullRequired on update: the version read.
gatewaystring or nullGateway.
ipv6PoolIpv6View or null
namestringyesName, unique.
networkstringyesThe host-bridge network id (network-N).
prefixLeninteger (int32)yesPrefix length of the IPv4 subnet.
quarantineSinteger (int64) or nullQuarantine of released addresses in seconds (default 14 days).
rangesarray of RangeViewIPv4 ranges.
rdnsRdnsMode or null
reservedarray of stringAddresses never handed out.
smtpIpv4SmtpPolicy or null
smtpIpv6SmtpPolicy or null

Responses

StatusDescriptionSchema
200OKIpPoolView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody

DELETE /v1/ip-pools/{id}

Deletes an IP pool without allocations.

CLI
kyvernon ip-pools delete <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)

Responses

StatusDescriptionSchema
204Done; no body
412Failed precondition; the error body says whichErrorBody

GET /v1/ip-pools/{id}/allocations

Lists the allocated and quarantined addresses of a pool.

CLI
kyvernon ip-pools allocations <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)

Responses

StatusDescriptionSchema
200OKarray of AllocationView

POST /v1/ip-pools/{id}/allocations

Allocates an address (or a /64) and binds it to a VM NIC. A named address that another caller took first fails with error.ip_pool.address_in_use (409), one in quarantine with error.ip_pool.address_quarantined (412).

CLI
kyvernon ip-pools allocate <id>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)

Request body

application/json: AllocateBody

NameTypeRequiredDescription
addressstring or nullA specific IPv4 address.
familystring or nullipv4 (default) or ipv6 (a /64).
macstring or nullNIC MAC (absent: the VM's first NIC on the pool's network).
referencestring or nullCaller reference.
rolestring or nullprimary (default) or extra.
tenantstring or nullTenant (quota).
vmstring or nullVM to bind to (absent: reserved for the tenant).

Responses

StatusDescriptionSchema
201CreatedAllocationView
400Invalid argument; the error body names the fieldErrorBody
409Conflict: the object exists, or expectedVersion is staleErrorBody
412Failed precondition; the error body says whichErrorBody

DELETE /v1/ip-pools/{id}/allocations/{address}

Returns an address (or prefix/64, URL-encoded) to the pool: into quarantine, PTR record deleted.

CLI
kyvernon ip-pools free <id> <address>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)
addresspathstringyesAllocated address of the pool (an IPv6 block by its address)

Responses

StatusDescriptionSchema
204Done; no body
404Not found (or not visible to the caller)ErrorBody

PUT /v1/ip-pools/{id}/allocations/{address}/ptr

Sets or removes the PTR name of an allocated address (operator path).

CLI
kyvernon ip-pools ptr <id> <address> [--name <name>]

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)
addresspathstringyesAllocated address of the pool (an IPv6 block by its address)

Request body

application/json: PtrBody

NameTypeRequiredDescription
ptrstring or nullHost name; null or empty removes the record.

Responses

StatusDescriptionSchema
204Done; no body
400Invalid argument; the error body names the fieldErrorBody
412Failed precondition; the error body says whichErrorBody
503Temporarily unavailable (not the leader, or the service is off)ErrorBody

POST /v1/ip-pools/{id}/allocations/{address}/ptr/applied

The operator applied a manual PTR request (the name is in DNS, or a removal is done).

CLI
kyvernon ip-pools ptr-applied <id> <address>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)
addresspathstringyesAllocated address of the pool (an IPv6 block by its address)

Responses

StatusDescriptionSchema
204Done; no body
412Failed precondition; the error body says whichErrorBody

POST /v1/ip-pools/{id}/allocations/{address}/ptr/rejected

The operator could not apply a manual PTR request.

CLI
kyvernon ip-pools ptr-rejected <id> <address> --reason <reason>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)
addresspathstringyesAllocated address of the pool (an IPv6 block by its address)

Request body

application/json: PtrRejectBody

NameTypeRequiredDescription
reasonstringyesWhy (shown to the tenant).

Responses

StatusDescriptionSchema
204Done; no body
400Invalid argument; the error body names the fieldErrorBody
412Failed precondition; the error body says whichErrorBody

GET /v1/ip-pools/{id}/available

Lists the IPv4 addresses of a pool that can be allocated now (the allocator's own list, ascending), with the number of free IPv4 addresses and IPv6 blocks. Needs Network.Config or Network.Assign on the pool's network.

CLI
kyvernon ip-pools available <id> [--limit <n>]

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the IP pool (ippool-N)
limitqueryinteger or nullMost addresses returned (default 256, at most 4096; 0 returns only the counts).

Responses

StatusDescriptionSchema
200OKIpPoolAvailableView
404Not found (or not visible to the caller)ErrorBody

GET /v1/vms/{id}/addresses

The public addresses of a VM.

CLI
kyvernon addresses list <vm>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the virtual machine (vm-N)

Responses

StatusDescriptionSchema
200OKarray of VmAddress

POST /v1/vms/{id}/addresses

Gives a server its public addresses (the server-create hook as a native call): a primary IPv4 address and, when the pool has IPv6, a /64.

CLI
kyvernon addresses assign <vm>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the virtual machine (vm-N)

Request body

application/json: ServerAddressBody

NameTypeRequiredDescription
ipv6boolean or nullAlso a /64 when the pool has IPv6 (default true).
poolstring or nullPool (absent: the first pool on the VM's networks with a free address).
referencestring or nullCaller reference.
tenantstring or nullTenant (quota).

Responses

StatusDescriptionSchema
201CreatedServerAddresses
412Failed precondition; the error body says whichErrorBody

DELETE /v1/vms/{id}/addresses

Returns every address of a server to its pool (the server-delete hook).

CLI
kyvernon addresses release <vm>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the virtual machine (vm-N)

Responses

StatusDescriptionSchema
200OKarray of ReleasedAddress

PUT /v1/vms/{id}/addresses/{address}/ptr

Sets or removes the PTR name of one of the VM's addresses (the tenant path).

CLI
kyvernon addresses ptr <vm> <address> [--name <name>]

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the virtual machine (vm-N)
addresspathstringyesPublic address of the virtual machine

Request body

application/json: PtrBody

NameTypeRequiredDescription
ptrstring or nullHost name; null or empty removes the record.

Responses

StatusDescriptionSchema
204Done; no body
400Invalid argument; the error body names the fieldErrorBody
404Not found (or not visible to the caller)ErrorBody
412Failed precondition; the error body says whichErrorBody

GET /v1/vms/{id}/smtp

Outgoing SMTP of a VM: whether TCP 25 is blocked per family and whether the VM is unblocked.

CLI
kyvernon addresses smtp <vm>

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the virtual machine (vm-N)

Responses

StatusDescriptionSchema
200OKSmtpView

PUT /v1/vms/{id}/smtp

Unblocks (or blocks again) outgoing SMTP of a VM (operator or portal after its checks; recorded as event VmSmtpChangedEvent).

CLI
kyvernon addresses smtp <vm> --unblock

Parameters

NameInTypeRequiredDescription
idpathstringyesId of the virtual machine (vm-N)

Request body

application/json: SmtpBody

NameTypeRequiredDescription
reasonstring or nullWhy (stored in the audit event, e.g. the portal's ticket).
unblockedbooleanyestrue: allow port 25 for this VM in both families; false: the pools' setting.

Responses

StatusDescriptionSchema
200OKSmtpView
403Permission denied; args.privilege names the missing privilegeErrorBody

Version 0.1.