VM::EC2::VPC::NetworkAcl::Entry3pm
Vpc network acl entry
Usage
use VM::EC2;my $ec2 = VM::EC2->new(...);my $acl = $ec2->describe_network_acls(-network_acl_id=>'acl-12345678');my @entries = $acl->entries;# print outgoing icmp rulesfor my $e (@entries) {if ($e->egress && $e->protocol == 1) { # icmp = 1print $e->ruleNumber,"\n",$e->ruleAction,"\n",$e->cidrBlock,"\n",$e->icmpType,"\n",$e->icmpCode,"\n";}}# print incoming tcp rulesfor my $e (@entries) {if (! $e->egress && $e->protocol == 6) { # tcp = 6print $e->ruleNumber,"\n",$e->ruleAction,"\n",$e->cidrBlock,"\n",$e->port_from,'-',$e->port_to,"\n";}}
Overview
This object represents an Amazon EC2 VPC network ACL entry
Methods
These object methods are supported:
ruleNumber -- Specific rule number for the entry. ACL entries areprocessed in ascending order by rule number.protocol -- Protocol. A value of -1 means all protocols.See: http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xmlfor a list of protocol numbers.ruleAction -- Whether to allow or deny the traffic that matches therule. Valid values: allow | denyegress -- Boolean flag to indicate an egress rule (rule isapplied to traffic leaving the subnet). Value of trueindicates egress.cidrBlock -- The network range to allow or deny, in CIDR notation.icmpType -- For the ICMP protocol, this is the ICMP typeicmpCode -- For the ICMP protocol, this is the ICMP code.portRangeFrom -- For the TCP or UDP protocols, the starting range of ports therule applies to.portRangeTo -- For the TCP or UDP protocols, the ending range of ports therule applies to.port_from -- Alias for portRangeFromport_to -- Alias for portRangeTo
The object also supports the tags() method described in VM::EC2::Generic:
String overloading
When used in a string context, this object will interpolate the rule number
Releases
6 releases since Debian 8 (Jessie); the text changed 3 times.