Net::Amazon::R53::AtomicChange - Representation of an atomic change
This document describes version 0.002 of Net::Amazon::R53::AtomicChange - released January 09, 2013 as part of Net-Amazon-R53.
# we have 2 sets of Stubs; a before (alpha) and after (omega) my $r53 = Net::Amazon::R53->new(...); my $hz = $r53->hosted_zone_by_id('XXX'); my @to_rrs = [ ... ]; my $ac = $r53->atomic_change_class->new( alpha => [ $hz->resource_record_sets ], omega => [ @to_rrs ], ); # apply our change to the zone in question; dies on failure my $change = $r53 ->hosted_zone_by_id($id) ->apply_atomic_change($ac) ; # alternatively, just allow alpha to coerce the hosted zone instance my $ac = $r53->atomic_change_class->new( alpha => $hz, omega => [ @to_rrs ], );
This class takes two sets of Net::Amazon::ResourceRecordSet::Stubs and calculates the CREATE and DELETE commands that would be needed to transform the first set (alpha) into the second (omega).
Both sets can be specified as references to arrays of Stubs or as HostedZone instances. If specified as HostedZone instances, they will be coerced to an array reference of Stubs (remember that Net::Amazon::ResourceRecordSet is actually a descendent of Net::Amazon::ResourceRecordSet::Stub, so they can be legally used here).
Note that we do not actually perform any changes; we merely calculate and validate. To actually apply this change to a hosted zone, see "apply_atomic_change" in Net::Amazon::R53::HostedZone.
These attributes are required, and must have their values supplied during object construction.
This is the set of the "from" resource records.
Legal values:
An ArrayRef of Stubs.
HostedZone
This can be coerced from a HostedZone using "resource_record_sets" in Net::Amazon::R53::HostedZone.
This is the set of the "to" resource records.
* An ArrayRef of Stubs.
* HostedZone (coerced via "resource_record_sets" in Net::Amazon::R53::HostedZone).
These attributes are lazily constructed from another source (e.g. required attributes, external source, a BUILD() method, or some combo thereof). You can set these values at construction time, though this is generally neither required nor recommended.
The list of DELETE changes.
This attribute cannot be populated via the constructor.
The list of CREATE changes.
This is the set of Net::Amazon::Route53::ResourceRecordSet::Change representing what needs to be done to get from our alpha to our omega.
That is, this attribute contains all the DELETE and CREATE requests needed to transform set alpha into set omega.
DELETE
CREATE
True if we have any changes to make.
True if we have no changes to make (that is, alpha and omega are equivalent).
Our count of all changes.
All of our changes, but as a list, not an ArrayRef.
Please see those modules/websites for more information related to this module.
Net::Amazon::R53
Chris Weyl <cweyl@campusexplorer.com>
Chris Weyl <cweyl@alumni.drew.edu>
This software is Copyright (c) 2012 by Campus Explorer, Inc.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
To install Net::Amazon::R53, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Amazon::R53
CPAN shell
perl -MCPAN -e shell install Net::Amazon::R53
For more information on module installation, please visit the detailed CPAN module installation guide.