Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client defines the client for interacting with the Amazon EC2 Instance Metadata Service (IMDS)
func NewFromAPI ¶
NewFromAPI returns a new client from the provided IMDS API implementation
type ClientAPI ¶
type ClientAPI interface { // GetMetadata uses the path provided to request information from the Amazon // EC2 Instance Metadata Service GetMetadata(ctx context.Context, params *awsimds.GetMetadataInput, optFns ...func(*awsimds.Options)) (*awsimds.GetMetadataOutput, error) }
ClientAPI defines the API for interacting with the Amazon EC2 Instance Metadata Service (IMDS)
type Metadata ¶
type Metadata struct { // IPv4 is the private IPv4 address of the launched instance IPv4 string // Region of where the EC2 instance was launched Region string // VPC ID of where the EC2 instance was launched VPC string // AZ is the availability zone where the instance was launched AZ string // InstanceID is the unique ID of this instance InstanceID string // Name associated with the EC2 instance. This will be blank unless // tags have been enabled within IMDS for this EC2 instance Name string // Tags contains a map of all tags associated with the EC2 instance Tags map[string]string }
Metadata contains metadata associated with an EC2 instance
Click to show internal directories.
Click to hide internal directories.