NAME
WebService::DigitalOcean::Role::DomainRecords - Domain Records role for DigitalOcean WebService
VERSION
version 0.011
METHODS
$do->domain_record_create(\%args)
Arguments
Str
$args{domain}-
The domain under which the record will be created.
Str
$args{type}-
The type of the record (eg MX, CNAME, A, etc).
Str
$args{name} (optional)-
The name of the record.
Str
$args{data} (optional)-
The data (such as the IP address) of the record.
Int
$args{priority} (optional)-
Priority, for MX or SRV records.
Int
$args{port} (optional)-
The port, for SRV records.
Int
$args{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($domain)
Arguments
Retrieves all the records for a particular domain.
my $response = $do->domain_record_list('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