VM::EC...orkAcl(3pm)
π VM::EC2::VPC::NetworkAcl π
okay bestie, welcome to the manual page for VM::EC2::VPC::NetworkAcl β that's the Perl module, and yeah we're chilling in section 3pm because that's where the Perl docs live. Buckle up, this one's a whole mood. π¦
πΈ NAME πΈ
VM::EC2::VPC::NetworkAcl β Virtual Private Cloud network ACL. That's it, that's the vibe. π
β¨ SYNOPSIS β¨
okay so here's the whole flow, no cap:
use VM::EC2;
my $ec2 = VM::EC2->new(...);
my @acls = $ec2->describe_network_acls(-network_acl_id=>'acl-12345678');
foreach my $acl (@acls) {
my $vpc_id = $acl->vpcId;
my $default = $acl->default;
my @entries = $acl->entries;
my @assoc = $acl->associations;
...
}
my $acl = $ec2->create_network_acl_entry(...);
literally just grab your $ec2, pull the ACLs, and then read every single little property off them like the nosy icon you are. π
π DESCRIPTION π
This object is the whole entire glow-up of an Amazon EC2 VPC network ACL. When you call VM::EC2->describe_network_acls() or VM::EC2->create_network_acl(), this is the baby you get handed back. She's the main character of your subnet rules. π
π§ METHODS π§
These object methods are supported, bestie β read 'em and weep (affectionately):
networkAclIdβ The network ACL's ID.vpcIdβ The ID of the VPC the network ACL is in.defaultβ Whether this is the default network ACL in the VPC.entrySetβ A list of entries (rules) in the network ACL.associationSetβ A list of associations between the network ACL and one or more subnets.tagSetβ Tags assigned to the resource.associationsβ Alias forassociationSet.entriesβ Alias forentrySet.
The object also supports the tags() method described in VM::EC2::Generic. slay, inherited behavior. π
π₯ CONVENIENCE METHODS π₯
π« $success = $acl->create_entry(%args)
π« $success = $acl->create_entry($acl_entry)
Creates an entry (i.e., rule) in a network ACL with the rule number you specified. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the ACL, Amazon VPC processes the entries in the ACL according to the rule numbers, in ascending order.
fr fr, order matters here β ascending rule numbers, that's the whole plot.
Arguments, and yes every single one is required unless it says otherwise:
-rule_numberβ Rule number to assign to the entry (e.g.,100). ACL entries are processed in ascending order by rule number. Positive integer from1to32766. (Required)-protocolβ The IP protocol the rule applies to. You can use-1to mean all protocols. See http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml for a list of protocol numbers. (Required)-rule_actionβ Indicates whether to allow or deny traffic that matches the rule.allow | deny(Required)-egressβ Indicates whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false). Default isfalse.-cidr_blockβ The CIDR range to allow or deny, in CIDR notation (e.g.,172.16.0.0/24). (Required)-icmp_codeβ For the ICMP protocol, the ICMP code. You can use-1to specify all ICMP codes for the given ICMP type. Required if specifying1(ICMP) for protocol.-icmp_typeβ For the ICMP protocol, the ICMP type. You can use-1to specify all ICMP types. Required if specifying1(ICMP) for the protocol-port_fromβ The first port in the range. Required if specifying6(TCP) or17(UDP) for the protocol.-port_toβ The last port in the range. Required if specifying6(TCP) or17(UDP) for the protocol.
Alternately, you can pass an existing ACL entry object VM::EC2::VPC::NetworkAcl::Entry as the only argument, which is the move for copying entries from one ACL to another. chef's kiss. π«Ά
Returns true on successful creation.
π« $success = $acl->delete_entry(%args)
π« $success = $acl->delete_entry($acl_entry)
Deletes an ingress or egress entry (i.e., rule) from a network ACL. bye bestie π
Arguments:
-network_acl_idβ ID of the ACL where the entry will be created-rule_numberβ Rule number of the entry (e.g.,100).
Optional arguments:
-egressβ Whether the rule to delete is an egress rule (true) or ingress rule (false). Default isfalse.
Alternately, you can pass an existing ACL entry object VM::EC2::VPC::NetworkAcl::Entry as the only argument to ease deletion of entries.
Returns true on successful deletion.
π« $success = replace_entry(%args)
π« $success = replace_entry($acl_entry)
Replaces an entry (i.e., rule) in a network ACL. out with the old, in with the new β¨
Arguments:
-network_acl_idβ ID of the ACL where the entry will be created (Required)-rule_numberβ Rule number of the entry to replace. (Required)-protocolβ The IP protocol the rule applies to. You can use-1to mean all protocols. See http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml for a list of protocol numbers. (Required)-rule_actionβ Indicates whether to allow or deny traffic that matches the rule.allow | deny(Required)-egressβ Indicates whether this rule applies to egress traffic from the subnet (true) or ingress traffic to the subnet (false). Default isfalse.-cidr_blockβ The CIDR range to allow or deny, in CIDR notation (e.g.,172.16.0.0/24). (Required)-icmp_codeβ For the ICMP protocol, the ICMP code. You can use-1to specify all ICMP codes for the given ICMP type. Required if specifying1(ICMP) for protocol.-icmp_typeβ For the ICMP protocol, the ICMP type. You can use-1to specify all ICMP types. Required if specifying1(ICMP) for the protocol-port_fromβ The first port in the range. Required if specifying6(TCP) or17(UDP) for the protocol.-port_toβ The last port in the range. Only required if specifying6(TCP) or17(UDP) for the protocol and is a different port than-port_from.
Alternately, you can pass an existing ACL entry object VM::EC2::VPC::NetworkAcl::Entry as the only argument for ease in replacing entries from one ACL to another. The rule number in the passed entry object must already exist in the ACL.
β οΈ heads up bestie: that rule number has to already exist in the ACL or this whole thing is a no. π
Returns true on successful replacement.
π« $association_id = $acl->associate($subnet_id)
Associates the ACL with a subnet in the same VPC. Replaces whatever ACL the subnet was associated with previously.
not me just casually yeeting the old association into the sun π
π« $association_id = $acl->disassociate($subnet_id)
Disassociates the ACL with a subnet in the same VPC. The subnet will then be associated with the default ACL.
π STRING OVERLOADING π
When used in a string context, this object will interpolate the networkAclId. so if you just print her, you get the ID. iconic behavior honestly. β
π SEE ALSO π
VM::EC2VM::EC2::GenericVM::EC2::TagVM::EC2::VPCVM::EC2::VPC::NetworkAcl::EntryVM::EC2::VPC::NetworkAcl::Association
π AUTHOR π
Lance Kinley <lkinley@loyaltymethods.com>.
Copyright (c) 2012 Loyalty Methods, Inc.
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 lil doc was brought to you by perl v5.38.2, dated 2024-08-10 β go forth and ACL responsibly, ily, bye π¦π
π¦ 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