dnsimple v1.2.0 Dnsimple.Zones
Provides functions to interact with the zone endpoints.
See:
Summary
Functions
Creates a record in the zone
Deletes a record from the zone
Returns a zone
Returns the zone file of the zone
Returns a zone record
Returns the records in the zone
Returns the zones in the account
Functions
Specs
create_zone_record(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Creates a record in the zone.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.create_zone_record(client, account_id = 1010, zone_id = "example.com", %{
name: "www",
type: "CNAME",
content: "example.com",
ttl: 3600,
})
Specs
delete_zone_record(Dnsimple.Client.t, String.t, String.t, integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Deletes a record from the zone.
Warning: this is a destructive operation.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.delete_zone_record(client, account_id = 1010, zone_id = 12, record_id = 1)
{:ok, response} = Dnsimple.Zones.delete_zone_record(client, account_id = 1010, zone_id = "example.com", record_id = 1)
Specs
get_zone(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns a zone.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.get_zone(client, account_id = 1010, zone_id = 12)
{:ok, response} = Dnsimple.Zones.get_zone(client, account_id = 1010, zone_id = "example.com")
Specs
get_zone_file(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns the zone file of the zone.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.get_zone_file(client, account_id = 1010, zone_id = 12)
{:ok, response} = Dnsimple.Zones.get_zone_file(client, account_id = 1010, zone_id = "example.com")
Specs
get_zone_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns a zone record.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.get_zone_record(client, account_id = 1010, zone_id = 12, record_id = 345)
{:ok, response} = Dnsimple.Zones.get_zone_record(client, account_id = 1010, zone_id = "example.com", record_id = 123)
Specs
list_zone_records(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns the records in the zone.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.list_zone_records(client, account_id = 1010, zone_id = "example.com")
{:ok, response} = Dnsimple.Zones.list_zone_records(client, account_id = 1010, zone_id = 12, page: 2, per_page: 10)
{:ok, response} = Dnsimple.Zones.list_zone_records(client, account_id = 1010, zone_id = "example.com", sort: "type:asc")
{:ok, response} = Dnsimple.Zones.list_zone_records(client, account_id = 1010, zone_id = 12, filter: [type: "A", name: ""])
Specs
list_zones(Dnsimple.Client.t, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns the zones in the account.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.list_zones(client, account_id = 1010)
{:ok, response} = Dnsimple.Zones.list_zones(client, account_id = 1010, page: 2, per_page: 10)
{:ok, response} = Dnsimple.Zones.list_zones(client, account_id = 1010, sort: "name:desc")
{:ok, response} = Dnsimple.Zones.list_zones(client, account_id = 1010, filter: [name_like: ".es"])
Specs
update_zone_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Updates a zone record.
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.update_zone_record(client, account_id = 1010, zone_id = "example.com", record_id = 1, %{
ttl: 600
})