VM::EC2::Instance::StatusItem3pm
Object describing a instance status event
Usage
@status_items = $ec2->describe_instance_status();for my $i (@status_items) {print $i->instance_id,': instance check=',$i->instance_status,', system check=',$i->system_status,"\n";if (my $e = $i->events) {print $i->instance_id,' event = ',$e;}}
Overview
This object represents an instance status returned by $ec2->describe_instance_status().
Methods
These object methods are supported:
instanceId -- The ID of the affected instance.instance -- The VM::EC2::Instance objectavailabilityZone -- The availability zone of this instance.events -- A list of VM::EC2::Instance::Status::Event objectsrepresenting a scheduled maintenance events on thisinstance (see note).instanceState -- The state of this instance (e.g. "running")systemStatus -- A VM::EC2::Instance::Status object indicating thestatus of the system check.instanceStatus -- A VM::EC2::Instance::Status object indicating thestatus of the instance availability check.
NOTE: There is an inconsistency in the AWS documentation for this data type. The events field is documented as being a list, but the examples shown return a single object. At release time, I was unable to verify which is correct and have written the code such that it will always return a list, which may be single elementin length.
In a string context, this object will interpolate as:
"$instanceId: XX/2 tests passed"
where XX is the number of checks that passed.
In the case of an instance that is not running, the interpolation will be:
"$instanceId: $state"
Where $state is the state of the instance (e.g. "stopped").
Releases
6 releases since Debian 8 (Jessie); the text changed 3 times.