VM::EC2::Group(3pm)
π VM::EC2::Group π
okay bestie, so this is the manual page for VM::EC2::Group, which lives in the User Contributed Perl Documentation section (3pm). it's a tiny little object and honestly it's giving hype girl for a bigger object, but you need it, so let's go π
β¨ NAME β¨
VM::EC2::Group β the object that describes an Amazon EC2 security group name π
πΈ SYNOPSIS πΈ
use VM::EC2;
$ec2 = VM::EC2->new(...);
$instance = $ec2->describe_instances(-instance_id=>'i-12345');
my @groups = $instance->groups;
for my $g (@groups) {
my $id = $g->groupId;
my $name = $g->groupName;
# get the security group details
my $sg = $ec2->describe_security_group($g);
my $permissions = $sg->ipPermissions;
}
like, look at that loop. she's just vibing through your groups and grabbing the groupId and the groupName. then if you want the actual tea about what ports are open, you hand the group object over to describe_security_group and she comes back with ipPermissions. iconic. π₯
π¦ DESCRIPTION π¦
so basically: this object is just the name and the ID of a security group. that's it. that's her whole personality. π
she gets returned by an instance's groups() method.
β οΈ real talk though: this object does not give you any of the details about the security group. no ports, no rules, nothing. she's the name tag, not the dossier, iykyk.
but!! you can absolutely use her in a call to VM::EC2->describe_security_group() to go get the actual details β you know, the security group's allowed ports and all that. so she's a little key π that unlocks the bigger info. we love a supporting character with main character energy.
π METHODS π
these object methods are supported, bestie:
groupIdβ the group ID πgroupNameβ the group's name πΈ
and for convenience, because she's sweet like that, the object also provides a permissions() method that will return the fully detailed VM::EC2::SecurityGroup:
$details = $group->permissions()
see VM::EC2::SecurityGroup for all of that. π«Ά
π STRING OVERLOADING π
when you use this object in a string context, it will interpolate the groupId. so yes, you can just drop her in a "$group" and she'll show up with her ID. no cap. β¨
π SEE ALSO π
VM::EC2VM::EC2::ObjectVM::EC2::GenericVM::EC2::SecurityGroup
go read those too, they're the rest of the friend group π§
π AUTHOR π
Lincoln Stein <lincoln.stein@gmail.com>
Copyright (c) 2011 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.
π so yeah, GPL v1-or-later or Artistic 2.0, your call, both are slay. but pls actually readLICENSEandDISCLAIMER.txt, the warranty situation is not a joke bestie π
and that's the whole page! this doc is from perl v5.38.2, dated 2024-08-10, and it documents VM::EC2::Group(3pm). periodt. π
β¨π¦
π¦ where this page comes from
- debian trixie: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- ubuntu resolute: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- ubuntu stonking: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms