IP address related APIs.
This class provides following APIs:
This trait can be implemented by any class that has
Type Params | Return Type | Name and description |
---|---|---|
|
def |
delete(def... args) Removes an IP address from a server. |
|
String |
getAddress() |
|
AbstractSession<?> |
getHTTP() |
|
def |
load(def... args) Fetch detailed information about a specific IpAddress. |
|
def |
update(Resource resource, def... args) Modifies the reverse DNS PTR record corresponding to an IP address. |
Removes an IP address from a server.
A 204 No Content
response signifies success.
args
- Request callbacks for the DELETE /ip_address/${ipAddress.address}
call.Fetch detailed information about a specific IpAddress.
A 200 OK
response will include an instance of IpAddress
in the ipAddress
property.
ipAddressApi.load { resp, err ->
assert resp?.ipAddress instanceof IpAddress
}
args
- Request callbacks for the GET /ip_address/${ipAddress.address}
call.Modifies the reverse DNS PTR record corresponding to an IP address.
A 202 Accepted
response will include an instance of IpAddress
in the ipAddress
property.
import static fi.linuxbox.upcloud.resource.Builder.*
def ptrRecord = ipAddress {
ptrRecord = "hostname.example.com"
}
ipAddressApi.update ptrRecord { resp, err ->
assert resp?.ipAddress instanceof IpAddress
}
resource
- Specification of the updateargs
- Request callbacks for the PUT /ip_address/${ipAddress.address}
call.