1package VM::EC2::DB::Engine::Defaults;
2
3=head1 NAME
4
5VM::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
17This object represents database engine parameter defaults.  It is returned
18by a VM::EC2->describe_engine_default_parameters() call.
19
20=head1 STRING OVERLOADING
21
22none
23
24=head1 SEE ALSO
25
26L<VM::EC2>
27L<VM::EC2::Generic>
28L<VM::EC2::DB::Instance>
29
30=head1 AUTHOR
31
32Lance Kinley E<lt>lkinley@loyaltymethods.comE<gt>.
33
34Copyright (c) 2013 Loyalty Methods, Inc.
35
36This package and its accompanying libraries is free software; you can
37redistribute it and/or modify it under the terms of the GPL (either
38version 1, or at your option, any later version) or the Artistic
39License 2.0.  Refer to LICENSE for the full license text. In addition,
40please see DISCLAIMER.txt for disclaimers of warranty.
41
42=cut
43
44use strict;
45use base 'VM::EC2::Generic';
46use VM::EC2::DB::Parameter;
47
48sub valid_fields {
49    my $self = shift;
50    return qw(DBParameterGroupFamily Parameters);
51}
52
53sub 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
631;
64