Permalink
Browse files

Add 'DeleteHostedZone' in Route53

  • Loading branch information...
1 parent b3c3ce1 commit ebe3f7ad622eb9630130f38826cb2c2157f2d3ab @chilts committed Sep 10, 2011
Showing with 26 additions and 0 deletions.
  1. +26 −0 lib/AwsSum/Amazon/Route53.pm
@@ -68,6 +68,13 @@ my $commands = {
code => 200,
},
# * DELETE DeleteHostedZone
+ DeleteHostedZone => {
+ name => q{DeleteHostedZone},
+ method => q{delete_hosted_zone},
+ verb => q{delete},
+ path => q{hostedzone},
+ code => 200,
+ },
ListHostedZones => {
name => q{ListHostedZones},
method => q{list_hosted_zones},
@@ -295,6 +302,25 @@ EOF
return $data;
}
+sub delete_hosted_zone {
+ my ($self, $param) = @_;
+ $self->clear();
+
+ $self->set_command( 'DeleteHostedZone' );
+
+ # make sure we were given some things
+ unless ( $self->is_valid_something($param->{ZoneId}) ) {
+ croak "Provide a 'ZoneId' to query";
+ }
+
+ # set the path
+ $self->path( $self->version . q{/hostedzone/} . $param->{ZoneId} );
+
+ my $data = $self->send();
+ # $self->_force_array( $data->{ListDomainsResult}{DomainName} );
+ return $data;
+}
+
sub list_resource_record_sets {
my ($self, $param) = @_;
$self->clear();

0 comments on commit ebe3f7a

Please sign in to comment.