aws

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetENIForIPAddress

func GetENIForIPAddress(ipAddress string) (string, []string, error)

GetENIForIPAddress retrieves the Elastic Network Interface (ENI) ID and associated security group IDs for a given IP address.

Parameters:

  • ipAddress: The IP address for which to find the associated ENI.

Returns:

  • string: The ID of the ENI associated with the given IP address.
  • []string: A list of security group IDs associated with the ENI.
  • error: An error object if there was an issue retrieving the ENI information.

The function uses the AWS SDK to load the default configuration and create an EC2 client. It then calls the DescribeNetworkInterfaces API to find the ENI associated with the specified IP address. If no ENI is found, an error is returned. Otherwise, the ENI ID and associated security group IDs are returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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