« blib/lib/VM/EC2/ReservedInstance/Modification/Configuration.pm
↑ Summary
blib/lib/VM/EC2/ReservedInstance/Offering.pm »
| 1 | package VM::EC2::ReservedInstance::Modification::Result; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | VM::EC2::ReservedInstance::Modification::Result - Object describing an Amazon | ||
| 6 | EC2 reserved instance listing modification result | ||
| 7 | |||
| 8 | =head1 SYNOPSIS | ||
| 9 | |||
| 10 | use VM::EC2; | ||
| 11 | |||
| 12 | $ec2 = VM::EC2->new(...); | ||
| 13 | @mods = $ec2->describe_reserved_instances_modifications(); | ||
| 14 | for my $m (@mods) { | ||
| 15 | print $m->modificationResult,"\n"; | ||
| 16 | } | ||
| 17 | |||
| 18 | =head1 DESCRIPTION | ||
| 19 | |||
| 20 | This object represents an Amazon EC2 reserved instance modification result, | ||
| 21 | returned by VM::EC2->describe_reserved_instances_modifications(). | ||
| 22 | |||
| 23 | =head1 METHODS | ||
| 24 | |||
| 25 | These object methods are supported: | ||
| 26 | |||
| 27 | reservedInstancesId -- The ID of the reserved instance | ||
| 28 | |||
| 29 | targetConfiguration -- The configuration of the reserved instance | ||
| 30 | |||
| 31 | =head1 STRING OVERLOADING | ||
| 32 | |||
| 33 | When used in a string context, this object will interpolate the | ||
| 34 | reservedInstancesModificationId | ||
| 35 | |||
| 36 | =head1 SEE ALSO | ||
| 37 | |||
| 38 | L<VM::EC2> | ||
| 39 | L<VM::EC2::Generic> | ||
| 40 | |||
| 41 | =head1 AUTHOR | ||
| 42 | |||
| 43 | Lance Kinley E<lt>lkinley@loyaltymethods.com<gt>. | ||
| 44 | |||
| 45 | Copyright (c) 2014 Loyalty Methods, Inc. | ||
| 46 | |||
| 47 | This package and its accompanying libraries is free software; you can | ||
| 48 | redistribute it and/or modify it under the terms of the GPL (either | ||
| 49 | version 1, or at your option, any later version) or the Artistic | ||
| 50 | License 2.0. Refer to LICENSE for the full license text. In addition, | ||
| 51 | please see DISCLAIMER.txt for disclaimers of warranty. | ||
| 52 | |||
| 53 | =cut | ||
| 54 | |||
| 55 | use strict; | ||
| 56 | use base 'VM::EC2::Generic'; | ||
| 57 | use VM::EC2::ReservedInstance::Modification::Configuration; | ||
| 58 | |||
| 59 | use overload | ||
| 60 | '""' => sub { | ||
| 61 | my $self = shift; | ||
| 62 | return $self->reservedInstancesId}, | ||
| 63 | fallback => 1; | ||
| 64 | |||
| 65 | sub valid_fields { | ||
| 66 | my $self = shift; | ||
| 67 | return qw(reservedInstancesId targetConfiguration); | ||
| 68 | } | ||
| 69 | |||
| 70 | sub targetConfiguration { | ||
| 71 | my $self = shift; | ||
| 72 | my $tc = $self->SUPER::targetConfiguration or return; | ||
| 73 | |||
| 74 | return VM::EC2::ReservedInstance::Modification::Configuration->new($tc,$self->aws,$self->xmlns,$self->requestId); | ||
| 75 | } | ||
| 76 | |||
| 77 | 1; |