| 1 | package VM::EC2::DB::Engine::Defaults; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | VM::EC2::DB::Engine::Defaults - An RDS Database Engine Parameter Defaults | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | use VM::EC2; | ||
| 10 | $ec2 = VM::EC2->new(...); | ||
| 11 | my $defaults = $ec2->describe_engine_default_parameters(-db_parameter_group_family => 'MySQL5.1') | ||
| 12 | my @params = $defaults->Parameters; | ||
| 13 | print $_,"\n" foreach grep { $_->IsModifiable } @params; | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | This object represents database engine parameter defaults. It is returned | ||
| 18 | by a VM::EC2->describe_engine_default_parameters() call. | ||
| 19 | |||
| 20 | =head1 STRING OVERLOADING | ||
| 21 | |||
| 22 | none | ||
| 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 | use VM::EC2::DB::Parameter; | ||
| 47 | |||
| 48 | sub valid_fields { | ||
| 49 | my $self = shift; | ||
| 50 | return qw(DBParameterGroupFamily Parameters); | ||
| 51 | } | ||
| 52 | |||
| 53 | sub Parameters { | ||
| 54 | my $self = shift; | ||
| 55 | my $params = $self->SUPER::Parameters; | ||
| 56 | return unless $params; | ||
| 57 | $params = $params->{Parameter}; | ||
| 58 | return ref $params eq 'HASH' ? | ||
| 59 | (VM::EC2::DB::Parameter->new($params,$self->aws)) : | ||
| 60 | map { VM::EC2::DB::Parameter->new($_,$self->aws) } @$params; | ||
| 61 | } | ||
| 62 | |||
| 63 | 1; |