1VM::EC2::Tag(3) User Contributed Perl Documentation VM::EC2::Tag(3)
2
3
4
6 VM::EC2::Tag -- Object describing a tagged Amazon EC2 resource
7
9 use VM::EC2;
10
11 $ec2 = VM::EC2->new(...);
12 @tags = $ec2->describe_tags(-filter=> {'resource-type'=>'volume'});
13 for my $t (@tags) {
14 $id = $t->resourceId;
15 $type = $t->resourceType;
16 $key = $t->key;
17 $value = $t->value;
18 }
19
21 This object is used to describe an Amazon EC2 tag. Each object contains
22 information about the resource it is tagging, the tag key, and the tag
23 value. Tags are returned by the VM::EC2->describe_tags() method.
24
25 In most cases you will not want to work with this object directly, but
26 instead read tags by calling a resource object's tags() method, which
27 returns a hash of key value pairs, or specify particular tag values as
28 one of the filters in a describe_*() call.
29
31 The following object methods are supported:
32
33 resourceId -- The ID of the resource being tagged.
34 resourceType -- The type of the resource being tagged e.g. "image"
35 key -- The tag key.
36 value -- The tag value.
37
39 When used in a string context, this object will interpolate the
40 resourceId.
41
43 VM::EC2 VM::EC2::Generic
44
46 Lincoln Stein <lincoln.stein@gmail.com>.
47
48 Copyright (c) 2011 Ontario Institute for Cancer Research
49
50 This package and its accompanying libraries is free software; you can
51 redistribute it and/or modify it under the terms of the GPL (either
52 version 1, or at your option, any later version) or the Artistic
53 License 2.0. Refer to LICENSE for the full license text. In addition,
54 please see DISCLAIMER.txt for disclaimers of warranty.
55
56
57
58perl v5.34.0 2021-07-27 VM::EC2::Tag(3)