WebService::Amazon::Route53::API::20110505
version 0.101
Creates a new instance of WebService::Amazon::Route53::API::20110505.
This method should not be used directly -- instead, call WebService::Amazon::Route53->new and pass the desired API version as the version argument.
version
Gets a list of hosted zones.
Called in scalar context:
$zones = $r53->list_hosted_zones(max_items => 15);
Called in list context:
($zones, $next_marker) = $r53->list_hosted_zones(marker => '456ZONEID', max_items => 15);
Parameters:
marker
Indicates where to begin the result set. This is the ID of the last hosted zone which will not be included in the results.
max_items
The maximum number of hosted zones to retrieve.
Returns: A reference to an array of hash references, containing zone data. Example:
$zones = [ { 'id' => '/hostedzone/123ZONEID', 'name' => 'example.com.', 'caller_reference' => 'ExampleZone', 'config' => { 'comment' => 'This is my first hosted zone' } }, { 'id' => '/hostedzone/456ZONEID', 'name' => 'example2.com.', 'caller_reference' => 'ExampleZone2', 'config' => { 'comment' => 'This is my second hosted zone' } } ];
When called in list context, it also returns the next marker to pass to a subsequent call to list_hosted_zones to get the next set of results. If this is the last set of results, next marker will be undef.
list_hosted_zones
undef
Gets hosted zone data.
$zone = get_hosted_zone(zone_id => '123ZONEID');
zone_id
(Required) Hosted zone ID.
Returns: A reference to a hash containing zone data. Example:
$zone = { 'id' => '/hostedzone/123ZONEID' 'name' => 'example.com.', 'caller_reference' => 'ExampleZone', 'config' => { 'comment' => 'This is my first hosted zone' } };
Finds the first hosted zone with the given name.
$zone = $r53->find_hosted_zone(name => 'example.com.');
name
(Required) Hosted zone name.
Returns: A reference to a hash containing zone data (see "get_hosted_zone"), or 0 if there is no hosted zone with the given name.
0
Creates a new hosted zone.
$response = $r53->create_hosted_zone(name => 'example.com.', caller_reference => 'example.com_01');
(Required) New hosted zone name.
caller_reference
(Required) A unique string that identifies the request.
Returns: A reference to a hash containing new zone data, change description, and name servers information. Example:
$response = { 'zone' => { 'id' => '/hostedzone/123ZONEID' 'name' => 'example.com.', 'caller_reference' => 'example.com_01', 'config' => {} }, 'change_info' => { 'id' => '/change/123CHANGEID' 'submitted_at' => '2011-08-30T23:54:53.221Z', 'status' => 'PENDING' }, 'delegation_set' => { 'name_servers' => [ 'ns-001.awsdns-01.net', 'ns-002.awsdns-02.net', 'ns-003.awsdns-03.net', 'ns-004.awsdns-04.net' ] }, };
Deletes a hosted zone.
$change_info = $r53->delete_hosted_zone(zone_id => '123ZONEID');
Returns: A reference to a hash containing change information. Example:
$change_info = { 'id' => '/change/123CHANGEID' 'submitted_at' => '2011-08-31T00:04:37.456Z', 'status' => 'PENDING' };
Lists resource record sets for a hosted zone.
$record_sets = $r53->list_resource_record_sets(zone_id => '123ZONEID');
($record_sets, $next_record) = $r53->list_resource_record_sets(zone_id => '123ZONEID');
The first domain name (in lexicographic order) to retrieve.
type
DNS record type of the next resource record set to retrieve.
identifier
Set identifier for the next source record set to retrieve. This is needed when the previous set of results has been truncated for a given DNS name and type.
The maximum number of records to be retrieved. The default is 100, and it's the maximum allowed value.
Returns: A reference to an array of hash references, containing record set data. Example:
$record_sets = [ { name => 'example.com.', type => 'MX' ttl => 86400, records => [ '10 mail.example.com' ] }, { name => 'example.com.', type => 'NS', ttl => 172800, records => [ 'ns-001.awsdns-01.net.', 'ns-002.awsdns-02.net.', 'ns-003.awsdns-03.net.', 'ns-004.awsdns-04.net.' ] } ];
When called in list context, it also returns a reference to a hash, containing information on the next record which can be passed to a subsequent call to list_resource_record_sets to get the next set of records (using the name and type parameters). Example:
list_resource_record_sets
$next_record = { name => 'www.example.com.', type => 'A' };
If this is the last set of records, next record will be undef.
Makes changes to DNS record sets.
$change_info = $r53->change_resource_record_sets(zone_id => '123ZONEID', changes => [ # Delete the current A record { action => 'delete', name => 'www.example.com.', type => 'A', ttl => 86400, value => '12.34.56.78' }, # Create a new A record with a different value { action => 'create', name => 'www.example.com.', type => 'A', ttl => 86400, value => '34.56.78.90' }, # Create two new MX records { action => 'create', name => 'example.com.', type => 'MX', ttl => 86400, records => [ '10 mail.example.com', '20 mail2.example.com' ] } ]);
If there is just one change to be made, you can use the simplified call syntax, and pass the change parameters directly, instead of using the changes parameter:
changes
$change_info = $r53->change_resource_record_sets(zone_id => '123ZONEID', action => 'delete', name => 'www.example.com.', type => 'A', ttl => 86400, value => '12.34.56.78');
(Required) A reference to an array of hashes, describing the changes to be made. If there is just one change, the array may be omitted and change parameters may be passed directly.
Change parameters:
action
(Required) The action to perform ("create" or "delete").
"create"
"delete"
(Required) The name of the domain to perform the action on.
(Required) The DNS record type.
ttl
The DNS record time to live (TTL), in seconds.
records
A reference to an array of strings that represent the current or new record values. If there is just one value, you can use the value parameter instead.
value
Current or new DNS record value. For multiple record values, use the records parameter.
Returns the last error.
$error = $r53->error;
Returns: A reference to a hash containing the type, code, and message of the last error. Example:
$error = { 'type' => 'Sender', 'message' => 'FATAL problem: UnsupportedCharacter encountered at ', 'code' => 'InvalidDomainName' };
Michal Wojciechowski <odyniec@cpan.org>
This software is copyright (c) 2011 by Michal Wojciechowski.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::Amazon::Route53, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::Amazon::Route53
CPAN shell
perl -MCPAN -e shell install WebService::Amazon::Route53
For more information on module installation, please visit the detailed CPAN module installation guide.