Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetENIForIPAddress ¶
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.
Click to show internal directories.
Click to hide internal directories.