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
Creates a record in the zone
Deletes a record from the zone
Returns a zone in the account
Returns the zone file of the zone
Returns a record of the zone
Returns the records in the zone
Returns the zones in the account
Updates a record of the zone
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
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,
})
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)
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”)
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”)
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)
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: ""])
Specs
list_zones(Dnsimple.Client.t, String.t | integer, Keyword.t) :: Dnsimple.Response.t
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"])
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,
})
Specs
zone(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Specs
zone_file(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Specs
zone_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t
Specs
zone_records(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Specs
zones(Dnsimple.Client.t, String.t | integer, Keyword.t) :: Dnsimple.Response.t