throw new CloudFrontServiceException("Failed to parse XML document with handler " + handler.getClass(), t);
throw new CloudFrontServiceException("Failed to parse XML document with handler " + handler.getClass(), t);
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); } }
throw new CloudFrontServiceException("Unable to retrieve paginated " + "InvalidationList results without a valid NextMarker value."); 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); } }
throw new CloudFrontServiceException(e);
throw new CloudFrontServiceException(e);
throw new CloudFrontServiceException(e);
/** * @param distributionId The distribution's unique identifier. * @param invalidationId The identifier for the invalidation request * @return Details of a prior invalidation operation. * @throws CloudFrontServiceException exception */ public Invalidation getInvalidation(String distributionId, String invalidationId) throws CloudFrontServiceException { HttpGet httpMethod = new HttpGet(ENDPOINT + VERSION + "/distribution/" + distributionId + "/invalidation/" + invalidationId); try { HttpResponse response = performRestRequest(httpMethod, 200); InvalidationHandler handler = (new CloudFrontXmlResponsesSaxParser(this.jets3tProperties)) .parseInvalidationResponse(response.getEntity().getContent()); return handler.getInvalidation(); } catch(CloudFrontServiceException e) { throw e; } catch(RuntimeException e) { throw e; } catch(Exception e) { throw new CloudFrontServiceException(e); } }
/** * @param distributionId The distribution's unique identifier. * @param invalidationId The identifier for the invalidation request * @return Details of a prior invalidation operation. * @throws CloudFrontServiceException exception */ public Invalidation getInvalidation(String distributionId, String invalidationId) throws CloudFrontServiceException { HttpGet httpMethod = new HttpGet(ENDPOINT + VERSION + "/distribution/" + distributionId + "/invalidation/" + invalidationId); try { HttpResponse response = performRestRequest(httpMethod, 200); InvalidationHandler handler = (new CloudFrontXmlResponsesSaxParser(this.jets3tProperties)) .parseInvalidationResponse(response.getEntity().getContent()); return handler.getInvalidation(); } catch(CloudFrontServiceException e) { throw e; } catch(RuntimeException e) { throw e; } catch(Exception e) { throw new CloudFrontServiceException(e); } }
/** * Delete an Origin Access Identity. * * @param id The identifier of the Origin Access Identity. * @throws CloudFrontServiceException exception */ public void deleteOriginAccessIdentity(String id) throws CloudFrontServiceException { if(log.isDebugEnabled()) { log.debug("Deleting origin access identity with id: " + id); } // Get the identity's current config. OriginAccessIdentityConfig currentConfig = getOriginAccessIdentityConfig(id); HttpDelete httpMethod = new HttpDelete(ENDPOINT + VERSION + ORIGIN_ACCESS_IDENTITY_URI_PATH + "/" + id); try { httpMethod.setHeader("If-Match", currentConfig.getEtag()); HttpResponse response = performRestRequest(httpMethod, 204); releaseConnection(response); } catch(CloudFrontServiceException e) { throw e; } catch(RuntimeException e) { throw e; } catch(Exception e) { throw new CloudFrontServiceException(e); } }
/** * Delete an Origin Access Identity. * * @param id The identifier of the Origin Access Identity. * @throws CloudFrontServiceException exception */ public void deleteOriginAccessIdentity(String id) throws CloudFrontServiceException { if(log.isDebugEnabled()) { log.debug("Deleting origin access identity with id: " + id); } // Get the identity's current config. OriginAccessIdentityConfig currentConfig = getOriginAccessIdentityConfig(id); HttpDelete httpMethod = new HttpDelete(ENDPOINT + VERSION + ORIGIN_ACCESS_IDENTITY_URI_PATH + "/" + id); try { httpMethod.setHeader("If-Match", currentConfig.getEtag()); HttpResponse response = performRestRequest(httpMethod, 204); releaseConnection(response); } catch(CloudFrontServiceException e) { throw e; } catch(RuntimeException e) { throw e; } catch(Exception e) { throw new CloudFrontServiceException(e); } }
throw new CloudFrontServiceException(e);