dnsimple v0.9.2 Dnsimple.Zones

This module provides functions to interact with the zone and zone records related endpoints.

See https://developer.dnsimple.com/v2/zones/ See https://developer.dnsimple.com/v2/zones/records/

Summary

Functions

Returns the zones in the account

See Dnsimple.Zones.get_zone/3

See Dnsimple.Zones.get_zone_file/3

See Dnsimple.Zones.get_zone_record/4

See Dnsimple.Zones.list_zone_records/3

See Dnsimple.Zones.list_zones/2

Functions

create_zone_record(client, account_id, zone_id, attributes, options \\ [])

Specs

create_zone_record(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t, Keyword.t) :: Dnsimple.Response.t

Creates a record in the zone.

See: https://developer.dnsimple.com/v2/zones/records/#create

Examples:

client = %Dnsimple.Client{access_token: “a1b2c3d4”}

Dnsimple.Zones.create_zone_record(client, account_id = 1010, zone_id = “example.com”, %{

name: "www",
type: "CNAME",
content: "example.com",
ttl: 3600,

})

delete_zone_record(client, account_id, zone_id, record_id, options \\ [])

Specs

delete_zone_record(Dnsimple.Client.t, String.t, String.t, integer, Keyword.t) :: Dnsimple.Response.t

Deletes a record from the zone.

See: https://developer.dnsimple.com/v2/zones/records/#delete

Examples:

client = %Dnsimple.Client{access_token: “a1b2c3d4”}

Dnsimple.Zones.delete_zone_record(client, account_id = 1010, zone_id = 12, record_id = 1) Dnsimple.Zones.delete_zone_record(client, account_id = 1010, zone_id = “example.com”, record_id = 1)

get_zone(client, account_id, zone_id, options \\ [])

Specs

get_zone(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t

Returns a zone in the account.

See: https://developer.dnsimple.com/v2/zones/#get

Examples:

client = %Dnsimple.Client{access_token: “a1b2c3d4”}

Dnsimple.Zones.get_zone(client, account_id = 1010, zone_id = 12) Dnsimple.Zones.get_zone(client, account_id = 1010, zone_id = “example.com”)

get_zone_file(client, account_id, zone_id, options \\ [])

Specs

get_zone_file(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t

Returns the zone file of the zone.

See: https://developer.dnsimple.com/v2/zones/#file

Examples:

client = %Dnsimple.Client{access_token: “a1b2c3d4”}

Dnsimple.Zones.get_zone_file(client, account_id = 1010, zone_id = 12) Dnsimple.Zones.get_zone_file(client, account_id = 1010, zone_id = “example.com”)

get_zone_record(client, account_id, zone_id, record_id, options \\ [])

Specs

get_zone_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t

Returns a record of the zone.

See: https://developer.dnsimple.com/v2/zones/records/#get

Examples:

client = %Dnsimple.Client{access_token: “a1b2c3d4”}

Dnsimple.Zones.get_zone_record(client, account_id = 1010, zone_id = 12, record_id = 345) Dnsimple.Zones.get_zone_record(client, account_id = 1010, zone_id = “example.com”, record_id = 123)

list_zone_records(client, account_id, zone_id, options \\ [])

Specs

list_zone_records(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t

Returns the records in the zone.

See: https://developer.dnsimple.com/v2/zones/records/#list

Examples:

client = %Dnsimple.Client{access_token: “a1b2c3d4”}

Dnsimple.Zones.list_zone_records(client, account_id = 1010, zone_id = “example.com”) Dnsimple.Zones.list_zone_records(client, account_id = 1010, zone_id = 12, page: 2, per_page: 10) Dnsimple.Zones.list_zone_records(client, account_id = 1010, zone_id = “example.com, sort: “type:asc”) Dnsimple.Zones.list_zone_records(client, account_id = 1010, zone_id = 12, filter: [type: "A", name: ""])

list_zones(client, account_id, options \\ [])

Specs

Returns the zones in the account.

See: https://developer.dnsimple.com/v2/zones/#list

Examples:

client = %Dnsimple.Client{access_token: “a1b2c3d4”}

Dnsimple.Zones.list_zones(client, account_id = 1010) Dnsimple.Zones.list_zones(client, account_id = 1010, page: 2, per_page: 10) Dnsimple.Zones.list_zones(client, account_id = 1010, sort: “name:desc”) Dnsimple.Zones.list_zones(client, account_id = 1010, filter: [name_like: ".es"])

update_zone_record(client, account_id, zone_id, record_id, attributes, options \\ [])

Specs

update_zone_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t, Keyword.t) :: Dnsimple.Response.t

Updates a record of the zone.

See: https://developer.dnsimple.com/v2/zones/records/#update

Examples:

client = %Dnsimple.Client{access_token: “a1b2c3d4”}

Dnsimple.Zones.update_zone_record(client, account_id = 1010, zone_id = “example.com”, record_id = 1, %{

ttl: 600,

})

zone(client, account_id, zone_id)

See Dnsimple.Zones.get_zone/3.

zone(client, account_id, zone_id, options)

Specs

See Dnsimple.Zones.get_zone/4.

zone_file(client, account_id, zone_id)

See Dnsimple.Zones.get_zone_file/3.

zone_file(client, account_id, zone_id, options)

Specs

zone_file(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t

See Dnsimple.Zones.get_zone_file/4.

zone_record(client, account_id, zone_id, record_id)

See Dnsimple.Zones.get_zone_record/4.

zone_record(client, account_id, zone_id, record_id, options)

Specs

zone_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t

See Dnsimple.Zones.get_zone_record/5.

zone_records(client, account_id, zone_id)

See Dnsimple.Zones.list_zone_records/3.

zone_records(client, account_id, zone_id, options)

Specs

zone_records(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t

See Dnsimple.Zones.list_zone_records/4.

zones(client, account_id)

See Dnsimple.Zones.list_zones/2.

zones(client, account_id, options)

See Dnsimple.Zones.list_zones/3.