NAME
WebService::DigitalOcean::Role::DomainRecords - Domain Records role for DigitalOcean WebService
VERSION
version 0.003
METHODS
$do->domain_record_create(%args)
Arguments
Str
domain-
The domain under which the record will be created.
Str
type-
The type of the record (eg MX, CNAME, A, etc).
Str
name (optional)-
The name of the record.
Str
data (optional)-
The data (such as the IP address) of the record.
Int
priority (optional)-
Priority, for MX or SRV records.
Int
port (optional)-
The port, for SRV records.
Int
weight (optional)-
The weight, for SRV records.
Creates a new record for a domain.
my $response = $do->domain_record_create(
domain => 'example.com',
type => 'A',
name => 'www2',
data => '12.34.56.78',
);
my $id = $response->{content}{domain_record}{id};
More info: https://developers.digitalocean.com/#create-a-new-domain-record.
$do->domain_record_delete(%args)
Arguments
Deletes the specified record.
$do->domain_record_delete(
domain => 'example.com',
id => 1215,
);
More info: https://developers.digitalocean.com/#delete-a-domain-record.
$do->domain_record_get(%args)
Arguments
Retrieves details about a particular record, identified by id.
my $response = $do->domain_record_get(
domain => 'example.com',
id => 1215,
);
my $ip = $response->{content}{domain_record}{data};
More info: https://developers.digitalocean.com/#retrieve-an-existing-domain-record.
$do->domain_record_list(%args)
Arguments
Retrieves all the records for a particular domain.
my $response = $do->domain_record_list(
domain => 'example.com',
);
for (@{ $response->{content}{domain_records} }) {
print "$_->{name} => $_->{data}\n";
}
More info: https://developers.digitalocean.com/#list-all-domain-records.
DESCRIPTION
Implements the domain records resource.
More info: https://developers.digitalocean.com/#domain-records.
AUTHOR
André Walker <andre@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by André Walker.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991