| 1 | package VM::EC2::DB::IPRange; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | VM::EC2::DB::IPRange - An RDS Database IP Range | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | use VM::EC2; | ||
| 10 | |||
| 11 | $ec2 = VM::EC2->new(...); | ||
| 12 | $group = $ec2->revoke_db_security_group_ingress(-db_security_group_name => 'dbgroup', | ||
| 13 | -cidrip => '10.10.10.10/32'); | ||
| 14 | print $_,"\n" foreach grep { $_->Status eq 'authorized' } $group->IPRanges; | ||
| 15 | |||
| 16 | =head1 DESCRIPTION | ||
| 17 | |||
| 18 | This object represents an IP Range in a DB Security group. | ||
| 19 | |||
| 20 | =head1 STRING OVERLOADING | ||
| 21 | |||
| 22 | In string context, this object returns the CIDRIP. | ||
| 23 | |||
| 24 | =head1 SEE ALSO | ||
| 25 | |||
| 26 | L<VM::EC2> | ||
| 27 | L<VM::EC2::Generic> | ||
| 28 | L<VM::EC2::DB::Instance> | ||
| 29 | |||
| 30 | =head1 AUTHOR | ||
| 31 | |||
| 32 | Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>. | ||
| 33 | |||
| 34 | Copyright (c) 2013 Loyalty Methods, Inc. | ||
| 35 | |||
| 36 | This package and its accompanying libraries is free software; you can | ||
| 37 | redistribute it and/or modify it under the terms of the GPL (either | ||
| 38 | version 1, or at your option, any later version) or the Artistic | ||
| 39 | License 2.0. Refer to LICENSE for the full license text. In addition, | ||
| 40 | please see DISCLAIMER.txt for disclaimers of warranty. | ||
| 41 | |||
| 42 | =cut | ||
| 43 | |||
| 44 | use strict; | ||
| 45 | use base 'VM::EC2::Generic'; | ||
| 46 | |||
| 47 | use overload '""' => sub { shift->CIDRIP }, | ||
| 48 | fallback => 1; | ||
| 49 | |||
| 50 | sub valid_fields { | ||
| 51 | my $self = shift; | ||
| 52 | return qw(CIDRIP Status); | ||
| 53 | } | ||
| 54 | |||
| 55 | 1; |