* @param instanceId
* @return
*/
public EC2PasswordData getPasswordData(String instanceId) {
try {
CloudStackPasswordData resp = getApi().getVMPassword(instanceId);
EC2PasswordData passwdData = new EC2PasswordData();
if (resp != null) {
passwdData.setInstanceId(instanceId);
passwdData.setEncryptedPassword(resp.getEncryptedpassword());
}
return passwdData;
} catch(Exception e) {
logger.error("EC2 GetPasswordData - ", e);
throw new EC2ServiceException(ServerError.InternalError, e.getMessage());