Dnsimple.Zones (dnsimple v3.1.1) View Source
Provides functions to interact with the zone endpoints.
See:
Link to this section Summary
Functions
Returns the distribution status of a zone.
Returns the distribution status of a zone record.
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.
Updates a zone record.
Link to this section Functions
check_zone_distribution(client, account_id, zone_id, options \\ [])
View SourceSpecs
check_zone_distribution( Dnsimple.Client.t(), String.t() | integer(), String.t() | integer(), Keyword.t() ) :: {:ok | :error, Dnsimple.Response.t()}
Returns the distribution status of a zone.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.check_zone_distribution(client, account_id = 1010, zone_id = 12)
{:ok, response} = Dnsimple.Zones.check_zone_distribution(client, account_id = 1010, zone_id = "example.com")
check_zone_record_distribution(client, account_id, zone_id, record_id, options \\ [])
View SourceSpecs
check_zone_record_distribution( Dnsimple.Client.t(), String.t() | integer(), String.t() | integer(), integer(), Keyword.t() ) :: {:ok | :error, Dnsimple.Response.t()}
Returns the distribution status of a zone record.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Zones.check_zone_record_distribution(client, account_id = 1010, zone_id = 12, record_id = 999)
{:ok, response} = Dnsimple.Zones.check_zone_record_distribution(client, account_id = 1010, zone_id = "example.com", record_id = 999)
create_zone_record(client, account_id, zone_id, attributes, options \\ [])
View SourceSpecs
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,
})
delete_zone_record(client, account_id, zone_id, record_id, options \\ [])
View SourceSpecs
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")
get_zone_record(client, account_id, zone_id, record_id, options \\ [])
View SourceSpecs
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"])
update_zone_record(client, account_id, zone_id, record_id, attributes, options \\ [])
View SourceSpecs
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
})