dnsimple v1.2.0 Dnsimple.Domains
Provides functions to interact with the domain endpoints.
Summary
Functions
Accepts a pending push. Requires a contact_id
to be provided that
will be used as the domain contact
Adds a collaborator to the domain
List all domains in an account automatically paginating if necessary
Creates a delegation signer record for a domain
Creates a new domain in the account
Creates an email forward for a domain
Deletes an delegation signer record from a domain
Deletes a domain from an account
Deletes an email forward of a domain
Disable DNSSEC for the domain in the account
Enable DNSSEC for the domain in the account
Returns a delegation signer record of a domain
Get the DNSSEC status for the domain in the account
Returns a domain
Returns an email forward of a domain
Initiates the push of a domain to a different account
Lists the collaborators of the domain
Lists the delegation signer records for the domain
Lists the domains in an account
Lists the email forwards of a domain
Returns the pending pushes in the account
Rejects a pending push
Removes a collaborator from the domain
Resets the domain API token used for authentication in APIv1
Functions
Specs
accept_push(Dnsimple.Client.t, String.t | integer, integer, map, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Accepts a pending push. Requires a contact_id
to be provided that
will be used as the domain contact.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.accept_push(client, account_id = 1010, push_id = 6789, %{
contact_id: 123
})
Specs
add_collaborator(Dnsimple.Client.t, String.t | integer, String.t | integer, map, keyword) :: {:ok | :error, Dnsimple.Response.t}
Adds a collaborator to the domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.add_collaborator(client, account_id = 1010, domain_id = "example.com", %{
email: "existing-user@example.com"
})
Specs
all_domains(Dnsimple.Client.t, String.t | integer, Keyword.t) :: {:ok | :error, [Dnsimple.Domain.t]}
List all domains in an account automatically paginating if necessary.
This function will automatically page through all pages, returning all domains. It will respect the provided sorting and filtering options.
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.all_domains(client, account_id = 1010)
{:ok, response} = Dnsimple.Domains.all_domains(client, account_id = 1010, sort: "name:asc")
{:ok, response} = Dnsimple.Domains.all_domains(client, account_id = 1010, filter: [name_like: ".com"])
Specs
create_delegation_signer_record(Dnsimple.Client.t, String.t | integer, String.t | integer, map, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Creates a delegation signer record for a domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.create_delegation_signer_record(client, account_id = 1010, domain_id = "example.com", %{
algorithm: "13",
digest: "684a1f049d7d082b7f98691657da5a65764913df7f065f6f8c36edf62d66ca03",
digest_type: "2",
keytag: "2371"
})
Specs
create_domain(Dnsimple.Client.t, String.t | integer, map, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Creates a new domain in the account.
This won’t register the domain and will only add it to the account.
To register a domain please use Dnsimple.Registrar.register_domain/5
.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.create_domain(client, account_id = 1010, %{name: "example.io"})
Specs
create_email_forward(Dnsimple.Client.t, String.t | integer, String.t | integer, map, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Creates an email forward for a domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.create_email_forward(client, account_id = 1010, domain_id = "example.com", %{
from: "jacegu@example.com",
to: "me@provider.com",
})
Specs
delete_delegation_signer_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Deletes an delegation signer record from a domain.
Warning: this is a destructive operation.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.delete_delegation_signer_record(client, account_id = 1010, domain_id = "example.com", ds_record_id = 123)
Specs
delete_domain(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Deletes a domain from an account.
Warning: this is a destructive operation.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.delete_domain(client, account_id = 1010, domain_id = 237)
{:ok, response} = Dnsimple.Domains.delete_domain(client, account_id = 1010, domain_id = "example.io")
Specs
delete_email_forward(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Deletes an email forward of a domain.
Warning: this is a destructive operation.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.delete_email_forward(client, account_id = 1010, domain_id = "example.com", email_forward_id = 123)
Specs
disable_dnssec(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Disable DNSSEC for the domain in the account.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.disable_dnssec(client, account_id = 1000, domain_id = 123)
{:ok, response} = Dnsimple.Domains.disable_dnssec(client, account_id = 1000, domain_id = "example.io")
Specs
enable_dnssec(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Enable DNSSEC for the domain in the account.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.enable_dnssec(client, account_id = 1000, domain_id = 123)
{:ok, response} = Dnsimple.Domains.enable_dnssec(client, account_id = 1000, domain_id = "example.io")
Specs
get_delegation_signer_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns a delegation signer record of a domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.get_delegation_signer_record(client, account_id = 1010, domain_id = "example.com", ds_record_id = 123)
Specs
get_dnssec(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Get the DNSSEC status for the domain in the account.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.get_dnssec(client, account_id = 1000, domain_id = 123)
{:ok, response} = Dnsimple.Domains.get_dnssec(client, account_id = 1000, domain_id = "example.io")
Specs
get_domain(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns a domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.get_domain(client, account_id = 1010, domain_id = 123)
{:ok, response} = Dnsimple.Domains.get_domain(client, account_id = 1010, domain_id = "example.com")
Specs
get_email_forward(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns an email forward of a domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.get_email_forward(client, account_id = 1010, domain_id = "example.com", email_forward_id = 123)
Specs
initiate_push(Dnsimple.Client.t, String.t | integer, String.t | integer, map, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Initiates the push of a domain to a different account.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.initiate_push(client, account_id = 1010, domain_id = "example.com", %{
new_account_email: "other@example.com",
})
Specs
list_collaborators(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Lists the collaborators of the domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.list_collaborators(client, account_id = 1010, domain_id = "example.com")
Specs
list_delegation_signer_records(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Lists the delegation signer records for the domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.list_delegation_signer_records(client, account_id = 1000, domain_id = 123)
{:ok, response} = Dnsimple.Domains.list_delegation_signer_records(client, account_id = 1000, domain_id = "example.io")
Lists the domains in an account.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.list_domains(client, account_id = 1010)
{:ok, response} = Dnsimple.Domains.list_domains(client, account_id = 1010, sort: "name:asc")
{:ok, response} = Dnsimple.Domains.list_domains(client, account_id = 1010, per_page: 50, page: 4)
{:ok, response} = Dnsimple.Domains.list_domains(client, account_id = 1010, filter: [name_like: ".com"])
Specs
list_email_forwards(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Lists the email forwards of a domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.list_email_forwards(client, account_id = 1010, domain_id = 23)
{:ok, response} = Dnsimple.Domains.list_email_forwards(client, account_id = 1010, domain_id = "example.com")
{:ok, response} = Dnsimple.Domains.list_email_forwards(client, account_id = 1010, domain_id = "example.com", sort: "to:asc")
{:ok, response} = Dnsimple.Domains.list_email_forwards(client, account_id = 1010, domain_id = "example.com", per_page: 5, page: 1)
Specs
list_pushes(Dnsimple.Client.t, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Returns the pending pushes in the account.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.list_pushes(client, account_id = 1010)
Specs
reject_push(Dnsimple.Client.t, String.t | integer, integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Rejects a pending push.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.reject_push(client, account_id = 1010, push_id = 6789)
Specs
remove_collaborator(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Removes a collaborator from the domain.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.remove_collaborator(client, account_id = 1010, domain_id = "example.com", collaborator_id = 100)
Specs
reset_domain_token(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}
Resets the domain API token used for authentication in APIv1.
See:
Examples:
client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Domains.reset_domain_token(client, account_id = 1010, domain_id = 123)
{:ok, response} = Dnsimple.Domains.reset_domain_token(client, account_id = 1010, domain_id = "example.io")