@POST
@Produces({ JSON })
public WrappedCredential createEc2Credential() throws CloudException, DuplicateValueException {
UserData forUser = getUser(Long.valueOf(userId));
WrappedCredential response = new WrappedCredential();
TokenInfo tokenInfo = findTokenInfo();
if (tokenInfo == null) {
throw new WebApplicationException(Status.UNAUTHORIZED);
}