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