View Source Dnsimple.Domains (dnsimple v4.0.0)
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.
Functions
accept_push(client, account_id, push_id, attributes, options \\ [])
View Source@spec 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
})
add_collaborator(client, account_id, domain_id, attributes, options \\ [])
View Source@spec 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"
})
@spec 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"])
create_delegation_signer_record(client, account_id, domain_id, attributes, options \\ [])
View Source@spec 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",
public_key: nil,
keytag: "2371"
})
@spec 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"})
create_email_forward(client, account_id, domain_id, attributes, options \\ [])
View Source@spec 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", %{
alias_name: "jacegu@example.com",
destination_email: "me@provider.com",
})
delete_delegation_signer_record(client, account_id, domain_id, ds_record_id, options \\ [])
View Source@spec 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)
@spec 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")
delete_email_forward(client, account_id, domain_id, email_forward_id, options \\ [])
View Source@spec 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)
@spec 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")
@spec 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")
get_delegation_signer_record(client, account_id, domain_id, ds_record_id, options \\ [])
View Source@spec 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)
@spec 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")
@spec 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")
get_email_forward(client, account_id, domain_id, email_forward_id, options \\ [])
View Source@spec 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)
initiate_push(client, account_id, domain_id, attributes, options \\ [])
View Source@spec 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",
})
@spec 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")
list_delegation_signer_records(client, account_id, domain_id, options \\ [])
View Source@spec 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"])
@spec 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)
@spec 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)
@spec 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)
remove_collaborator(client, account_id, domain_id, collaborator_id, options \\ [])
View Source@spec 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)