Fugue.AWS.EC2.NetworkAcl

Module Members

new

(Function)

new NetworkAcl (Constructor)

Call this constructor to create a new Fugue.Core.AWS.EC2.NetworkAcl.

Example usage:

import Fugue.AWS as AWS
import Fugue.AWS.EC2 as EC2
import Fugue.AWS.Pattern.Network as Network

network: Network.public {
  name: "acl-example",
  region: AWS.Us-west-2,
  cidr: "10.42.0.0/16",
  subnets: [
    (AWS.A, "10.42.10.0/24"),
  ],
}

publicAcls: EC2.NetworkAcl.new {
  vpc: network.vpc,
  entries: [
    # Allows inbound HTTP traffic from anywhere.
    EC2.NetworkAcl.Entry.allowInboundPort {ruleNumber: 100, port: 80},
    # Allows inbound HTTPS traffic from anywhere.
    EC2.NetworkAcl.Entry.allowInboundPort {ruleNumber: 110, port: 443},
    # Allows inbound return traffic from requests originating in the
    # subnet.
    EC2.NetworkAcl.Entry.allowInboundPorts {ruleNumber: 140, from: 1024, to: 65535},

    # Allows outbound HTTP traffic from the subnet to the Internet.
    EC2.NetworkAcl.Entry.allowOutboundPort {ruleNumber: 100, port: 80},
    # Allows outbound HTTPS traffic from the subnet to the Internet.
    EC2.NetworkAcl.Entry.allowOutboundPort {ruleNumber: 110, port: 443},
    # Allows outbound responses to clients on the Internet (for
    # example, serving web pages to people visiting the web servers in
    # the subnet).
    EC2.NetworkAcl.Entry.allowOutboundPorts {ruleNumber: 120, from: 49152, to: 65535}
  ],
  associations: network.publicSubnets,
  tags: [AWS.tag("Name", "acl-example-public")],
}

Type Signature

 fun { vpc: Vpc,
       entries: Optional<List<NetworkAclEntry>>,
       associations: Optional<List<Subnet>>,
       tags: Optional<List<Tag>> } -> NetworkAcl
Argument: vpc

The VPC in which to create the network ACL.

Type: Vpc

Argument: entries

The entries to include in this network ACL. See Fugue.AWS.EC2.NetworkAcl.Entry for functions to create entries. Mutable.

Type: Optional<List<NetworkAclEntry>>

Argument: associations

The subnets with which to associate the network ACL. Note that a subnet may only have one network ACL associated with it. Mutable.

Type: Optional<List<Subnet>>

Argument: tags

AWS tag key-value pairs to associate with the network ACL. Mutable.

Type: Optional<List<Tag>>

Returns:

A Fugue.Core.AWS.EC2.NetworkAcl value.

Type: NetworkAcl