/** * <p> * The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number (see <a * href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). * </p> * <p> * [EC2-VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, specifying * <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, <code>icmp</code>, or * <code>58</code> (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For * <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. For <code>58</code> * (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when * authorizing rules. * </p> * * @param ipProtocol * The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number (see <a * href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p> * <p> * [EC2-VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, * specifying <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, * <code>icmp</code>, or <code>58</code> (ICMPv6) allows traffic on all ports, regardless of any port range * you specify. For <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. * For <code>58</code> (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types * and codes is allowed when authorizing rules. * @return Returns a reference to this object so that method calls can be chained together. */ public IpPermission withIpProtocol(String ipProtocol) { setIpProtocol(ipProtocol); return this; }
protected static IpPermission toIpPermission( IpRule rule ) { IpPermission permission = new IpPermission(); permission.setIpProtocol( rule.getIpProtocol() ); permission.setToPort( rule.getToPort() ); permission.setFromPort( rule.getFromPort() ); permission.setIpRanges( rule.getIpRanges() ); return permission; }
ipPermission.setIpProtocol(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
/** * <p> * The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number (see <a * href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). * </p> * <p> * [EC2-VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, specifying * <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, <code>icmp</code>, or * <code>58</code> (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For * <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. For <code>58</code> * (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed when * authorizing rules. * </p> * * @param ipProtocol * The IP protocol name (<code>tcp</code>, <code>udp</code>, <code>icmp</code>) or number (see <a * href="http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml">Protocol Numbers</a>). </p> * <p> * [EC2-VPC only] Use <code>-1</code> to specify all protocols. When authorizing security group rules, * specifying <code>-1</code> or a protocol number other than <code>tcp</code>, <code>udp</code>, * <code>icmp</code>, or <code>58</code> (ICMPv6) allows traffic on all ports, regardless of any port range * you specify. For <code>tcp</code>, <code>udp</code>, and <code>icmp</code>, you must specify a port range. * For <code>58</code> (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types * and codes is allowed when authorizing rules. * @return Returns a reference to this object so that method calls can be chained together. */ public IpPermission withIpProtocol(String ipProtocol) { setIpProtocol(ipProtocol); return this; }
ipPermission.setIpProtocol(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
ip.setIpProtocol("tcp"); ip.setFromPort(22); ip.setToPort(22);
ipPermission.setIpProtocol(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;