C# 클래스 Amazon.Util.EC2InstanceMetadata

Provides access to EC2 instance metadata when running on an EC2 instance.

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

파일 보기 프로젝트 열기: aws/aws-sdk-net 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
EC2_METADATA_SVC string

공개 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
FetchData ( string path ) : string
FetchData ( string path, bool force ) : string
GetItems ( string relativeOrAbsolutePath, int tries, bool slurp ) : List
PauseExponentially ( int tries ) : void

메소드 상세

GetData() 공개 정적인 메소드

Return the metadata at the path
public static GetData ( string path ) : string
path string Path at which to query the metadata; may be relative or absolute.
리턴 string

GetData() 공개 정적인 메소드

Return the metadata at the path
public static GetData ( string path, int tries ) : string
path string Path at which to query the metadata; may be relative or absolute.
tries int Number of attempts to make
리턴 string

GetItems() 공개 정적인 메소드

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; may be relative or absolute.
리턴 IEnumerable

GetItems() 공개 정적인 메소드

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; may be relative or absolute.
tries int Number of attempts to make
리턴 IEnumerable

프로퍼티 상세

EC2_METADATA_SVC 공개적으로 정적으로 프로퍼티

public static string EC2_METADATA_SVC
리턴 string