Documentation ¶
Overview ¶
Package awsutils is a utility package for calling EC2 or IMDS
Code generated by go generate; DO NOT EDIT. This file was generated at 2022-09-21T13:34:09-07:00
The regions queried were: - ap-northeast-1 - ap-northeast-2 - ap-northeast-3 - ap-south-1 - ap-southeast-1 - ap-southeast-2 - ca-central-1 - eu-central-1 - eu-north-1 - eu-west-1 - eu-west-2 - eu-west-3 - sa-east-1 - us-east-1 - us-east-2 - us-west-1 - us-west-2
Index ¶
- Constants
- Variables
- func CheckAPIErrorAndBroadcastEvent(err error, api string)
- func IsNotFound(err error) bool
- type APIs
- type DescribeAllENIsResult
- type EC2InstanceMetadataCache
- func (cache *EC2InstanceMetadataCache) AllocENI(useCustomCfg bool, sg []*string, subnet string) (string, error)
- func (cache *EC2InstanceMetadataCache) AllocIPAddress(eniID string) error
- func (cache *EC2InstanceMetadataCache) AllocIPAddresses(eniID string, numIPs int) (*ec2.AssignPrivateIpAddressesOutput, error)
- func (cache *EC2InstanceMetadataCache) AllocIPv6Prefixes(eniID string) ([]*string, error)
- func (cache *EC2InstanceMetadataCache) DeallocIPAddresses(eniID string, ips []string) error
- func (cache *EC2InstanceMetadataCache) DeallocPrefixAddresses(eniID string, prefixes []string) error
- func (cache *EC2InstanceMetadataCache) DescribeAllENIs() (DescribeAllENIsResult, error)
- func (cache *EC2InstanceMetadataCache) FetchInstanceTypeLimits() error
- func (cache *EC2InstanceMetadataCache) FreeENI(eniName string) error
- func (cache *EC2InstanceMetadataCache) GetAttachedENIs() (eniList []ENIMetadata, err error)
- func (cache *EC2InstanceMetadataCache) GetENIIPv4Limit() int
- func (cache *EC2InstanceMetadataCache) GetENILimit() int
- func (cache *EC2InstanceMetadataCache) GetIPv4PrefixesFromEC2(eniID string) (addrList []*ec2.Ipv4PrefixSpecification, err error)
- func (cache *EC2InstanceMetadataCache) GetIPv4sFromEC2(eniID string) (addrList []*ec2.NetworkInterfacePrivateIpAddress, err error)
- func (cache *EC2InstanceMetadataCache) GetIPv6PrefixesFromEC2(eniID string) (addrList []*ec2.Ipv6PrefixSpecification, err error)
- func (cache *EC2InstanceMetadataCache) GetInstanceHypervisorFamily() string
- func (cache *EC2InstanceMetadataCache) GetInstanceID() string
- func (cache *EC2InstanceMetadataCache) GetInstanceType() string
- func (cache *EC2InstanceMetadataCache) GetLocalIPv4() net.IP
- func (cache *EC2InstanceMetadataCache) GetPrimaryENI() string
- func (cache *EC2InstanceMetadataCache) GetPrimaryENImac() string
- func (cache *EC2InstanceMetadataCache) GetVPCIPv4CIDRs() ([]string, error)
- func (cache *EC2InstanceMetadataCache) GetVPCIPv6CIDRs() ([]string, error)
- func (cache *EC2InstanceMetadataCache) InitCachedPrefixDelegation(enablePrefixDelegation bool)
- func (cache *EC2InstanceMetadataCache) IsCNIUnmanagedENI(eniID string) bool
- func (cache *EC2InstanceMetadataCache) IsInstanceBareMetal() bool
- func (cache *EC2InstanceMetadataCache) IsPrefixDelegationSupported() bool
- func (cache *EC2InstanceMetadataCache) IsPrimaryENI(eniID string) bool
- func (cache *EC2InstanceMetadataCache) IsUnmanagedENI(eniID string) bool
- func (cache *EC2InstanceMetadataCache) RefreshSGIDs(mac string) error
- func (cache *EC2InstanceMetadataCache) SetCNIUnmanagedENIs(eniID []string) error
- func (cache *EC2InstanceMetadataCache) SetUnmanagedENIs(eniIDs []string)
- func (cache *EC2InstanceMetadataCache) TagENI(eniID string, currentTags map[string]string) error
- func (cache *EC2InstanceMetadataCache) WaitForENIAndIPsAttached(eni string, wantedCidrs int) (eniMetadata ENIMetadata, err error)
- type EC2MetadataIface
- type ENIMetadata
- type FakeIMDS
- type InstanceTypeLimits
- type StringSet
- type TagMap
- type TypedIMDS
- func (imds TypedIMDS) GetAZ(ctx context.Context) (string, error)
- func (imds TypedIMDS) GetDeviceNumber(ctx context.Context, mac string) (int, error)
- func (imds TypedIMDS) GetIPv4Prefixes(ctx context.Context, mac string) ([]net.IPNet, error)
- func (imds TypedIMDS) GetIPv6Prefixes(ctx context.Context, mac string) ([]net.IPNet, error)
- func (imds TypedIMDS) GetIPv6s(ctx context.Context, mac string) ([]net.IP, error)
- func (imds TypedIMDS) GetInstanceID(ctx context.Context) (string, error)
- func (imds TypedIMDS) GetInstanceType(ctx context.Context) (string, error)
- func (imds TypedIMDS) GetInterfaceID(ctx context.Context, mac string) (string, error)
- func (imds TypedIMDS) GetLocalIPv4(ctx context.Context) (net.IP, error)
- func (imds TypedIMDS) GetLocalIPv4s(ctx context.Context, mac string) ([]net.IP, error)
- func (imds TypedIMDS) GetMAC(ctx context.Context) (string, error)
- func (imds TypedIMDS) GetMACs(ctx context.Context) ([]string, error)
- func (imds TypedIMDS) GetSecurityGroupIDs(ctx context.Context, mac string) ([]string, error)
- func (imds TypedIMDS) GetSubnetID(ctx context.Context, mac string) (string, error)
- func (imds TypedIMDS) GetSubnetIPv4CIDRBlock(ctx context.Context, mac string) (net.IPNet, error)
- func (imds TypedIMDS) GetSubnetIPv6CIDRBlocks(ctx context.Context, mac string) (net.IPNet, error)
- func (imds TypedIMDS) GetVPCIPv4CIDRBlocks(ctx context.Context, mac string) ([]net.IPNet, error)
- func (imds TypedIMDS) GetVPCIPv6CIDRBlocks(ctx context.Context, mac string) ([]net.IPNet, error)
Constants ¶
const (
// UnknownInstanceType indicates that the instance type is not yet supported
UnknownInstanceType = "vpc ip resource(eni ip limit): unknown instance type"
)
Variables ¶
var ( // ErrENINotFound is an error when ENI is not found. ErrENINotFound = errors.New("ENI is not found") // ErrAllSecondaryIPsNotFound is returned when not all secondary IPs on an ENI have been assigned ErrAllSecondaryIPsNotFound = errors.New("All secondary IPs not found") // ErrNoSecondaryIPsFound is returned when not all secondary IPs on an ENI have been assigned ErrNoSecondaryIPsFound = errors.New("No secondary IPs have been assigned to this ENI") // ErrNoNetworkInterfaces occurs when DescribeNetworkInterfaces(eniID) returns no network interfaces ErrNoNetworkInterfaces = errors.New("No network interfaces found for ENI") )
var InstanceNetworkingLimits = map[string]InstanceTypeLimits{}/* 571 elements not displayed */
InstanceNetworkingLimits contains a mapping from instance type to networking limits for the type. Documentation found at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI
Functions ¶
func CheckAPIErrorAndBroadcastEvent ¶ added in v1.11.3
func IsNotFound ¶ added in v1.8.0
IsNotFound returns true if the error was caused by an AWS API 404 response.
Types ¶
type APIs ¶
type APIs interface { // AllocENI creates an ENI and attaches it to the instance AllocENI(useCustomCfg bool, sg []*string, subnet string) (eni string, err error) // FreeENI detaches ENI interface and deletes it FreeENI(eniName string) error // TagENI Tags ENI with current tags to contain expected tags. TagENI(eniID string, currentTags map[string]string) error // GetAttachedENIs retrieves eni information from instance metadata service GetAttachedENIs() (eniList []ENIMetadata, err error) // GetIPv4sFromEC2 returns the IPv4 addresses for a given ENI GetIPv4sFromEC2(eniID string) (addrList []*ec2.NetworkInterfacePrivateIpAddress, err error) // GetIPv4PrefixesFromEC2 returns the IPv4 prefixes for a given ENI GetIPv4PrefixesFromEC2(eniID string) (addrList []*ec2.Ipv4PrefixSpecification, err error) // GetIPv6PrefixesFromEC2 returns the IPv6 prefixes for a given ENI GetIPv6PrefixesFromEC2(eniID string) (addrList []*ec2.Ipv6PrefixSpecification, err error) // DescribeAllENIs calls EC2 and returns a fully populated DescribeAllENIsResult struct and an error DescribeAllENIs() (DescribeAllENIsResult, error) // AllocIPAddress allocates an IP address for an ENI AllocIPAddress(eniID string) error // AllocIPAddresses allocates numIPs IP addresses on a ENI AllocIPAddresses(eniID string, numIPs int) (*ec2.AssignPrivateIpAddressesOutput, error) // DeallocIPAddresses deallocates the list of IP addresses from a ENI DeallocIPAddresses(eniID string, ips []string) error // DeallocPrefixAddresses deallocates the list of IP addresses from a ENI DeallocPrefixAddresses(eniID string, ips []string) error //AllocIPv6Prefixes allocates IPv6 prefixes to the ENI passed in AllocIPv6Prefixes(eniID string) ([]*string, error) // GetVPCIPv4CIDRs returns VPC's IPv4 CIDRs from instance metadata GetVPCIPv4CIDRs() ([]string, error) // GetLocalIPv4 returns the primary IPv4 address on the primary ENI interface GetLocalIPv4() net.IP // GetVPCIPv6CIDRs returns VPC's IPv6 CIDRs from instance metadata GetVPCIPv6CIDRs() ([]string, error) // GetPrimaryENI returns the primary ENI GetPrimaryENI() string // GetENIIPv4Limit return IP address limit per ENI based on EC2 instance type GetENIIPv4Limit() int // GetENILimit returns the number of ENIs that can be attached to an instance GetENILimit() int // GetPrimaryENImac returns the mac address of the primary ENI GetPrimaryENImac() string // SetUnmanagedENIs sets the list of unmanaged ENI IDs SetUnmanagedENIs(eniIDs []string) // IsUnmanagedENI checks if an ENI is unmanaged IsUnmanagedENI(eniID string) bool // WaitForENIAndIPsAttached waits until the ENI has been attached and the secondary IPs have been added WaitForENIAndIPsAttached(eni string, wantedSecondaryIPs int) (ENIMetadata, error) //SetCNIunmanaged ENI SetCNIUnmanagedENIs(eniID []string) error //IsCNIUnmanagedENI IsCNIUnmanagedENI(eniID string) bool //IsPrimaryENI IsPrimaryENI(eniID string) bool //RefreshSGIDs RefreshSGIDs(mac string) error //GetInstanceHypervisorFamily returns the hypervisor family for the instance GetInstanceHypervisorFamily() string //GetInstanceType returns the EC2 instance type GetInstanceType() string //Update cached prefix delegation flag InitCachedPrefixDelegation(bool) // GetInstanceID returns the instance ID GetInstanceID() string // FetchInstanceTypeLimits Verify if the InstanceNetworkingLimits has the ENI limits else make EC2 call to fill cache. FetchInstanceTypeLimits() error IsPrefixDelegationSupported() bool }
APIs defines interfaces calls for adding/getting/deleting ENIs/secondary IPs. The APIs are not thread-safe.
type DescribeAllENIsResult ¶ added in v1.7.6
type DescribeAllENIsResult struct { ENIMetadata []ENIMetadata TagMap map[string]TagMap TrunkENI string EFAENIs map[string]bool MultiCardENIIDs []string }
DescribeAllENIsResult contains the fully
type EC2InstanceMetadataCache ¶
type EC2InstanceMetadataCache struct {
// contains filtered or unexported fields
}
EC2InstanceMetadataCache caches instance metadata
func New ¶
func New(useCustomNetworking, disableENIProvisioning, v4Enabled, v6Enabled bool) (*EC2InstanceMetadataCache, error)
New creates an EC2InstanceMetadataCache
func (*EC2InstanceMetadataCache) AllocENI ¶
func (cache *EC2InstanceMetadataCache) AllocENI(useCustomCfg bool, sg []*string, subnet string) (string, error)
AllocENI creates an ENI and attaches it to the instance returns: newly created ENI ID
func (*EC2InstanceMetadataCache) AllocIPAddress ¶
func (cache *EC2InstanceMetadataCache) AllocIPAddress(eniID string) error
AllocIPAddress allocates an IP address for an ENI
func (*EC2InstanceMetadataCache) AllocIPAddresses ¶ added in v1.1.0
func (cache *EC2InstanceMetadataCache) AllocIPAddresses(eniID string, numIPs int) (*ec2.AssignPrivateIpAddressesOutput, error)
AllocIPAddresses allocates numIPs of IP address on an ENI
func (*EC2InstanceMetadataCache) AllocIPv6Prefixes ¶ added in v1.10.0
func (cache *EC2InstanceMetadataCache) AllocIPv6Prefixes(eniID string) ([]*string, error)
func (*EC2InstanceMetadataCache) DeallocIPAddresses ¶ added in v1.5.0
func (cache *EC2InstanceMetadataCache) DeallocIPAddresses(eniID string, ips []string) error
DeallocIPAddresses frees IP address on an ENI
func (*EC2InstanceMetadataCache) DeallocPrefixAddresses ¶ added in v1.9.0
func (cache *EC2InstanceMetadataCache) DeallocPrefixAddresses(eniID string, prefixes []string) error
DeallocPrefixAddresses frees Prefixes on an ENI
func (*EC2InstanceMetadataCache) DescribeAllENIs ¶ added in v1.6.1
func (cache *EC2InstanceMetadataCache) DescribeAllENIs() (DescribeAllENIsResult, error)
DescribeAllENIs calls EC2 to refresh the ENIMetadata and tags for all attached ENIs
func (*EC2InstanceMetadataCache) FetchInstanceTypeLimits ¶ added in v1.9.1
func (cache *EC2InstanceMetadataCache) FetchInstanceTypeLimits() error
func (*EC2InstanceMetadataCache) FreeENI ¶
func (cache *EC2InstanceMetadataCache) FreeENI(eniName string) error
FreeENI detaches and deletes the ENI interface
func (*EC2InstanceMetadataCache) GetAttachedENIs ¶
func (cache *EC2InstanceMetadataCache) GetAttachedENIs() (eniList []ENIMetadata, err error)
GetAttachedENIs retrieves ENI information from meta data service
func (*EC2InstanceMetadataCache) GetENIIPv4Limit ¶ added in v1.6.4
func (cache *EC2InstanceMetadataCache) GetENIIPv4Limit() int
GetENIIPv4Limit return IP address limit per ENI based on EC2 instance type
func (*EC2InstanceMetadataCache) GetENILimit ¶
func (cache *EC2InstanceMetadataCache) GetENILimit() int
GetENILimit returns the number of ENIs can be attached to an instance
func (*EC2InstanceMetadataCache) GetIPv4PrefixesFromEC2 ¶ added in v1.9.0
func (cache *EC2InstanceMetadataCache) GetIPv4PrefixesFromEC2(eniID string) (addrList []*ec2.Ipv4PrefixSpecification, err error)
GetIPv4PrefixesFromEC2 calls EC2 and returns a list of all addresses on the ENI
func (*EC2InstanceMetadataCache) GetIPv4sFromEC2 ¶ added in v1.6.1
func (cache *EC2InstanceMetadataCache) GetIPv4sFromEC2(eniID string) (addrList []*ec2.NetworkInterfacePrivateIpAddress, err error)
GetIPv4sFromEC2 calls EC2 and returns a list of all addresses on the ENI
func (*EC2InstanceMetadataCache) GetIPv6PrefixesFromEC2 ¶ added in v1.10.0
func (cache *EC2InstanceMetadataCache) GetIPv6PrefixesFromEC2(eniID string) (addrList []*ec2.Ipv6PrefixSpecification, err error)
GetIPv6PrefixesFromEC2 calls EC2 and returns a list of all addresses on the ENI
func (*EC2InstanceMetadataCache) GetInstanceHypervisorFamily ¶ added in v1.9.0
func (cache *EC2InstanceMetadataCache) GetInstanceHypervisorFamily() string
GetInstanceHypervisorFamily returns hypervisor of EC2 instance type
func (*EC2InstanceMetadataCache) GetInstanceID ¶ added in v1.9.1
func (cache *EC2InstanceMetadataCache) GetInstanceID() string
GetInstanceID returns the instance ID
func (*EC2InstanceMetadataCache) GetInstanceType ¶ added in v1.9.0
func (cache *EC2InstanceMetadataCache) GetInstanceType() string
GetInstanceType return EC2 instance type
func (*EC2InstanceMetadataCache) GetLocalIPv4 ¶
func (cache *EC2InstanceMetadataCache) GetLocalIPv4() net.IP
GetLocalIPv4 returns the primary IP address on the primary interface
func (*EC2InstanceMetadataCache) GetPrimaryENI ¶
func (cache *EC2InstanceMetadataCache) GetPrimaryENI() string
GetPrimaryENI returns the primary ENI
func (*EC2InstanceMetadataCache) GetPrimaryENImac ¶ added in v1.2.1
func (cache *EC2InstanceMetadataCache) GetPrimaryENImac() string
GetPrimaryENImac returns the mac address of primary eni
func (*EC2InstanceMetadataCache) GetVPCIPv4CIDRs ¶ added in v1.3.0
func (cache *EC2InstanceMetadataCache) GetVPCIPv4CIDRs() ([]string, error)
GetVPCIPv4CIDRs returns VPC CIDRs
func (*EC2InstanceMetadataCache) GetVPCIPv6CIDRs ¶ added in v1.10.0
func (cache *EC2InstanceMetadataCache) GetVPCIPv6CIDRs() ([]string, error)
GetVPCIPv6CIDRs returns VPC CIDRs
func (*EC2InstanceMetadataCache) InitCachedPrefixDelegation ¶ added in v1.9.0
func (cache *EC2InstanceMetadataCache) InitCachedPrefixDelegation(enablePrefixDelegation bool)
func (*EC2InstanceMetadataCache) IsCNIUnmanagedENI ¶ added in v1.7.10
func (cache *EC2InstanceMetadataCache) IsCNIUnmanagedENI(eniID string) bool
IsCNIUnmanagedENI returns if the eni is unmanaged
func (*EC2InstanceMetadataCache) IsInstanceBareMetal ¶ added in v1.10.3
func (cache *EC2InstanceMetadataCache) IsInstanceBareMetal() bool
IsInstanceBareMetal derives bare metal value of the instance
func (*EC2InstanceMetadataCache) IsPrefixDelegationSupported ¶ added in v1.10.3
func (cache *EC2InstanceMetadataCache) IsPrefixDelegationSupported() bool
IsPrefixDelegationSupported return true if the instance type supports Prefix Assignment/Delegation
func (*EC2InstanceMetadataCache) IsPrimaryENI ¶ added in v1.10.0
func (cache *EC2InstanceMetadataCache) IsPrimaryENI(eniID string) bool
IsPrimaryENI returns if the eni is unmanaged
func (*EC2InstanceMetadataCache) IsUnmanagedENI ¶ added in v1.7.2
func (cache *EC2InstanceMetadataCache) IsUnmanagedENI(eniID string) bool
IsUnmanagedENI returns if the eni is unmanaged
func (*EC2InstanceMetadataCache) RefreshSGIDs ¶ added in v1.7.10
func (cache *EC2InstanceMetadataCache) RefreshSGIDs(mac string) error
RefreshSGIDs retrieves security groups
func (*EC2InstanceMetadataCache) SetCNIUnmanagedENIs ¶ added in v1.7.10
func (cache *EC2InstanceMetadataCache) SetCNIUnmanagedENIs(eniID []string) error
SetCNIUnmanagedENIs Set unmanaged ENI set
func (*EC2InstanceMetadataCache) SetUnmanagedENIs ¶ added in v1.7.2
func (cache *EC2InstanceMetadataCache) SetUnmanagedENIs(eniIDs []string)
SetUnmanagedENIs Set unmanaged ENI set
func (*EC2InstanceMetadataCache) TagENI ¶ added in v1.8.0
func (cache *EC2InstanceMetadataCache) TagENI(eniID string, currentTags map[string]string) error
func (*EC2InstanceMetadataCache) WaitForENIAndIPsAttached ¶ added in v1.7.2
func (cache *EC2InstanceMetadataCache) WaitForENIAndIPsAttached(eni string, wantedCidrs int) (eniMetadata ENIMetadata, err error)
WaitForENIAndIPsAttached waits until the ENI has been attached and the secondary IPs have been added
type EC2MetadataIface ¶ added in v1.8.0
type EC2MetadataIface interface {
GetMetadataWithContext(ctx context.Context, p string) (string, error)
}
EC2MetadataIface is a subset of the EC2Metadata API.
type ENIMetadata ¶
type ENIMetadata struct { // ENIID is the id of network interface ENIID string // MAC is the mac address of network interface MAC string // DeviceNumber is the device number of network interface DeviceNumber int // 0 means it is primary interface // SubnetIPv4CIDR is the IPv4 CIDR of network interface SubnetIPv4CIDR string // SubnetIPv6CIDR is the IPv6 CIDR of network interface SubnetIPv6CIDR string // The ip addresses allocated for the network interface IPv4Addresses []*ec2.NetworkInterfacePrivateIpAddress // IPv4 Prefixes allocated for the network interface IPv4Prefixes []*ec2.Ipv4PrefixSpecification // IPv6 addresses allocated for the network interface IPv6Addresses []*ec2.NetworkInterfaceIpv6Address // IPv6 Prefixes allocated for the network interface IPv6Prefixes []*ec2.Ipv6PrefixSpecification }
ENIMetadata contains information about an ENI
func (ENIMetadata) PrimaryIPv4Address ¶ added in v1.6.1
func (eni ENIMetadata) PrimaryIPv4Address() string
PrimaryIPv4Address returns the primary IPv4 address of this node
type FakeIMDS ¶ added in v1.8.0
type FakeIMDS map[string]interface{}
FakeIMDS is a trivial implementation of EC2MetadataIface using an in-memory map - for testing.
type InstanceTypeLimits ¶ added in v1.6.4
type InstanceTypeLimits struct { ENILimit int IPv4Limit int HypervisorType string IsBareMetal bool }
InstanceTypeLimits keeps track of limits for an instance type
type StringSet ¶ added in v1.6.4
StringSet is a set of strings
func (*StringSet) Difference ¶ added in v1.6.4
Difference compares this StringSet with another
func (*StringSet) SortedList ¶ added in v1.6.4
SortedList returns a sorted string slice from this set
type TypedIMDS ¶ added in v1.8.0
type TypedIMDS struct {
EC2MetadataIface
}
TypedIMDS is a typed wrapper around raw untyped IMDS SDK API.
func (TypedIMDS) GetAZ ¶ added in v1.8.0
GetAZ returns the Availability Zone in which the instance launched.
func (TypedIMDS) GetDeviceNumber ¶ added in v1.8.0
GetDeviceNumber returns the unique device number associated with an interface. The primary interface is 0.
func (TypedIMDS) GetIPv4Prefixes ¶ added in v1.10.0
GetIPv4Prefixes returns the IPv4 prefixes delegated to this interface
func (TypedIMDS) GetIPv6Prefixes ¶ added in v1.10.0
GetIPv6Prefixes returns the IPv6 prefixes delegated to this interface
func (TypedIMDS) GetIPv6s ¶ added in v1.8.0
GetIPv6s returns the IPv6 addresses associated with the interface.
func (TypedIMDS) GetInstanceID ¶ added in v1.8.0
GetInstanceID returns the ID of this instance.
func (TypedIMDS) GetInstanceType ¶ added in v1.8.0
GetInstanceType returns the type of this instance.
func (TypedIMDS) GetInterfaceID ¶ added in v1.8.0
GetInterfaceID returns the ID of the network interface.
func (TypedIMDS) GetLocalIPv4 ¶ added in v1.8.0
GetLocalIPv4 returns the private (primary) IPv4 address of the instance.
func (TypedIMDS) GetLocalIPv4s ¶ added in v1.8.0
GetLocalIPv4s returns the private IPv4 addresses associated with the interface. First returned address is the primary address.
func (TypedIMDS) GetMAC ¶ added in v1.8.0
GetMAC returns the first/primary network interface mac address.
func (TypedIMDS) GetMACs ¶ added in v1.8.0
GetMACs returns the interface addresses attached to the instance.
func (TypedIMDS) GetSecurityGroupIDs ¶ added in v1.8.0
GetSecurityGroupIDs returns the IDs of the security groups to which the network interface belongs.
func (TypedIMDS) GetSubnetID ¶ added in v1.8.0
GetSubnetID returns the ID of the subnet in which the interface resides.
func (TypedIMDS) GetSubnetIPv4CIDRBlock ¶ added in v1.8.0
GetSubnetIPv4CIDRBlock returns the IPv4 CIDR block for the subnet in which the interface resides.
func (TypedIMDS) GetSubnetIPv6CIDRBlocks ¶ added in v1.10.0
GetSubnetIPv6CIDRBlocks returns the IPv4 CIDR block for the subnet in which the interface resides.
func (TypedIMDS) GetVPCIPv4CIDRBlocks ¶ added in v1.8.0
GetVPCIPv4CIDRBlocks returns the IPv4 CIDR blocks for the VPC.
Directories ¶
Path | Synopsis |
---|---|
Package mock_awsutils is a generated GoMock package.
|
Package mock_awsutils is a generated GoMock package. |