Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EC2Metadata ¶
type EC2Metadata struct { AvailabilityZone string `json:"availabilityZone"` InstanceType string `json:"instanceType"` InstanceID string `json:"instanceId"` ImageID string `json:"imageId"` AccountID string `json:"accountId"` Region string `json:"region"` Architecture string `json:"architecture"` // In SFX the dimension/property key is "AWSUniqueId" this struct field is // named AWSUniqueID to satisfy golint AWSUniqueID string }
EC2Metadata contains metadata about an ec2 instance
func Get ¶
func Get() (*EC2Metadata, error)
Get returns a map with aws metadata including the AWSUniqueID
func GetWithIdentityURL ¶
func GetWithIdentityURL(url string) (*EC2Metadata, error)
GetWithIdentityURL returns a map with aws metadata including AWSUniqueID
func (*EC2Metadata) GetAWSUniqueID ¶
func (e *EC2Metadata) GetAWSUniqueID() (string, error)
GetAWSUniqueID returns the AWSUniqueId from the collected EC2Metadata Please note that the dimension/property used in SFX is named "AWSUniqueId" and not AWSUniqueID. This function is named in order to satisfy golint demands
func (*EC2Metadata) ToStringMap ¶
func (e *EC2Metadata) ToStringMap() map[string]string
ToStringMap returns the ec2 metadata as a string map
Click to show internal directories.
Click to hide internal directories.