AWS SDK for .NET Documentation
EC2Metadata Class
AmazonAmazon.EC2.UtilEC2Metadata Did this page help you?   Yes   No    Tell us about it...
EC2 Instance Metadata.
Declaration Syntax
C#
public static class EC2Metadata
Members
All MembersMethodsProperties



IconMemberDescription
AmiId
The AMI ID used to launch the instance.

AmiLaunchIndex
The index of this instance in the reservation.

AmiManifestPath
The manifest path of the AMI with which the instance was launched.

AncestorAmiIds
The AMI IDs of any instances that were rebundled to create this AMI. Will only exist if the AMI manifest file contained an ancestor-amis key.

AvailabilityZone
The Availability Zone in which the instance launched.

BlockDeviceMapping
The virtual devices associated with the ami, root, ebs, and swap.

GetData(String)
Return the metadata at the path

GetData(String, Int32)
Return the metadata at the path

GetItems(String)
Return the list of items in the metadata at path.

GetItems(String, Int32)
Return the list of items in the metadata at path.

Hostname
The private hostname of the instance. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0).

IAMInstanceProfileInfo
Returns information about the last time the instance profile was updated, including the instance's LastUpdated date, InstanceProfileArn, and InstanceProfileId.

IAMSecurityCredentials
Returns the temporary security credentials (AccessKeyId, SecretAccessKey, SessionToken, and Expiration) associated with the IAM roles on the instance.

InstanceAction
Notifies the instance that it should reboot in preparation for bundling. Valid values: none | shutdown | bundle-pending.

InstanceId
The ID of this instance.

InstanceType
The type of instance.

KernelId
The ID of the kernel launched with this instance, if applicable.

LocalHostname
The local hostname of the instance. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which device-number is 0).

MacAddress
The instance's MAC address. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which device-number is 0).

NetworkInterfaces
The network interfaces on the instance.

PrivateIpAddress
The private IP address of the instance. In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which device-number is 0).

ProductCodes
Product codes associated with the instance, if any.

PublicKey
Public key. Only available if supplied at instance launch time.

RamdiskId
The ID of the RAM disk specified at launch time, if applicable.

ReservationId
ID of the reservation.

SecurityGroups
The names of the security groups applied to the instance.

UserData
The metadata sent to the instance.

Remarks

Amazon EC2 instances can access instance-specific metadata, as well as data supplied when launching the instances, using a specific URI.

You can use this data to build more generic AMIs that can be modified by configuration files supplied at launch time. For example, if you run web servers for various small businesses, they can all use the same AMI and retrieve their content from the Amazon S3 bucket you specify at launch. To add a new customer at any time, simply create a bucket for the customer, add their content, and launch your AMI.

More information about EC2 Metadata http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html

Inheritance Hierarchy
Object
EC2Metadata

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)