| 1 | package VM::EC2::DB::Subnet::Group; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | VM::EC2::DB::Subnet::Group - An RDS Database Subnet Group | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | =head1 DESCRIPTION | ||
| 10 | |||
| 11 | =head1 STRING OVERLOADING | ||
| 12 | |||
| 13 | =head1 SEE ALSO | ||
| 14 | |||
| 15 | L<VM::EC2> | ||
| 16 | L<VM::EC2::Generic> | ||
| 17 | L<VM::EC2::DB::Instance> | ||
| 18 | |||
| 19 | =head1 AUTHOR | ||
| 20 | |||
| 21 | Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>. | ||
| 22 | |||
| 23 | Copyright (c) 2013 Loyalty Methods, Inc. | ||
| 24 | |||
| 25 | This package and its accompanying libraries is free software; you can | ||
| 26 | redistribute it and/or modify it under the terms of the GPL (either | ||
| 27 | version 1, or at your option, any later version) or the Artistic | ||
| 28 | License 2.0. Refer to LICENSE for the full license text. In addition, | ||
| 29 | please see DISCLAIMER.txt for disclaimers of warranty. | ||
| 30 | |||
| 31 | =cut | ||
| 32 | |||
| 33 | use strict; | ||
| 34 | use base 'VM::EC2::Generic'; | ||
| 35 | use VM::EC2::DB::Subnet; | ||
| 36 | |||
| 37 | use overload '""' => sub { shift->DBSubnetGroupName }, | ||
| 38 | fallback => 1; | ||
| 39 | |||
| 40 | sub valid_fields { | ||
| 41 | my $self = shift; | ||
| 42 | return qw(DBSubnetGroupDescription DBSubnetGroupName SubnetGroupStatus Subnets VpcId); | ||
| 43 | } | ||
| 44 | |||
| 45 | sub description { shift->DBSubnetGroupDescription } | ||
| 46 | |||
| 47 | sub name { shift->DBSubnetGroupName } | ||
| 48 | |||
| 49 | sub status { shift->SubnetGroupStatus } | ||
| 50 | |||
| 51 | sub Subnets { | ||
| 52 | my $self = shift; | ||
| 53 | my $subnets = $self->SUPER::Subnets; | ||
| 54 | return map { VM::EC2::DB::Subnet->new($_,$self->aws) } @{$subnets->{Subnet}}; | ||
| 55 | } | ||
| 56 | |||
| 57 | 1; |