public class SecurityGroupUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
INVALID_GROUP_NOT_FOUND |
Constructor and Description |
---|
SecurityGroupUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
doesSecurityGroupExist(AmazonEC2 ec2,
java.lang.String securityGroupName)
Provides a quick answer to whether a security group exists.
|
private static final java.lang.String INVALID_GROUP_NOT_FOUND
public static boolean doesSecurityGroupExist(AmazonEC2 ec2, java.lang.String securityGroupName) throws AmazonClientException, AmazonServiceException
ec2
- the EC2 client to use for making service requestssecurityGroupName
- the name of the security group being queriedAmazonClientException
- If any internal errors are encountered inside the client
while attempting to make the request or handle the response.
For example if a network connection is not available.AmazonServiceException
- If an error response is returned by AmazonEC2 indicating
either a problem with the data in the request, or a server
side issue.