Java Code Examples for com.amazonaws.services.ec2.model.IpPermission#setIpProtocol()
The following examples show how to use
com.amazonaws.services.ec2.model.IpPermission#setIpProtocol() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: IpPermissionConverter.java From primecloud-controller with GNU General Public License v2.0 | 5 votes |
@Override protected IpPermission convertObject(com.xerox.amazonws.ec2.GroupDescription.IpPermission from) { IpPermission to = new IpPermission(); to.setIpProtocol(from.getProtocol()); to.setFromPort(from.getFromPort()); to.setToPort(from.getToPort()); to.setUserIdGroupPairs(new UserIdGroupPairConverter().convert(from.getUidGroupPairs())); to.setIpRanges(from.getIpRanges()); return to; }
Example 2
Source File: AmazonIpRuleManager.java From usergrid with Apache License 2.0 | 5 votes |
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; }