| 1 | package VM::EC2::Volume::Status::Action; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | VM::EC2::Volume::Status::Action - Object describing a scheduled volume maintenance event | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | @status_items = $ec2->describe_volume_status(); | ||
| 10 | for my $i (@status_items) { | ||
| 11 | for my $event ($i->events) { | ||
| 12 | print $i->volume_id,': ', | ||
| 13 | $event->code,' ', | ||
| 14 | $event->type, ' ', | ||
| 15 | $event->description,"\n"; | ||
| 16 | } | ||
| 17 | } | ||
| 18 | |||
| 19 | =head1 DESCRIPTION | ||
| 20 | |||
| 21 | This objects reflects the actions you may have to take in response to | ||
| 22 | a volume event, as described at: | ||
| 23 | |||
| 24 | http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeVolumeStatus.html | ||
| 25 | |||
| 26 | =head1 METHODS | ||
| 27 | |||
| 28 | code -- The code identifying the action. | ||
| 29 | |||
| 30 | eventType -- The ID of the action. | ||
| 31 | |||
| 32 | description -- A description of the action. | ||
| 33 | |||
| 34 | type -- Alias for eventType | ||
| 35 | |||
| 36 | id -- Alias for eventId | ||
| 37 | |||
| 38 | When used in a string context, this object interpolates as a string | ||
| 39 | using the action code. | ||
| 40 | |||
| 41 | =head1 SEE ALSO | ||
| 42 | |||
| 43 | L<VM::EC2> | ||
| 44 | L<VM::EC2::Generic> | ||
| 45 | L<VM::EC2::Volume> | ||
| 46 | L<VM::EC2::Volume::Status> | ||
| 47 | L<VM::EC2::Volume::StatusItem> | ||
| 48 | L<VM::EC2::Volume::Status::Details> | ||
| 49 | L<VM::EC2::Tag> | ||
| 50 | |||
| 51 | =head1 AUTHOR | ||
| 52 | |||
| 53 | Lincoln Stein E<lt>lincoln.stein@gmail.comE<gt>. | ||
| 54 | |||
| 55 | Copyright (c) 2012 Ontario Institute for Cancer Research | ||
| 56 | |||
| 57 | This package and its accompanying libraries is free software; you can | ||
| 58 | redistribute it and/or modify it under the terms of the GPL (either | ||
| 59 | version 1, or at your option, any later version) or the Artistic | ||
| 60 | License 2.0. Refer to LICENSE for the full license text. In addition, | ||
| 61 | please see DISCLAIMER.txt for disclaimers of warranty. | ||
| 62 | |||
| 63 | =cut | ||
| 64 | |||
| 65 | use strict; | ||
| 66 | use base 'VM::EC2::Generic'; | ||
| 67 | |||
| 68 | use strict; | ||
| 69 | |||
| 70 | sub valid_fields { | ||
| 71 | my $self = shift; | ||
| 72 | return qw(code eventType eventId description); | ||
| 73 | } | ||
| 74 | |||
| 75 | sub type {shift->eventType} | ||
| 76 | sub id {shift->eventId} | ||
| 77 | sub short_name { | ||
| 78 | my $self = shift; | ||
| 79 | return $self->code; | ||
| 80 | } | ||
| 81 | |||
| 82 | 1; | ||
| 83 |