List of usage examples for com.amazonaws.services.ec2.model ModifyInstanceAttributeRequest getGroups
public java.util.List<String> getGroups()
[EC2-VPC] Changes the security groups of the instance.
From source file:org.finra.dm.dao.impl.MockEc2OperationsImpl.java
License:Apache License
@Override public void modifyInstanceAttribute(AmazonEC2Client ec2Client, ModifyInstanceAttributeRequest modifyInstanceAttributeRequest) { if (modifyInstanceAttributeRequest.getGroups() != null && modifyInstanceAttributeRequest.getGroups().get(0) .equals(MockAwsOperationsHelper.AMAZON_SERVICE_EXCEPTION)) { throw new AmazonServiceException(MockAwsOperationsHelper.AMAZON_SERVICE_EXCEPTION); }/*from w ww.j a v a 2 s. c om*/ if (modifyInstanceAttributeRequest.getGroups() != null && modifyInstanceAttributeRequest.getGroups().get(0) .equals(MockAwsOperationsHelper.AMAZON_THROTTLING_EXCEPTION)) { AmazonServiceException throttlingException = new AmazonServiceException("test throttling exception"); throttlingException.setErrorCode("ThrottlingException"); throw throttlingException; } }