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

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

πŸ’– 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::EC2
  • VM::EC2::Generic
  • VM::EC2::SecurityGroup
  • VM::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