public ToSourceSelection to(int port) { return new ToSourceSelection(getIpProtocol(), getFromPort(), port); } }
public ToSourceSelection port(int port) { return new ToSourceSelection(getIpProtocol(), port, port); } }
public ToPortSelection fromPort(int port) { return new ToPortSelection(getIpProtocol(), port); }
public void testProtocolFromAndToPortAndGroupIds() { IpPermissions authorization = IpPermissions.permit(IpProtocol.UDP).fromPort(11).to(53) .originatingFromSecurityGroupId("groupId"); assertEquals( IpPermissions.buildFormParametersForIndex(0, authorization).toString(), "{IpPermissions.0.IpProtocol=[udp], IpPermissions.0.FromPort=[11], IpPermissions.0.ToPort=[53], IpPermissions.0.Groups.0.GroupId=[groupId]}"); }
public IpPermissions toEC2SecurityGroups(Multimap<String, String> userIdGroupNamePairs) { return new IpPermissions(getIpProtocol(), getFromPort(), getToPort(), userIdGroupNamePairs, getGroupIds(), ImmutableSet.<String> of()); } }
public void testProtocolICMPTypeCode() { IpPermissions authorization = IpPermissions.permitICMP().type(8).andCode(0) .originatingFromSecurityGroupId("groupId"); assertEquals( IpPermissions.buildFormParametersForIndex(0, authorization).toString(), "{IpPermissions.0.IpProtocol=[icmp], IpPermissions.0.FromPort=[8], IpPermissions.0.ToPort=[0], IpPermissions.0.Groups.0.GroupId=[groupId]}"); }
public IpPermissions toVPCSecurityGroups(Iterable<String> groupIds) { return new IpPermissions(getIpProtocol(), getFromPort(), getToPort(), getUserIdGroupPairs(), groupIds, ImmutableSet.<String> of()); } }
public ToSourceSelection andCode(int code) { return new ToSourceSelection(getIpProtocol(), getFromPort(), code); }
/** * @param type ex. 8 for ECHO (i.e. Ping) * @see <a href="http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml"> ICMP Types</a> */ public AndCodeSelection type(int type) { return new AndCodeSelection(type); } }
public void testProtocolFromAndToPortAndGroupIds() { IpPermissions authorization = IpPermissions.permit(IpProtocol.UDP).fromPort(11).to(53) .originatingFromSecurityGroupId("groupId"); assertEquals( IpPermissions.buildFormParametersForIndex(0, authorization).toString(), "{IpPermissions.0.IpProtocol=[udp], IpPermissions.0.FromPort=[11], IpPermissions.0.ToPort=[53], IpPermissions.0.Groups.0.GroupId=[groupId]}"); }
public ToSourceSelection to(int port) { return new ToSourceSelection(getIpProtocol(), getFromPort(), port); } }
public ToSourceSelection andCode(int code) { return new ToSourceSelection(getIpProtocol(), getFromPort(), code); }
public ToSourceSelection port(int port) { return new ToSourceSelection(getIpProtocol(), port, port); } }
public ToPortSelection fromPort(int port) { return new ToPortSelection(getIpProtocol(), port); }
public ToSourceSelection to(int port) { return new ToSourceSelection(getIpProtocol(), getFromPort(), port); } }
public ToSourceSelection port(int port) { return new ToSourceSelection(getIpProtocol(), port, port); } }
public ToPortSelection fromPort(int port) { return new ToPortSelection(getIpProtocol(), port); }
public ToSourceSelection to(int port) { return new ToSourceSelection(getIpProtocol(), getFromPort(), port); } }
public ToSourceSelection port(int port) { return new ToSourceSelection(getIpProtocol(), port, port); } }
public ToSourceSelection to(int port) { return new ToSourceSelection(getIpProtocol(), getFromPort(), port); } }