The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Dynect::REST::Zone - List changes pending for a DNS zone

SYNOPSIS

 use Net::Dynect::REST;
 use Net::Dynect::REST::Zone;
 $dynect = Net::Dynect::REST->new(user_name => 'me', customer_name => 'myco', password => 'secret');
 $zone = Net::Dynect::REST::Zone->new(connection => $dynect, zone => 'example.com');
 print "Zone details: $zone\n";

 $zone->freeze;
 $zone->thaw;
 $zone->publish;
 $zone->delete;

 $new_zone = Net::Dynect::REST::Zone->new(connection => $dynect);
 $zone->name('new.example.com');
 $zone->serial_style('increment');
 $zone->zone_type('Primary');
 $zone->save(rname => 'admin@example.com', ttl => 900);

REQUIRES

Net::Dynect::REST, Carp

EXPORTS

Nothing

Description

A Net::Dynect::REST::Zone is a representation of a DNS Zone in the Dynect REST interface. It permits the user to load zones that already exist, inspect their attributes (eg, serial number), freeze the zone from modification, thaw the zone, publish zone changes live, delete the zone, and create a new zone.

METHODS

Creation

Net::Dynect::REST::Zone->new(connection => $dynect)

Creates and returns a Net::Dynect::REST::Zone object. You should pass this method your connection object, which should have a valid session established, in order to do anything useful.

Operations

$zone->get('zone.to.get.com');

This will attempt to get the details of the zone from Dynect.

$zone->save(rname => 'admin@example.com', ttl => 900);

This will try to save a new zone (which has already had its name and serial style set via the "Attributes" below). You must supply the "rname" parameter of the email address for the resposible person, and you may supply a ttl value.

$zone->delete();

This will tryt o delete the zone that was previously loaded.

$zone->freeze();

This will freeze the zone from any changes.

$zone->thaw();

This will unfreeze the zone and permit changes.

$zone->publish();

This will commit changes to the zone to the live production environment.

Attributes

$zone->name();

This will get (or set) the zone's name, eg: example.com.

$zone->serial();

This will get (or set) the zones serial number.

$zone->zone_type();

This will get (or set) the zone type, either:

  • Primary

  • Secondary

$zone->serial_style();

This will get or set the serial style for the zone, either

  • increment

  • epoch

  • day

  • minute

AUTHOR

James Bromberger, james@rcpt.to

SEE ALSO

Net::Dynect::REST, Net::Dynect::REST::Request, Net::Dynect::REST::Response, Net::Dynect::REST::info.

COPYRIGHT AND LICENSE

Copyright (C) 2010 by James Bromberger

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.