imageId -- ID of AMI used to launch this instance imageLaunchIndex -- This indexs launch index. If four instances were launched by one $image->run_instances() call, they will be numbered from 0 to 3. amiManifestPath -- S3 path to the image imageLocation -- Same as amiManifestPath(), for consistency with VM::EC2::Image
|Launch and runtime information:||
instanceId -- ID of this instance kernelId -- ID of this instances kernel. ramdiskId -- This instances ramdisk ID reservationId -- This instances reservation ID instanceType -- Machine type, e.g. "m1.small" availabilityZone -- This instances availability zone. region -- This instances region. endpoint -- This instances endpoint. userData -- User data passed at launch time.
localHostname -- The instance hostname corresponding to its internal EC2 IP address. privateDnsName -- Same as localHostname(), for consistency with VM::EC2::Instance localIpv4 -- The instance IP address on the internal EC2 network. privateIpAddress -- Same as localIpv4(), for consistency with VM::EC2::Instance. mac -- This instances MAC (ethernet) address. publicHostname -- This instances public hostname. dnsName -- Same as publicHostname() for consistency with VM::EC2::Instance. publicIpv4 -- This instances public IP address. ipAddress -- Same as publicIpv4() for consistency with VM::EC2::Instance.
These routines return information about the instances IAM role, if
any. These calls also provide a temporary security credentials for
making EC2 calls, as described here:
profile -- An undocumented field that contains the virtualization type in the form "default-paravirtual". instanceAction -- Undocumented metadata field named "instance-action"
The following methods all return lists.
Image information ancestorAmiIds -- List of AMIs from which the current one was derived imageAncestorIds -- Same as ancestorAmiIds() but easier to read. productCodes -- List of product codes applying to the image from which this instance was launched. Launch and runtime information securityGroups -- List of security groups to which this instance is assigned. For non-VPC instances, this will be the security group name. For VPC instances, this will be the security group ID. publicKeys -- List of public key pair names attached to this instance.
The following methods return a hashref for representing complex data structures:
$devices = $meta->blockDeviceMapping This returns a hashref in which the keys are the names of instance block devices, such as /dev/sda1, and the values are the EC2 virtual machine names. For example:
x $meta->blockDeviceMapping 0 HASH(0x9b4f2f8) /dev/sda1 => root /dev/sda2 => ephemeral0 /dev/sdg => ebs1 /dev/sdh => ebs9 /dev/sdi => ebs10 sda3 => swap
For reasons that are not entirely clear, the swap device is reported as sda3 rather than as /dev/sda3.
$interfaces = $meta->interfaces Returns a mapping of all virtual ethernet devices owned by this instance. This is primarily useful for VPC instances, which can have more than one device. The hash keys are the MAC addresses of each ethernet device, and the values are hashes that have the following keys:
mac localHostname localIpv4s (an array ref) publicIpv4s (an array ref) securityGroupIds (an array ref) subnetId subnetIpv4CidrBlock vpcId vpcIpv4CidrBlock
D x $meta->interfaces 0 HASH(0x9b4f518) 12:31:38:01:b8:97 => HASH(0x9eaa090) localHostname => domU-12-31-38-01-B8-97.compute-1.internal localIpv4s => ARRAY(0x9b4f8a8) 0 10.253.191.101 mac => 12:31:38:01:b8:97 publicIpv4s => ARRAY(0x9ea9e40) 0 22.214.171.124 securityGroupIds => ARRAY(0x9eaa490) empty array subnetId => undef subnetIpv4CidrBlock => undef vpcId => undef vpcIpv4CidrBlock => undef
VM::EC2 VM::EC2::Generic VM::EC2::BlockDevice VM::EC2::State::Reason VM::EC2::State VM::EC2::Instance VM::EC2::Tag
Lincoln Stein <firstname.lastname@example.org>.
Copyright (c) 2011 Ontario Institute for Cancer Research
This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty.
|perl v5.20.3||VM::EC2::INSTANCE::METADATA (3)||2016-04-03|