| 1 | package VM::EC2::Instance::IamProfile; | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | VM::EC2::Instance::IamProfile - Object describing an Amazon EC2 Identity Access Management profile | ||
| 6 | |||
| 7 | =head1 SYNOPSIS | ||
| 8 | |||
| 9 | use VM::EC2; | ||
| 10 | |||
| 11 | $ec2 = VM::EC2->new(...); | ||
| 12 | my $instance = $ec2->describe_instances('i-123456'); | ||
| 13 | my $profile = $instance->iamInstanceProfile; | ||
| 14 | print $profile->arn,"\n"; | ||
| 15 | print $profile->id,"\n"; | ||
| 16 | |||
| 17 | =head1 DESCRIPTION | ||
| 18 | |||
| 19 | This object represents an Amazon IAM profile associated with an instance. | ||
| 20 | |||
| 21 | =head1 METHODS | ||
| 22 | |||
| 23 | These object methods are supported: | ||
| 24 | |||
| 25 | arn The Amazon resource name (ARN) of the IAM Instance Profile (IIP) | ||
| 26 | associated with the instance. | ||
| 27 | id The ID of the IIP associated with the instance. | ||
| 28 | |||
| 29 | =head1 STRING OVERLOADING | ||
| 30 | |||
| 31 | When used in a string context, this object will interpolate the | ||
| 32 | arn. | ||
| 33 | |||
| 34 | =head1 SEE ALSO | ||
| 35 | |||
| 36 | L<VM::EC2> | ||
| 37 | L<VM::EC2::Generic> | ||
| 38 | |||
| 39 | =head1 AUTHOR | ||
| 40 | |||
| 41 | Lincoln Stein E<lt>lincoln.stein@gmail.comE<gt>. | ||
| 42 | |||
| 43 | Copyright (c) 2011 Ontario Institute for Cancer Research | ||
| 44 | |||
| 45 | This package and its accompanying libraries is free software; you can | ||
| 46 | redistribute it and/or modify it under the terms of the GPL (either | ||
| 47 | version 1, or at your option, any later version) or the Artistic | ||
| 48 | License 2.0. Refer to LICENSE for the full license text. In addition, | ||
| 49 | please see DISCLAIMER.txt for disclaimers of warranty. | ||
| 50 | |||
| 51 | =cut | ||
| 52 | |||
| 53 | use strict; | ||
| 54 | use base 'VM::EC2::Generic'; | ||
| 55 | |||
| 56 | sub short_name {shift->arn}; | ||
| 57 | |||
| 58 | sub valid_fields { | ||
| 59 | my $self = shift; | ||
| 60 | return qw(arn id); | ||
| 61 | } | ||
| 62 | |||
| 63 | 1; |