Documentation ¶
Index ¶
Constants ¶
View Source
const ( // The EC2 metadata service URL for the instance identity document. IdentityDocumentURL = "http://169.254.169.254/latest/dynamic/instance-identity/document" // The EC2 metadata service URL for the instance identity document signature (RSA SHA256). IdentitySignatureURL = "http://169.254.169.254/latest/dynamic/instance-identity/signature" )
View Source
const ( // AWSRSAIdentityCert is the RSA public certificate AWSRSAIdentityCert = `` /* 1146-byte string literal not displayed */ )
Variables ¶
View Source
var ( // RSACert AWS Public Certificate RSACert *x509.Certificate )
Functions ¶
func GetLocalInstanceDocument ¶
func GetLocalInstanceDocument() []byte
GetLocalInstanceDocument returns the instance identity document from the EC2 metadata service.
func GetLocalInstanceRegion ¶
func GetLocalInstanceRegion() string
func GetLocalInstanceSignature ¶
func GetLocalInstanceSignature() []byte
GetLocalInstanceDocument returns the signature for the instance identity document from the EC2 metadata service.
Types ¶
type Document ¶
type Document struct { AvailabilityZone string `json:"availabilityZone"` Region string `json:"region"` InstanceId string `json:"instanceId"` AccountId string `json:"accountId"` InstanceType string `json:"instanceType"` ImageId string `json:"imageId"` }
A Document provides a struct for EC2 instance identity documents to be unmarshaled.
Click to show internal directories.
Click to hide internal directories.