public InstanceProfileCredentials fetch(int retryTimes) throws ClientException {for (int i = 0; i <= retryTimes; i++) {try {return fetch();} catch (ClientException e) {if (i == retryTimes) {throw e;}}}throw new ClientException("Failed to connect ECS Metadata Service: Max retry times exceeded.");}
public InstanceProfileCredentials Fetch(int retryTimes){for (var i = 0; i <= retryTimes; i++){try{return Fetch();}catch (ClientException e){if (i == retryTimes){throw new ClientException(e.ErrorCode, e.ErrorMessage);}}}throw new ClientException("Failed to connect ECS Metadata Service: Max retry times exceeded.");}