public class SecurityGroupPredicates extends Object
Constructor and Description |
---|
SecurityGroupPredicates() |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Predicate<SecurityGroup> |
any() |
static com.google.common.base.Predicate<SecurityGroup> |
hasCidr(String cidr) |
static com.google.common.base.Predicate<SecurityGroup> |
nameEquals(String name)
matches name of the given security group
|
static com.google.common.base.Predicate<SecurityGroup> |
nameMatches(com.google.common.base.Predicate<String> name)
matches name of the given security group
|
static com.google.common.base.Predicate<SecurityGroup> |
portInRange(int port) |
static com.google.common.base.Predicate<SecurityGroup> |
portInRangeForCidr(int port,
String cidr) |
static com.google.common.base.Predicate<IngressRule> |
ruleCidrMatches(String protocol,
int startPort,
int endPort,
Set<String> cidrs)
matches IngressRules with the given protocol, start and end port, and
any of the given CIDRs.
|
static com.google.common.base.Predicate<IngressRule> |
ruleGroupMatches(String protocol,
int startPort,
int endPort,
com.google.common.collect.Multimap<String,String> accountGroupNames)
matches IngressRules with the given protocol, start and end port, and
any of the given account/security group name pairs.
|
public static com.google.common.base.Predicate<SecurityGroup> portInRange(int port)
public static com.google.common.base.Predicate<SecurityGroup> hasCidr(String cidr)
public static com.google.common.base.Predicate<SecurityGroup> portInRangeForCidr(int port, String cidr)
public static com.google.common.base.Predicate<SecurityGroup> any()
public static com.google.common.base.Predicate<SecurityGroup> nameEquals(String name)
name
- public static com.google.common.base.Predicate<SecurityGroup> nameMatches(com.google.common.base.Predicate<String> name)
name
- public static com.google.common.base.Predicate<IngressRule> ruleCidrMatches(String protocol, int startPort, int endPort, Set<String> cidrs)
protocol
- startPort
- endPort
- cidrs
- public static com.google.common.base.Predicate<IngressRule> ruleGroupMatches(String protocol, int startPort, int endPort, com.google.common.collect.Multimap<String,String> accountGroupNames)
protocol
- startPort
- endPort
- accountGroupNames
- Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.