for (Rule rule : network.getIngress()) {
if (rule.getProtocol() == Protocol.ICMP) {
securityGroupClient.authorizeIngressICMPToCIDRs(securityGroup.getId(), DEFAULT_ICMP_CODE,
DEFAULT_ICMP_TYPE, ImmutableList.of(rule.getCidr()));
} else {
securityGroupClient.authorizeIngressPortsToCIDRs(securityGroup.getId(),
rule.getProtocol().name(),
rule.getPorts().lowerEndpoint(),
rule.getPorts().upperEndpoint(),
Lists.newArrayList(rule.getCidr()));
}