NAME
WebService::DigitalOcean::Role::DomainRecords - Domain Records role for DigitalOcean WebService
VERSION
version 0.002
METHODS
domain_record_create
Arguments
- Str domain
-
The domain under which the record will be created.
- Str type
-
The type of the record (eg MX, CNAME, A, etc).
- Optional[Str] name
-
The name of the record.
- Optional[Str] data
-
The data (such as the IP address) of the record.
- Optional[Int] priority
-
Priority, for MX or SRV records.
- Optional[Int] port
-
The port, for SRV records.
- Optional[Int] weight
-
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};
domain_record_delete
Arguments
Deletes the specified record.
$do->domain_record_delete(
domain => 'example.com',
id => 1215,
);
domain_record_get
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};
domain_record_list
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";
}
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