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

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

πŸ¦‹ VM::EC2::VPC::DhcpOptions β€” the vibe

okay bestie, welcome to the manual page for VM::EC2::VPC::DhcpOptions β€” that's the DHCP options set for an AWS Virtual Private Cloud πŸ’–. Yes it's a Perl module from the User Contributed Perl Documentation, yes it's a whole ~mood~, and yes we're gonna read it together like it's the group chat. sit down, hydrate, let's go 🫢


✨ NAME ✨

VM::EC2::VPC::DhcpOptions β€” DHCP options set for an AWS Virtual Private Cloud 🌈

that's it. that's the name. iconic behavior honestly πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's how you actually use it, in all its glory:

use VM::EC2;
my $ec2     = VM::EC2->new(...);
my $vpc     = $ec2->create_vpc('10.0.0.0/16');
my $options = $ec2->create_dhcp_options(-domain_name=>'test.com',
                                        -domain_name_servers=>['204.16.255.55','216.239.34.10']);
$vpc->set_dhcp_options($options);

so you spin up a VM::EC2 object, make yourself a VPC at '10.0.0.0/16', build a DHCP options set with a -domain_name of 'test.com' and -domain_name_servers of ['204.16.255.55','216.239.34.10'], and then yeet it onto the VPC with set_dhcp_options. slay πŸ”₯ no cap, that's the whole flow.


πŸ’œ DESCRIPTION πŸ’œ

okay so real talk β€” the methods that every VM::EC2 object shares live somewhere else, and that somewhere is VM::EC2::Generic. go read that one for the shared stuff, bestie, it's giving "base class energy" πŸ‘‘


🌸 METHODS 🌸

these object methods are supported, and I'm listing every single one because we don't do half-measures here:

  • dhcpOptionsId β€” the ID of the dhcp options 🌟
  • dhcpConfigurationSet β€” a hash of options πŸ“

and in addition (yes there's more, she's generous), this object supports these convenience methods:

  • options() β€” hands you back the list of DHCP options contained in this set ✨
  • option('option-name') β€” returns the list of values for the option you named. lowkey important: every option corresponds to a list, so if you call this in scalar context you get the size of the list, not the value. read that again, it's a whole plot twist 😭
  • associate_vpc($vpc_id) β€” associates these options with the given VPC πŸ’«
  • associated_vpcs() β€” returns the list of VPCs associated with the DHCP option set πŸ¦‹
  • as_string() β€” returns a string concatenation of all options πŸŽ€

⭐ STRING OVERLOADING ⭐

when you use this object in a string context, it gets interpolated as the dhcp ID. that's it, that's the whole trick. put it in quotes, get an ID. main character behavior fr fr πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

go look at these too, they're the friends of this page:

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

🫢 AUTHOR 🫢

Lincoln Stein <lincoln.stein@gmail.com>. legend behavior, we love to see it πŸ’–

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.

legal stuff but make it cute: free software, GPL (v1 or later, your pick) or Artistic License 2.0 β€” full text lives in LICENSE, and the warranty disclaimers are chillin' in DISCLAIMER.txt. go read them, bestie, it's giving responsible 🌸

and that's a wrap on this page 🎬 β€” brought to you by perl v5.38.2, dated 2024-08-10, from the User Contributed Perl Documentation collection for VM::EC...Options(3pm). mwah, go configure some DHCP options πŸ’‹βœ¨

πŸ“¦ where this page comes from