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