C# Class Amazon.EC2.Util.EC2Metadata

EC2 Instance Metadata.

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

Mostrar archivo Open project: aws/aws-sdk-net Class Usage Examples

Public Methods

Method Description
GetData ( string path ) : string

Return the metadata at the path

GetData ( string path, int tries ) : string

Return the metadata at the path

GetItems ( string path ) : IEnumerable

Return the list of items in the metadata at path.

GetItems ( string path, int tries ) : IEnumerable

Return the list of items in the metadata at path.

Private Methods

Method Description
FetchData ( string path ) : string
FetchData ( string path, bool force ) : string
GetItems ( string path, int tries, bool slurp ) : List
PauseExponentially ( int tries ) : void

Method Details

GetData() public static method

Return the metadata at the path
public static GetData ( string path ) : string
path string Path at which to query the metadata
return string

GetData() public static method

Return the metadata at the path
public static GetData ( string path, int tries ) : string
path string Path at which to query the metadata
tries int Number of attempts to make
return string

GetItems() public static method

Return the list of items in the metadata at path.
public static GetItems ( string path ) : IEnumerable
path string Path at which to query the metadata
return IEnumerable

GetItems() public static method

Return the list of items in the metadata at path.
public static GetItems ( string path, int tries ) : IEnumerable
path string Path at which to query the metadata
tries int Number of attempts to make
return IEnumerable