Public IPs

OneAndOne::PublicIP()

The PublicIP class allows a user to perform actions against the 1and1 API.

list(page: nil, per_page: nil, sort: nil, q: nil, fields: nil)

Return a list of all public IPs.

Parameters:
  • page (int) – Allows the use of pagination. Indicate which page to start on.
  • per_page (int) – Number of items per page.
  • sort (str) – sort: 'name' retrieves a list of elements sorted alphabetically. sort: 'creation_date' retrieves a list of elements sorted by their creation date in descending order.
  • q (str) – q is for query. Use this parameter to return only the items that match your search query.
  • fields (str) – Returns only the parameters requested. (i.e. fields: ‘id, name, description, hardware.ram’)
Return type:

JSON

create(reverse_dns: nil, type: nil)

Create a public IP.

Parameters:
  • reverse_dns (str) – reverse dns name.
  • type (str) – can only be set to 'IPV4' at this time.
Return type:

JSON

get(ip_id: @id)

Returns a public IP’s current specs.

Parameters:
  • ip_id (str) – the unique identifier for the IP.
Return type:

JSON

modify(ip_id: @id, reverse_dns: nil)

Modify a public IP.

Parameters:
  • ip_id (str) – the unique identifier for the IP.
  • reverse_dns (str) – reverse dns name.
Return type:

JSON

delete(ip_id: @id)

Delete a public IP.

Parameters:
  • ip_id (str) – the unique identifier for the IP.
Return type:

JSON