VM::EC...mission(3pm)
π VM::EC2::SecurityGroup::GroupPermission β the whole vibe π
okay bestie so this is a Perl manual page, VM::EC2::SecurityGroup::GroupPermission(3pm) from the User Contributed Perl Documentation, and it's literally all about one little object: the authorized group chillin' inside a security group firewall rule. let's get into it β¨
πΈ NAME πΈ
VM::EC2::SecurityGroup::GroupPermission β an object describing an authorized group within a security group firewall rule. that's it, that's the girl π
β¨ SYNOPSIS β¨
like, here's how you actually meet her:
$ec2 = VM::EC2->new(...);
$sg = $ec2->describe_security_groups(-name=>'My Group');
@rules = $sg->ipPermissions;
$rule = $rules[0];
@groups = $rule->groups;
for my $g (@groups) {
$userId = $g->userId;
$name = $g>groupName;
$id = $g->groupId;
$group_object = $g->security_group;
}
(no i did not fix that $g>groupName typo, that's canon, i don't make the rules π«Ά)
π¦ DESCRIPTION π¦
so this object describes a security group whose instances are granted permission to exchange data traffic with another group of instances. she gets handed to you by the groups() method of VM::EC2::SecurityGroup::ipPermission. periodt.
β οΈ IMPORTANT β οΈ this object is not the same as a bona fide VM::EC2::SecurityGroup. that one has access to the group's firewall rules, she's got range. this one just contains the name, id and owner of a group used within a firewall rule. that's her whole personality.
but wait, for groups that belong to you, you can glow up and get the full VM::EC2::SecurityGroup object by calling the security_group() method. π
and the details? not available for groups that belong to other accounts. sorry babe, Amazon said no. π
π METHODS π
$id = $group->groupId
returns the group's unique ID. iconic, singular, hers. β
$id = $group->userId
returns the account ID of the owner of this group. like, who's her parent account basically. π
$id = $group->groupName
returns this group's name. the government name. πΈ
$string = $group->short_name
returns a string for use in string overloading. see "STRING OVERLOADING" below bestie, don't skip it. π§
$sg = $group->security_group
for groups that belong to the current account, this calls VM::EC2->describe_security_groups() to turn the group name into a VM::EC2::SecurityGroup. slay, glow-up complete.
for groups that belong to a different account, she'll return undef, since describe_security_groups() on other accounts is not allowed by Amazon. no cap, that's just the rules. π
π STRING OVERLOADING π
when used in a string context, this object interpolates the user id and group name in the form "userId/groupName" for groups that belong to other accounts, and the groupName alone in the case of groups that belong to you.
so basically: strangers get the full userId/groupName treatment, your own groups get to just go by first name. main character energy fr fr. β¨
π SEE ALSO π
VM::EC2VM::EC2::GenericVM::EC2::SecurityGroupVM::EC2::SecurityGroup::IpPermission
go read those too, iykyk π«Ά
π 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.
and that's the whole page bestie!! π¦β¨ this was perl v5.38.2, dated 2024-08-10, straight outta VM::EC...mission(3pm) β mwah, go forth and describe your security groups responsibly ππΈπ
π¦ 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