Fugue.AWS.EC2.IpPermission

This is the preferred interface for making IP Permissions for Security Groups with Fugue. The new function is the right place to start.

Module Members

all

(Function)

Create an IpPermission to allow all ports and protocols.

Example usage:

allFromLocal: EC2.IpPermission.all(EC2.IpPermission.Target.ipRange("10.0.0.0/16"))

Type Signature

 fun (IpPermissionTarget) -> IpPermission
Argument: target

The target of the rule.

Type: IpPermissionTarget

Returns:

An IpPermission.

Type: IpPermission

http

(Function)

Create an IpPermission allowing HTTP traffic on port 80.

Example usage:

httpFromAll: EC2.IpPermission.http(EC2.IpPermission.Target.all)

Type Signature

 fun (IpPermissionTarget) -> IpPermission
Argument: target

The target of the permission.

Type: IpPermissionTarget

Returns:
Type: IpPermission

https

(Function)

Create an IpPermission allowing HTTPS traffic on port 443.

Example usage:

httpsFromAll: EC2.IpPermission.https(EC2.IpPermission.Target.all)

Type Signature

 fun (IpPermissionTarget) -> IpPermission
Argument: target

The target of the permission.

Type: IpPermissionTarget

Returns:
Type: IpPermission

mysql

(Function)

Create an IpPermission allowing MySQL traffic on port 3306.

Example usage:

mysqlFromAll: EC2.IpPermission.mysql(EC2.IpPermission.Target.all)

Type Signature

 fun (IpPermissionTarget) -> IpPermission
Argument: target

The target of the permission.

Type: IpPermissionTarget

Returns:
Type: IpPermission

new

(Function)

new IP Permission (Constructor)

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

Example usage:

elbHTTP: EC2.IpPermission.new {
  ipProtocol: "tcp",
  fromPort: 80,
  toPort: 80,
  target: EC2.IpPermission.Target.ipRanges(["0.0.0.0/0"])
}

Type Signature

 fun { ipProtocol: String,
       fromPort: Int,
       toPort: Int,
       target: IpPermissionTarget,
       prefixLists: Optional<NotImplemented> } -> IpPermission
Argument: ipProtocol

Name or number of the IP protocol for the rule, for example TCP or UDP. Use "-1" for all protocols. Note that the fromPort and toPort arguments are ignored if "-1" is specified.

Type: String

Argument: fromPort

The lowest port number of the port range for the permission.

Type: Int

Argument: toPort

The highest port number of the port range for the permission. For a single port, make this the same as the fromPort.

Type: Int

Argument: target

The target of the permission. Examples include, but aren’t limited to, CIDR ranges and other security groups.

Type: IpPermissionTarget

Argument: prefixLists

Reserved for future functionality.

Type: Optional<NotImplemented>

Returns:

A Fugue.Core.AWS.EC2.IpPermission value.

Type: IpPermission

postgresql

(Function)

Create an IpPermission allowing PostgreSQL traffic on port 5432.

Example usage:

postgresqlFromAll: EC2.IpPermission.postgresql(EC2.IpPermission.Target.all)

Type Signature

 fun (IpPermissionTarget) -> IpPermission
Argument: target

The target of the permission.

Type: IpPermissionTarget

Returns:
Type: IpPermission

rdp

(Function)

Create an IpPermission allowing RDP traffic on port 3389.

Example usage:

rdpFromAll: EC2.IpPermission.rdp(EC2.IpPermission.Target.all)

Type Signature

 fun (IpPermissionTarget) -> IpPermission
Argument: target

The target of the permission.

Type: IpPermissionTarget

Returns:
Type: IpPermission

ssh

(Function)

Create an IpPermission allowing SSH traffic on port 22.

Example usage:

sshFromAll: EC2.IpPermission.ssh(EC2.IpPermission.Target.all)

Type Signature

 fun (IpPermissionTarget) -> IpPermission
Argument: target

The target of the permission.

Type: IpPermissionTarget

Returns:
Type: IpPermission

tcp

(Function)

Create an IpPermission for a given TCP port.

Example usage:

devFromAll: EC2.IpPermission.tcp(3000, EC2.IpPermission.Target.all)

Type Signature

 fun (Int, IpPermissionTarget) -> IpPermission
Argument: port

The port that will be accessed.

Type: Int

Argument: target

The target of the permission.

Type: IpPermissionTarget

Returns:

An IpPermission.

Type: IpPermission

udp

(Function)

Create an IpPermission for a given UDP port.

Example usage:

dnsFromAll: EC2.IpPermission.udp(53, EC2.IpPermission.Target.all)

Type Signature

 fun (Int, IpPermissionTarget) -> IpPermission
Argument: port

The port that is accessed.

Type: Int

Argument: target

The target of the rule.

Type: IpPermissionTarget

Returns:

An IpPermission.

Type: IpPermission

allowAll

(Value)

allowAll:
  all(all)

Create an IpPermission to give open access.

default

(Value)

default:

DEPRECATED: Use of Fugue.AWS.IpPermission.default is no longer required. It will be removed in a future release.