Version: v3.3.45 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 6 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL