1VM::EC2::Instance::StatUusseIrteCmo(n3t)ributed Perl DocVuMm:e:nEtCa2t:i:oInnstance::StatusItem(3)
2
3
4
6 VM::EC2::Instance::StatusItem - Object describing a instance status
7 event
8
10 @status_items = $ec2->describe_instance_status();
11 for my $i (@status_items) {
12 print $i->instance_id,
13 ': instance check=',$i->instance_status,
14 ', system check=',$i->system_status,"\n";
15 if (my $e = $i->events) {
16 print $i->instance_id,' event = ',$e;
17 }
18 }
19
21 This object represents an instance status returned by
22 $ec2->describe_instance_status().
23
25 These object methods are supported:
26
27 instanceId -- The ID of the affected instance.
28 instance -- The VM::EC2::Instance object
29 availabilityZone -- The availability zone of this instance.
30 events -- A list of VM::EC2::Instance::Status::Event objects
31 representing a scheduled maintenance events on this
32 instance (see note).
33 instanceState -- The state of this instance (e.g. "running")
34 systemStatus -- A VM::EC2::Instance::Status object indicating the
35 status of the system check.
36 instanceStatus -- A VM::EC2::Instance::Status object indicating the
37 status of the instance availability check.
38
39 NOTE: There is an inconsistency in the AWS documentation for this data
40 type. The events field is documented as being a list, but the examples
41 shown return a single object. At release time, I was unable to verify
42 which is correct and have written the code such that it will always
43 return a list, which may be single elementin length.
44
45 In a string context, this object will interpolate as:
46
47 "$instanceId: XX/2 tests passed"
48
49 where XX is the number of checks that passed.
50
51 In the case of an instance that is not running, the interpolation will
52 be:
53
54 "$instanceId: $state"
55
56 Where $state is the state of the instance (e.g. "stopped").
57
59 VM::EC2 VM::EC2::Generic VM::EC2::Instance VM::EC2::Tag
60
62 Lincoln Stein <lincoln.stein@gmail.com>.
63
64 Copyright (c) 2012 Ontario Institute for Cancer Research
65
66 This package and its accompanying libraries is free software; you can
67 redistribute it and/or modify it under the terms of the GPL (either
68 version 1, or at your option, any later version) or the Artistic
69 License 2.0. Refer to LICENSE for the full license text. In addition,
70 please see DISCLAIMER.txt for disclaimers of warranty.
71
72
73
74perl v5.34.0 2022-01-21 VM::EC2::Instance::StatusItem(3)