VM::EC...iation(3pm)

πŸ“¦
version 1.28 Β· 7 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– VM::EC2::NetworkInterface::Association(3pm) πŸ’–

okay bestie, listen up β€” this is a page from the User Contributed Perl Documentation, and it's about VM::EC2::NetworkInterface::Association. That's a whole mouthful, i know, but it's literally just an object that represents an association of a network interface with an elastic public IP address. slay.


✨ NAME ✨

VM::EC2::NetworkInterface::Association β€” Object representing an association of a network interface with an elastic public IP address πŸ¦‹


🌸 SYNOPSIS 🌸

here's the vibe, copy-paste ready, no cap:

use VM::EC2;
my $ec2 = VM::EC2->new(...);
my $interface   = $ec2->describe_network_interfaces('eni-12345');
my $association = $interface->association;
my $id          = $association->associationId;
my $public_ip   = $association->ipOwnerId;
my $address     = $association->address;

look at her go πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

so this object gives you access to an elastic address association object, which reversibly associates an elastic public IP address with an elastic network interface (an ENI). the way it just... attaches and detaches. iconic behavior fr fr.

also pls go read VM::EC2::Generic for the methods that every single VM::EC2 object shares. they're not repeated here, bestie, they live over there. 🫢

πŸŽ€ METHODS πŸŽ€

these object methods are supported, and yes, they're all here, i'm not skipping a single one:

  • associationId
  • publicIp
  • publicDnsName
  • ipOwnerId
  • allocationId

and in addition, this object supports the following convenience method:

  • address() β€” Returns the VM::EC2::Address object involved in the association. it's giving "here's the whole address object, you're welcome" 😌

⭐ STRING OVERLOADING ⭐

when you use this object in a string context, it gets interpolated as the public IP address. so you can just drop it in a string and it'll show up as the IP. main character energy tbh. πŸ’–


🌈 SEE ALSO 🌈

  • VM::EC2
  • VM::EC2::Generic

go read those too, they're the supporting cast and they ate. πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Lincoln Stein <lincoln.stein@gmail.com>.

Copyright (c) 2012 Ontario Institute for Cancer Research

This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty.

tl;dr on the legal bit: it's free software, GPL (v1 or later, or your call, any later version) or Artistic License 2.0, your pick β€” but go actually read LICENSE and DISCLAIMER.txt, don't just trust me on this one. πŸ™ˆ

and that's the whole page, bestie πŸŽ€ mwah. this was perl v5.38.2, dated 2024-08-10, and it's the VM::EC2::NetworkInterface::Association(3pm) page β€” go forth and associate those elastic IPs responsibly. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from