/** * List the Origin Access Identities in a CloudFront account. * * @return List of {@link OriginAccessIdentity} objects describing the identities. * @throws CloudFrontServiceException */ public List<OriginAccessIdentity> getOriginAccessIdentityList() throws CloudFrontServiceException { if(log.isDebugEnabled()) { log.debug("Getting list of origin access identities"); } HttpGet httpMethod = new HttpGet(ENDPOINT + VERSION + ORIGIN_ACCESS_IDENTITY_URI_PATH); try { HttpResponse response = performRestRequest(httpMethod, 200); OriginAccessIdentityListHandler handler = (new CloudFrontXmlResponsesSaxParser(this.jets3tProperties)) .parseOriginAccessIdentityListResponse(response.getEntity().getContent()); return handler.getOriginAccessIdentityList(); } catch(CloudFrontServiceException e) { throw e; } catch(RuntimeException e) { throw e; } catch(Exception e) { throw new CloudFrontServiceException(e); } }
/** * List the Origin Access Identities in a CloudFront account. * * @return List of {@link OriginAccessIdentity} objects describing the identities. * @throws CloudFrontServiceException */ public List<OriginAccessIdentity> getOriginAccessIdentityList() throws CloudFrontServiceException { if(log.isDebugEnabled()) { log.debug("Getting list of origin access identities"); } HttpGet httpMethod = new HttpGet(ENDPOINT + VERSION + ORIGIN_ACCESS_IDENTITY_URI_PATH); try { HttpResponse response = performRestRequest(httpMethod, 200); OriginAccessIdentityListHandler handler = (new CloudFrontXmlResponsesSaxParser(this.jets3tProperties)) .parseOriginAccessIdentityListResponse(response.getEntity().getContent()); return handler.getOriginAccessIdentityList(); } catch(CloudFrontServiceException e) { throw e; } catch(RuntimeException e) { throw e; } catch(Exception e) { throw new CloudFrontServiceException(e); } }