Registry / cloud / aws-aws-sdk-go-v2-feature-ec2-imds

aws-aws-sdk-go-v2-feature-ec2-imds

JSON →
library1.18.29gogounverified

Package imds provides the API client for interacting with the Amazon EC2 Instance Metadata Service.

go get github.com/aws/aws-sdk-go-v2/feature/ec2/imds
INSTALL
IMPORT
SIG · AWS-AWS-SDK-GO-V2-
A
aws-aws-sdk-go-v2-feature-ec2-imds
cloudgov1.18.29
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

imds
github.com/aws/aws-sdk-go-v2/feature/ec2/imds

Create an IMDS client and retrieve the instance identity document.

package main import ( "context" "fmt" "log" "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" ) func main() { client := imds.New(imds.Options{}) identity, err := client.GetInstanceIdentityDocument(context.TODO(), &imds.GetInstanceIdentityDocumentInput{}) if err != nil { log.Fatal(err) } fmt.Printf("Region: %s\n", identity.InstanceIdentityDocument.Region) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.18.29latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
24
Resources
aws-aws-sdk-go-v2-feature-ec2-imds — go get aws-aws-sdk-go-v2-feature-ec2-imds · libregistry